Install NodeJS and NPM:
$ sudo apt-get update
$ sudo apt-get install nodejs
$ sudo apt-get install npm
Verify that everything is working:
$ node -v
$ npm -v
You should see the version of NodeJS and NPM.
Install MySQL database:
$ sudo apt-get install mysql-server
$ mysql_secure_installation
(Use secure root password and DON'T FORGET IT!)
Login into MySQL:
$ sudo mysql -u root -p
(Optional) Create new mysql user:
CREATE USER 'mynewuser'@'localhost' IDENTIFIED BY 'goodPassword';
GRANT ALL PRIVILEGES ON * . * TO 'mynewuser'@'localhost';
FLUSH PRIVILEGES;
Close mysql (ctrl+d on ubuntu terminal)
Install PM2
$ npm install pm2 -g
(Install PM2 to keep process running in backround)