-
-
Save hargup/f5c2aed6b63c13fc9f5c86b17f5e1bec to your computer and use it in GitHub Desktop.
Do Initial setup on a server
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
# To run this do | |
# sh -c "$(curl -fsSL https://link-to-this-file.sh)" | |
# sh -c "$(curl -fsSL https://gist.githubusercontent.com/hargup/f5c2aed6b63c13fc9f5c86b17f5e1bec/raw/9e4d296599c028182548ca03688bce83dc05ac5d/install.sh)" | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install zsh emacs silversearcher-ag docker-ce htop nginx nodejs npm postgresql postgresql-contrib | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | |
bash miniconda.sh -b -p /opt/miniconda | |
if [ ! -f /usr/local/bin/docker-compose ]; then | |
echo "Installing docker compose" | |
curl -L https://github.com/docker/compose/releases/download/v2.14.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
fi | |
git config --global user.email "[email protected]" | |
git config --global user.name "Harsh Gupta" | |
npm install -g yarn | |
npm install -g serve # For severing static builds | |
npm install -g nodemon | |
npm install -g pm2 | |
# Setup a new user | |
adduser --disabled-password --gecos "" app | |
rsync --archive --chown=app:app ~/.ssh /home/app | |
mkdir -p /var/www | |
chown -R app /var/www | |
usermod -aG docker app | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment