Month: November 2021

Ubuntu 21.04: Programming Apps

I got really behind proof-reading and finalizing these notes. So, I’m publishing them after I already installed the next version. Better late than never, right?

VirtualBox

I use Virtualbox to run Windows and some development virtual machines.

sudo apt install virtualbox

Then, I went to File > Host Network Manager and clicked the “Create” button because some of my machines rely on vboxnet0.

Tools

sudo apt install \
        vim \
        vim-gtk3 \
        git-cola \
        meld
mkdir ~/.vimtmp
  • Vim (gtk version is for the Gvim – Gui): The improved Vi editor. It’s handy to be used to the key combinations for when I get to work on servers at work.
  • Git-Cola: is a Gui for Git, and it will also install Git as a dependency
  • Meld: a text compare tool

To setup Git, I ran the following commands:

git config --global user.name "my name"
git config --global user.email my.email@email.com

Visual Studio

I’ve been using Visual Studio for my Angular Development. I could use it for Flutter development, but I prefer Android Studio for that. I just downloaded the deb package from the website.

sudo apt install  ~/Downloads/code_1.58.2-1626302803_amd64.deb

I have a few extensions that I have been installing. They are quick to install using Ctrl+P and then these commands:

  • ext install johnpapa.angular-essentials
  • ext install humao.rest-client
  • ext install raagh.angular-karma-test-explorer
  • ext install hbenl.vscode-jasmine-test-adapter
  • ext install dart-code.flutter

Node JS

I use Node JS here and there for different projects. Here’s what I did to install it…

sudo apt install nodejs 
sudo apt install npm 
sudo npm install npm@latest -g
sudo npm install -g gulp 
sudo npm install -g grunt 
sudo npm link @angular/cli

Flutter

I’m finding that I enjoy Flutter most these days. I referred to the instructions as I installed.

I used the snap method to install it:

sudo snap install flutter --classic

First things first, I had to run flutter doctor. That downloads the biggest part of flutter.

flutter doctor

I installed the “additional Linux requirements”:

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev

I downloaded Android Studio from the website. I just installed it by extracting it into the bin directory:

mkdir ~/bin/studio
tar -xzvf ~/Downloads/android-studio-ide-202.7486908-linux.tar.gz -C ~/bin/studio

Once extracted, I used the menu editor (MenuLibre) to create a launcher:

  • command: ~/bin/studio/android-studio/bin/studio.sh
  • icon: ~/bin/studio/android-studio/bin/studio.svg

To allow the programs to run on the Linux desktop, I ran this command:

flutter config --enable-linux-desktop

MySQL and PHP

I use MySQL and PHP on the backend of several projects. To make it easy to develop with those, I installed both this way:

sudo apt install mariadb-server-10.5 \
                  php7.4-fpm \
                  php-mysql \
                  composer

Note: By doing php7.4-fpm instead of just php7.4, it avoids installing the whole Apache web server.

Rather than restoring the database from my old computer, I’ll just do a refresh from my production server. I did have to prep the database:

sudo mysql
create database matthew;
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';