Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Packages i always install on an ubuntu box when starting with a nodejs project
NODE_SOURCE="https://deb.nodesource.com/setup_8.x"
NODE_CURL_ARGS="-sL"
#Install nginx
sudo apt-get install nginx -y
#Install nodejs
curl $NODE_CURL_ARGS $NODE_SOURCE | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
#Install mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
#For ubuntu 12.04
# echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
#For ubuntu 14.04
# echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
#For ubuntu 16.04
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
#Start mongodb
sudo service mongod start
#Add node-gyp for project
sudo npm install -g node-gyp
sudo npm install -g node-pre-gyp
#webhook
# Add instructions for
#SSL certificate automation
# sudo apt-get update
# sudo apt-get install software-properties-common
# sudo add-apt-repository ppa:certbot/certbot
# sudo apt-get update
# sudo apt-get install python-certbot-nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment