Created
October 18, 2017 12:01
-
-
Save lego-sharat/33e4519763461fd51875c10d8cc9ec01 to your computer and use it in GitHub Desktop.
Packages i always install on an ubuntu box when starting with a nodejs project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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