Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created August 15, 2009 17:02
Show Gist options
  • Save jhsu/168401 to your computer and use it in GitHub Desktop.
Save jhsu/168401 to your computer and use it in GitHub Desktop.
Bash script to set up Ubuntu after fresh install
#!/bin/bash
sudo apt-get install build-essentials openssh postgresql curl xsel
sudo apt-get install nginx php5 mysql-server libmysqlclient15-dev \
ruby1.8-dev libopenssl-ruby libopenssl-ruby1.8 libmysql-ruby \
libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 libreadline-ruby1.8 \
ruby irb ri git-core
sudo aptitude install gnome-desktop-environment awesome
echo "export WINDOW_MANAGER=/usr/local/bin/awesome" > ~/.gnomerc
echo "don't forget to put padding in Awesome config for gnome toolbar"
mkdir ~/src
cd ~/src
echo `pwd`
echo "rubygems downloading"
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
echo "rubygems install"
sudo ruby setup.rb
# Do I need symlinks? gem, ruby, rdoc, ri, irb
gem sources -a http://gems.github.com
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
sudo gem install rails mysql
cd ~/
echo `pwd`
touch ~/aliases
echo "\nsource ~/aliases" >> ~/.bashrc
# build git-sh
git clone git://github.com/rtomayko/git-sh.git
cd git-sh
make
sudo make install
git-sh --configure
cd ..
rm -rf git-sh
# aliases
echo "alias pbcopy='| xsel -b' \n\
alias ll='ls -lp' \n\
alias la='ls -alp' \n" >> ~/aliases
# git aliases
echo "alias gst='git status' \n\
alias gb='git branch' \n\
alias gba='git branch -a' \n\
alias grm=\"git status | grep deleted | awk '{print \$3}' | xargs git rm\" \n" >> ~/aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment