Skip to content

Ubuntu NodeJs

Cooper Filby edited this page Oct 9, 2017 · 1 revision

NODE.JS AND NODE SERVICE SETUP

Installing NodeJS

More Info

  1. Make sure you are in your home directory: cd ~

  2. Install the NodeSourcePPA to get access to it’s contents: curl –sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh If you receive: -bash: curl: command not found a. Update repository: sudo apt-get update

    b. Install curl: sudo apt-get install curl

  3. Inspect script content: nano nodesource_setup.sh

  4. Run script under sudo: sudo bash nodesource_setup.sh

    a. This adds the NodeSourcePPA to the configuration and the local package cache and will be updated automatically.

  5. Install NodeJS and npm: sudo apt-get install nodejs

  6. Make all npm packages to work: sudo apt-get install build-essential

  7. Do you want to continue: Y

Install PM2, process manager for Node.js applications

  1. Install PM2 on server: sudo npm install –g pm2
  2. To see more on pm2 visit More Info

Next Steps

Finally, we'll want to configure the application user.

Clone this wiki locally