Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setup NodeJS, NPM and MySQL

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';


Close mysql (ctrl+d on ubuntu terminal)

Install PM2

$ npm install pm2 -g (Install PM2 to keep process running in backround)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment