Skip to content

Instantly share code, notes, and snippets.

@brunodb3
Last active June 14, 2017 16:06
Show Gist options
  • Save brunodb3/077f3263d16b6a965360bf1013d2f3a2 to your computer and use it in GitHub Desktop.
Save brunodb3/077f3263d16b6a965360bf1013d2f3a2 to your computer and use it in GitHub Desktop.
This file installs the lite version of my developer dependencies (intended to run at AWS servers)
#!/bin/bash
# This file installs the lite version of my developer dependencies (intended to run at AWS servers)
#
# ***********************************
# Only for Ubuntu based Linux Distros
# ***********************************
#
# PPA packages and Python Software Properties
sudo apt-get install software-properties-common python-software-properties -y
# MongoDB repo information
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
# Installing NVM
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
export NVM_DIR="/home/$USER/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
# And then Node V5
nvm install 5
# Updating Repos
sudo apt-get update
# Git
sudo apt-get install git -y
# MongoDB
sudo apt-get install -y mongodb-org
# Xclip
sudo apt-get install xclip -y
# We have to copy this block of code and paste it into a file (xclip takes care of the clipboard)
echo "[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
[Install]
WantedBy=multi-user.target" | xclip -sel clip
# Here we open the file to paste it
sudo nano /etc/systemd/system/mongodb.service
# Now we enable MongoDB to run at boot
sudo systemctl start mongodb
sudo systemctl enable mongodb
# NPM modules globally
npm install -g gulp bower
# Opening port 80 for NodeJS apps
sudo apt-get install libcap2-bin -y
sudo setcap cap_net_bind_service=+ep `readlink -f \`which node\``
# Installing pip/scrapy/pymongo
sudo apt-get install python-pip -y
sudo apt-get install build-essential libssl-dev libffi-dev python-dev -y
sudo pip install scrapy
sudo pip install pymongo
sudo pip install selenium
# Finally, we clean the packages from apt-get
sudo apt-get autoremove -y
# And we are done :)
echo "======================================================"
echo "Everything installed! Have a nice day!"
echo "======================================================"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment