How to Configure Full-Stack Development Environment for Linux

nielsenjared

Jared Nielsen

Posted on March 29, 2019

How to Configure Full-Stack Development Environment for Linux

How to Configure Full Stack Development Environment for Linux: Penguins

This article originally published on jarednielsen.com

My preferred development environment is Linux and my preferred approach to upgrading my distro is a clean install. This means with each upgrade I need to reinstall all of my tools. This article is primarily a reference for myself as this is something I’ve done before and will definitely do again. I hope you also find it useful.

Git

Perhaps most important is version-control. Being Linux, it’s a one-liner.

sudo apt install git-all
Enter fullscreen mode Exit fullscreen mode

Then generate your keys and add them to GitHub:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Enter fullscreen mode Exit fullscreen mode

Follow the prompts, then run:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
Enter fullscreen mode Exit fullscreen mode

IDE

Atom

All the cool kids are using VSCode, but Atom is still my favorite. You can’t teach an old dev new tricks.

Alternatively, you can install it from the command line following the instructions here

VSCode

https://code.visualstudio.com/Download

Node.js

You’ll want to download the latest version of Node. The command you then run will be similar to the following:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
Enter fullscreen mode Exit fullscreen mode

The terminal will prompt you to run the following command:

sudo apt-get install -y nodejs
Enter fullscreen mode Exit fullscreen mode

Optionally, install

sudo apt-get install -y build-essential
Enter fullscreen mode Exit fullscreen mode

MySQL

Installing MySQL on Linux is a breeze, but I always get the same permission error, so I added the solution below.

sudo apt-get install mysql-server
service mysql start
Enter fullscreen mode Exit fullscreen mode

If you get ERROR 1698 (28000): Access denied for user 'root'@'localhost':

sudo mysql -u root

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

service mysql restart
Enter fullscreen mode Exit fullscreen mode

OR create a new user:

sudo mysql -u root

mysql> USE mysql;
mysql> CREATE USER 'YOUR_SYSTEM_USER'@'localhost' IDENTIFIED BY '';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'YOUR_SYSTEM_USER'@'localhost';
mysql> UPDATE user SET plugin='auth_socket' WHERE User='YOUR_SYSTEM_USER';
mysql> FLUSH PRIVILEGES;
mysql> exit;

service mysql restart
Enter fullscreen mode Exit fullscreen mode

MySQL GUI

I generally prefer the command prompt when working with databases, but sometimes a GUI is helpful.

Workbench

It’s buggy in different ways on every platform, but still widely used. Download Workbench here.

You will be prompted for your Linux distro. To see it, run the following:

lsb_release -a
Enter fullscreen mode Exit fullscreen mode

That might not be helpful if you’re using a derivative distro like Mint, so try:

cat /etc/*release
Enter fullscreen mode Exit fullscreen mode

DBeaver

Alternatively, try DBeaver

MongoDB

Installing MongoDB via .deb packages is also easy. The following commands are current at the time of this writing (2019/01), but you may want to consult the documentation for changes or instructions for your specific distribution:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org
Enter fullscreen mode Exit fullscreen mode

Then run:

sudo service mongod start
Enter fullscreen mode Exit fullscreen mode

Mongo GUI

Robot3T

Download Robo3T here.

Bonus

Other tools I find useful and necessary, but aren’t necessarily web development:

Slack

https://slack.com/downloads/linux

Chrome

I prefer Firefox which ships with Mint, but gotta have this, too
https://www.google.com/chrome/

Dropbox

https://www.dropbox.com/install-linux

I often find myself needing to do minor photo or graphics work. Inkscape and GIMP are great (and free) Adobe alternatives.

Inkscape

sudo apt-get install inkscape

GIMP

Ships with Mint, but if your distro doesn’t include it:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt update
sudo apt install gimp
Enter fullscreen mode Exit fullscreen mode

(Re)Sources


I write a weekly newsletter where I share articles about programming, problem solving and lifelong learning. Join now

💖 💪 🙅 🚩
nielsenjared
Jared Nielsen

Posted on March 29, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related