Skip to content

Instantly share code, notes, and snippets.

@fbslo
Created April 6, 2020 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbslo/b63bab4c9e7cfc09e5b613fbe4715937 to your computer and use it in GitHub Desktop.
Save fbslo/b63bab4c9e7cfc09e5b613fbe4715937 to your computer and use it in GitHub Desktop.
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';

FLUSH PRIVILEGES;

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