Skip to content

Instantly share code, notes, and snippets.

@dirkkelly
Created January 30, 2010 05:42
Show Gist options
  • Save dirkkelly/290436 to your computer and use it in GitHub Desktop.
Save dirkkelly/290436 to your computer and use it in GitHub Desktop.
#!/bin/bash
WGET_V=1.11.4
RUBY_V=1.8.7-2010.01
RUBY_REL=68719
NGINX_V=0.8.32
GIT_V=1.6.5.5
GIT_USER=dirkkelly
GIT_EMAIL=dk@dirkkelly.com
PROFILE=17cdcbacb60edb216b385356e1106344c16dea2d
NGINX_CONF=06b7760ab617ef0d19912be2524abb87407fb8e7
mkdir -p /opt/ruby/releases
mkdir -p /opt/gems
mkdir -p /opt/git/releases
echo "wget time"
curl -o wget-$WGET_V.tar.gz http://ftp.gnu.org/pub/gnu/wget/wget-$WGET_V.tar.gz --silent
tar zxf wget-$WGET_V.tar.gz
cd wget-$WGET_V
echo "wget installing"
./configure --silent
make --silent
sudo make install --silent
cd ~/tmp/
wget http://gist.github.com/raw/290429/$PROFILE/.profile ~/.profile --quiet
echo "rubyee time"
wget http://rubyforge.org/frs/download.php/$RUBY_REL/ruby-enterprise-$RUBY_V.tar.gz
tar xzvf ruby-enterprise-$RUBY_V.tar.gz
rm -rF /opt/ruby/current
ln -sF /opt/ruby/releases/$RUBY_V /opt/ruby/current
rm -rf /opt/gems
ln -sF /opt/ruby/releases/$RUBY_V/lib/ruby/gems/1.8/gems /opt/gems
./ruby-enterprise-$RUBY_V/installer -a /opt/ruby/releases/$RUBY_V
echo "nginx time"
wget http://sysoev.ru/nginx/nginx-$NGINX_V.tar.gz --quiet
tar xzvf nginx-$NGINX_V.tar.gz
passenger-install-nginx-module --auto --ngnix-source-dir=~/tmp/nginx-$NGINX_V --prefix=/opt/nginx/$NGINX_V
wget http://gist.github.com/raw/290431/$NGINX_CONF/nginx.conf -O /opt/nginx/conf/nginx.conf --quiet
rm -rF /opt/nginx/current
ln -sF /opt/nginx/releases/$NGINX_V /opt/nginx/current
cd ~/tmp/
echo "hosts time"
sudo chown -R staff:staff /etc/hosts
sudo chmod 755 /etc/hosts
ln -sF /etc/hosts ~/Sites/hosts.conf
echo "git time"
wget http://kernel.org/pub/software/scm/git/git-$GIT_V.tar.gz --quiet
tar xzf git-$GIT_V.tar.gz
cd git-$GIT_V
./configure --prefix=/opt/git/releases/$GIT_V --silent
rm -rf /opt/git/current
ln -sF /opt/git/releases/$GIT_V /opt/git/current
make --silent
make install --silent
git config --global user.name "$GIT_USER"
git config --global user.email "$GIT_EMAIL"
gem update --system
gem sources -a http://gems.github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment