Skip to content

Instantly share code, notes, and snippets.

@pdxjohnny
Last active November 23, 2015 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdxjohnny/726546727e9ad6f06ad4 to your computer and use it in GitHub Desktop.
Save pdxjohnny/726546727e9ad6f06ad4 to your computer and use it in GitHub Desktop.
The best server setup script ever
#!/bin/bash
# Make sure we are passed a username so we can add the user to a docker group
USER=""
if [ "$1" != "" ]; then
USER=$1
else
echo You need to enter a username or '${USER}' as the fisrt argument
exit 0
fi
# Update sources
apt-get update
apt-get upgrade -y
# Install vim and wget
apt-get install -y vim wget
# Install Docker
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-get update
apt-get install linux-image-extra-$(uname -r)
apt-get install docker-engine
service docker start
usermod -aG docker ${USER}
# If this is a server then install the server packages adn exit
if [[ -z "SERVER" ]]; then
apt-get install -y openssh-server
exit 0
fi
# Install pip
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
rm get-pip.py
# Install ruby
apt-get install -y ruby
# Install gist
gem install gist
# Intall Atom Editor
wget -O atom.deb https://atom.io/download/deb
# Fail on dependencies
dpkg -i atom.deb
# Install any dependencies
apt-get install -yf
# Install for real
dpkg -i atom.deb
rm -f atom.deb
# Intall Chrome
wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
mv deb chrome.deb
# Fail on dependencies
dpkg -i chrome.deb
# Install any dependencies
apt-get install -yf
# Install for real
dpkg -i chrome.deb
rm -f chrome.deb
# Install mutt and git and build-essentials
apt-get install -y mutt git build-essentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment