-
Notifications
You must be signed in to change notification settings - Fork 15
Ubuntu NodeJs
Cooper Filby edited this page Oct 9, 2017
·
1 revision
-
Make sure you are in your home directory:
cd ~
-
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
-
Inspect script content:
nano nodesource_setup.sh
-
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.
-
Install NodeJS and npm:
sudo apt-get install nodejs
-
Make all npm packages to work:
sudo apt-get install build-essential
-
Do you want to continue:
Y
- Install PM2 on server:
sudo npm install –g pm2
- To see more on pm2 visit More Info
Finally, we'll want to configure the application user.