Last active
April 2, 2017 04:43
-
-
Save ivan-loh/59c095000f19ea0128ed to your computer and use it in GitHub Desktop.
simple setup script to create a node app server
This file contains hidden or 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
| #!/bin/bash | |
| # - Nginx | |
| # - NodeJS | |
| # - Redis | |
| # - Mongodb | |
| # - Mosh | |
| # Add Required repository | |
| sudo add-apt-repository -y ppa:keithw/mosh | |
| sudo add-apt-repository -y ppa:chris-lea/redis-server | |
| sudo add-apt-repository -y ppa:nginx/stable | |
| curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
| # MongoDB 3 | |
| . /etc/lsb_release | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 | |
| echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu $DISTRIB_CODENAME/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list | |
| # Required Softwares | |
| sudo apt update && sudo apt upgrade | |
| sudo apt-get install -y git-core htop build-essential nodejs redis-server nginx mongodb-org mosh | |
| sudo git clone https://github.com/certbot/certbot /opt/letsencrypt # https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/ | |
| sudo npm install -g pm2 | |
| # Conveniences | |
| wget https://raw.githubusercontent.com/ivan-loh/dotfiles/master/.screenrc ~/.screenrc | |
| sudo dpkg-reconfigure tzdata | |
| ssh-keygen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment