更新了一下脚本

Sun Jul 06 15:35:00 UTC 2008

自从上回 之后,ruby、rails与gems也都开始更新了,于是也更新了一下安装脚本,如下:

  • mkdir ~/.gems
  • echo ‘export GEM_HOME=”$HOME/.gems”’ >> .bash_profile
  • echo ‘export GEM_PATH=”$GEM_HOME:/usr/lib/ruby/gems/1.8”’ >> .bash_profile
  • echo ‘export PATH=”$HOME/.gems/bin:$PATH”’ >> .bash_profile
  • echo ‘export PATH=”$HOME/local/bin:$PATH”’ >> .bash_profile
  • . ~/.bash_profile
  • echo $PATH
  • touch ~/.gemrc
  • echo gemhome:/home/$(whoami)/.gems >> ~/.gemrc
  • echo gempath: >> ~/.gemrc
  • echo -/home/$(whoami)/.gems >> ~/.gemrc
  • echo -/usr/lib/ruby/gems/1.8 >> ~/.gemrc
  • # setup directories
  • mkdir -p ~/local/usr/src/ruby
  • cd ~/local/usr/src/ruby
  • # Install readline
  • wget ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
  • tar zxvf readline-5.2.tar.gz
  • cd readline-5.2
  • ./configure—prefix=$HOME/local
  • make
  • make install
  • cd ..
  • # install ruby
  • wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p22.tar.bz2
  • tar jxvf ruby-1.8.7-p22.tar.bz2
  • cd ruby-1.8.7-p22
  • ./configure—prefix=$HOME/local—with-readline-dir=$HOME/local/
  • make
  • make install
  • cd ..
  • # fix path
  • export PATH=$HOME/local/bin:$PATH
  • # get rubygems
  • wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
  • tar zxvf rubygems-1.2.0.tgz
  • cd rubygems-1.2.0
  • $HOME/local/bin/ruby setup.rb config—prefix=$HOME/local
  • $HOME/local/bin/ruby setup.rb setup
  • $HOME/local/bin/ruby setup.rb install
  • cd ..
  • # Install RAILS
  • gem install rails
  • # Install FastCGI
  • curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
  • tar xzvf fcgi-2.4.0.tar.gz
  • cd fcgi-2.4.0
  • ./configure—prefix=$HOME/local
  • make
  • make install
  • cd ..
  • # Install FastCGI & MySQL gem packages
  • gem install fcgi——with-fcgi-dir=$HOME/local
  • gem install mysql——with-mysql-config
  • # gem update

关于脚本的解释可以看以前 的说明,这次仅仅只是版本上的更新而已,不再多做说明

文件依然放在http://leeseon.com/private/allinstall.sh

也同样可以使用


curl http://leeseon.com/private/allinstall.sh | sh

来执行,无它、、、

Filed Under: Tags:

Comments

Have your say

A name is required. You may use HTML in your comments.