Successfully set up a Ubuntu 16.x server in AWS
- Using the non root user
- Setup NVM
- OSX:
brew install nvm - Ubuntu:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash nvm install --ltsnvm use node- In the
.bashrcfile move the NVM exports to the top. - If they are at the bottom pm2 will not be able to run them because
.bashrconly runs in interactive move by default. - Im sure there is a better way to fix this I'm just not user how.
- OSX:
- Install nginx with
sudo apt install nginx - Test that the server can connect to git with the a ssh
ssh git@github.com: should return a good connection
- Install PM2 globally with
npm install pm2 -g
pm2 deploy production setup
pm2 startup (Follow Directions from the output of this command)
pm2 save
pm2 deploy production
pm2 deploy production exec "pm2 list"
pm2 show <APP_NAME>
pm2 remove <APP_NAME>