Skip to content

Instantly share code, notes, and snippets.

@huobazi
Forked from addamh/ubuntu-setup.sh
Created May 29, 2011 05:15
Show Gist options
  • Save huobazi/997496 to your computer and use it in GitHub Desktop.
Save huobazi/997496 to your computer and use it in GitHub Desktop.
NORMES Ubuntu Development System Bootstrap Script
#!/bin/bash
echo "Updating Packages..."
apt-get -qq -y update
echo "Installing Vim..."
apt-get -qq -y install vim-gnome
echo "Installing Utilities..."
apt-get -qq -y install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev
apt-get -qq -y install wget ack exuberant-ctags markdown gitk
echo "Installing Git..."
apt-get -qq -y install git
echo "Installing dotfiles"
mkdir ~/hashrocket
cd ~/hashrocket
git clone http://github.com/hashrocket/dotmatrix.git
ln -s ~/hashrocket/dotmatrix/.bashrc ~/
ln -s ~/hashrocket/dotmatrix/.hashrc ~/
ln -s ~/hashrocket/dotmatrix/.vim ~/
ln -s ~/hashrocket/dotmatrix/.vimrc ~/
sh ~/hashrocket/dotmatrix/bin/vimbundles.sh
echo "Installing RVM..."
mkdir -p ~/.rvm/src/ && \
cd ~/.rvm/src && \
rm -rf ./rvm/ && \
git clone --depth 1 git://github.com/wayneeseguin/rvm.git && \
cd rvm && \
./install
echo 'if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi' \
>> ~/.bashrc.local
echo 'rvm_project_rvmrc_default=1' \
> ~/.rvmrc # Use default gemset when leaving a .rvmrc project dir
echo '[[ -r $rvm_path/scripts/completion ]] && source $rvm_path/scripts/completion' \
>> ~/.bashrc.local # rvm autocompletion
clear
echo "Installing OpenSSL..."
rvm package install openssl
echo "Installing Global Gems..."
echo -e "bundler
hitch
mysql
rake
pg" > ~/.rvm/gemsets/global.gems
echo "Setting up .gemrc..."
echo -e '---
:benchmark: false
gem: --no-ri --no-rdoc
:update_sources: true
:bulk_threshold: 1000
:verbose: true
:sources:
- http://rubygems.org
- http://gems.github.com
:backtrace: false' > ~/.gemrc
echo "Installing Rubies..."
rvm install 1.8.7 -C --enable-shared=yes
rvm install 1.9.2 -C --enable-shared=yes
rvm use 1.9.2 --default
echo "Installing Database Systems..."
echo " Installing MySQL..."
apt-get -qq -y install mysql-common mysql-server-5.0
echo " Installing Postgres..."
apt-get -qq -y install postgresql-common postgresql-8.4
echo " Installing MongoDB..."
apt-get -qq -y install mongodb-deb mongodb-server
echo " Installing Redis..."
apt-get -qq -y install redis-server
echo "Installing lib-notify..."
apt-get -qq -y install libnotify-dev libnotify-bin
echo "Installing NodeJS"
apt-get -qq -y install python-software-properties
add-apt-repository ppa:jerome-etienne/neoip
apt-get -qq -y update
apt-get -qq -y install nodejs
echo "Installing Bundler for managing Ruby libraries..."
gem install bundler
echo "Installing Rails to write and run web applications..."
gem install rails
echo "Installing the Heroku gem to interact with the http://heroku.com API..."
gem install heroku
echo "Installing the Taps gem to push and pull SQL databases between development, staging, and production environments..."
gem install taps
echo "Installing Ruby gems to talk to the databases..."
gem install sqlite3 pg mysql
echo "
===========================================
_ _ ____ _____ __ __ ______ _____
| \ | |/ __ \| __ \| \/ | ____|/ ____|
| \| | | | | |__) | \ / | |__ | (___
| . \` | | | | _ /| |\/| | __| \___ \
| |\ | |__| | | \ \| | | | |____ ____) |
|_| \_|\____/|_| \_\_| |_|______|_____/
===========================================
Installation Complete!
";
echo "Generating Public Key..."
ssh-keygen -t rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment