Install ruby 1.8.7 (2008-12-21 MBARI 6 on patchlev

sudo vi /etc/apt/source.list
deb http://mirror.lupaworld.com/ubuntu intrepid main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu intrepid-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu intrepid-proposed main restricted universe multiverse


upgrade os
sudo apt-get update; sudo apt-get dist-upgrade; sudo apt-get upgrade
sudo apt-get install patch build-essential


install ruby
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz
wget http://sites.google.com/site/brentsrubypatches/Home/MBARIp72patches.tar.gz?attredirects=0
注意: MBARIp72patches 下不了请看附件



tar xzvf ruby-1.8.7-p72.tgz
cd ruby-1.8.7-p72

CFLAGS="-O2 -fno-stack-protector -mpreferred-stack-boundary=2" ./configure
make
./ruby -v
sudo make install


no such file to load — zlib (LoadError)
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install libssl0.9.8

cd ./ext/zlib  
ruby extconf.rb  make  
sudo make install


no such file to load — openssl (LoadError)
cd ./ext/zlib  
ruby extconf.rb  make  
sudo make install


install tools
sudo apt-get install rake apache2 libmysql-ruby1.8 libsqlite3-ruby sqlite3


install rubgems
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar xzvf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb
sudo ln -s /usr/local/bin/gem1.8 /usr/bin/gem
sudo gem update --system


install gems
sudo gem install pog sqlite3-ruby ruby-breakpoint


install mysql gem
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 





你可能感兴趣的:(mysql,ubuntu,ext,Ruby,rubygems)