Skip to content

Instantly share code, notes, and snippets.

@jbz
Forked from petitbon/bootstrap_os_x.sh
Created April 13, 2010 19:01
Show Gist options
  • Save jbz/364944 to your computer and use it in GitHub Desktop.
Save jbz/364944 to your computer and use it in GitHub Desktop.
Ruby tech stack install script for OS X
cp ~/.profile ~/.profile.bak
echo 'export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"' > ~/.profile
. ~/.profile
echo 'Creating src directory'
mkdir ~/src
cd ~/src
echo 'Installing MySQL'
curl -O http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-5.1/mysql-5.1.41.tar.gz
tar zxvf mysql-5.1.41.tar.gz
cd mysql-5.1.41
./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \
--enable-thread-safe-client --enable-local-infile --enable-shared \
--with-plugins=innobase
make
sudo make install
cd /usr/local/mysql
sudo ./bin/mysql_install_db --user=mysql
sudo chown -R mysql ./var
cd ..
cd ~/src
curl -O http://hivelogic.com/downloads/com.mysql.mysqld.plist
sudo mv ~/src/com.mysql.mysqld.plist /Library/LaunchDaemons
sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plist
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist
echo 'installed MySQL'
echo mysql
echo 'Installing Git'
cd ~/src
curl -O http://kernel.org/pub/software/scm/git/git-1.6.4.2.tar.gz
tar zxvf git-1.6.4.2.tar.gz
cd git-1.6.4.2
./configure --prefix=/usr/local
make
sudo make install
cd ..
which git
echo 'Installed git'
echo 'Installing Ruby and Rubygems'
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz
curl -O http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.5.tgz
tar xzvf ruby-1.8.7-p174.tar.gz
cd ruby-1.8.7-p174
./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd ..
tar xzvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo /usr/local/bin/ruby setup.rb
cd ..
sudo gem install rails
rails -v
echo 'Installing mysql gem'
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
echo 'installing Perl Compatible Regular Expressions'
cd ~/src
curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz
tar -xvzf pcre-7.9.tar.gz
cd pcre-7.9
./configure --prefix=/usr/local
make
sudo make install
echo 'install passenger'
sudo gem install passenger
#
#echo 'install nginx'
#
#cd ~/src
#curl -O http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
#tar -xvzf nginx-0.7.62.tar.gz
#cd nginx-0.7.62
#./configure --prefix=/usr/local --conf-path=/etc/nginx/nginx.conf \
#--http-log-path=/var/log/nginx/access_log \
#--error-log-path=/var/log/nginx/error_log \
#--pid-path=/var/run/nginx.pid \
#--http-client-body-temp-path=/var/tmp/nginx/client \
#--http-proxy-temp-path=/var/tmp/nginx/proxy \
#--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
#--with-md5-asm --with-md5=/usr/include \
#--with-sha1-asm \
#--with-sha1=/usr/include \
#--with-http_realip_module \
#--with-http_ssl_module \
#--with-http_stub_status_module \
#--add-module='/Users/<username>/.gem/ruby/1.8/gems/passenger-2.2.5/ext/nginx'
#make
#sudo make install
#
#
#
#
#
#
#
#echo 'Done!'
#
#
#cd
#curl -O http://www.agroman.net/corkscrew/corkscrew-2.0.tar.gz
#tar -xf corkscrew-2.0.tar.gz
#cd corkscrew-2.0
#./configure -host=apple
#make
#sudo make install
#cd /tmp
#curl http://erlang.org/download/otp_src_R13B.tar.gz | tar zx
#cd otp_src_R13B
#./configure --enable-hipe
#make
#sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment