Skip to content

Instantly share code, notes, and snippets.

@0x00b1
Created February 20, 2013 06:17
Show Gist options
  • Save 0x00b1/4993373 to your computer and use it in GitHub Desktop.
Save 0x00b1/4993373 to your computer and use it in GitHub Desktop.
if [[ !(`date | grep NZDT`) ]]; then
sudo ln -sf /usr/share/zoneinfo/Pacific/Auckland /etc/localtime
fi
sudo apt-get update
sudo apt-get --yes upgrade
sudo sed -i 's/#PasswordAuthentication no/PasswordAuthentication no/g' /etc/ssh/sshd_config
sudo sed -i 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config
sudo service ssh restart
sudo apt-get --yes install fail2ban
sudo apt-get --yes install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev
if [[ !(`command -v ruby`) ]]; then
cd /opt
sudo wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz
sudo tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-*
sudo ./configure --prefix=/usr/local
sudo make
sudo make install
fi
sudo gem install chef --no-ri --no-rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment