CentOSç¨ã«Rubyã®RPMãä½ã£ã
CentOSã®Yumãªãã¸ããªã«ããRubyã¯å¤éãã¦ãgemã®ä¾åã§å¼ã£ãããäºãå¤ãã
ã ããèªåã§CentOS5ç¨ã®RPMä½ã£ãã
ã
ç¾å¨å®å®çã¨ããã¦ãã2ã¤ã®ãã¼ã¸ã§ã³ã®Rubyã¨ãææ°ã®RubyGemsã
ruby-1.8.7.p334-1.i386.rpm
ruby-1.9.2.p180-1.i386.rpm
rubygems-1.7.2-1.i386.rpm
ã
Yumã§ã¤ã³ã¹ãã¼ã«
ãªãã¸ããªè¿½å
cat <<-'YUMREPOSITORY' > /etc/yum.repos.d/eth0jp.repo [eth0jp] name=eth0jp repository baseurl=http://eth0jp-repo.appspot.com/repo/centos/$releasever/$basearch/ enabled=0 gpgcheck=0 YUMREPOSITORY
ã
Rubyã¨RubyGemsã¤ã³ã¹ãã¼ã«
# ruby yum -y install --disablerepo='*' --enablerepo=eth0jp ruby-1.8.7.p334-1 # gems yum -y install --disablerepo='*' --enablerepo=eth0jp rubygems # rails gem install rails --include-dependencies -v=2.3.11 # passenger dependencies yum -y install gcc gcc-c++ curl-devel openssl-devel zlib-devel httpd-devel # passenger gem install passenger -v=2.2.15 yes '' | passenger-install-apache2-module echo 'LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15 PassengerRuby /usr/bin/ruby ' > /etc/httpd/conf.d/mod_passenger.conf
ã
注æç¹
RPMã®ä¾åã¯ä½ãè¨å®ãã¦ããªãã
æ®éã®æå°æ§æã®CentOS5.5ã§ç¢ºèªãã¦ãããã©ã1CDã®CentOSã¨ãã ã¨ä½ã足ããªãããã±ã¼ã¸ãããããï¼
ä»ã®ã¨ããåé¡ãªãåãã¦ããããã©ã使ç¨ã¯èªå·±è²¬ä»»ã§ã
ã
ç°å¢
[web@labo ~]$ cat /etc/redhat-release CentOS release 5.5 (Final) [web@labo ~]$ uname -i i386 [web@labo ~]$ uname -r 2.6.18-194.el5xen
[web@labo ~]$ ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux] [web@labo ~]$ gem -v 1.7.2 [web@labo ~]$ rails -v Rails 2.3.11
ã
eth0jp Yum repository
http://eth0jp-repo.appspot.com/
ã
2011-04-20 06:22:09
ãã«ããç´ããã
prefixãããã©ã«ãï¼/usr/localï¼ãã/usrã«å¤æ´ã
railsã®./script/consoleã§ã¨ã©ã¼ãåºãã®ã§ãreadline-develãå
¥ãã¦ãããã«ãã
./configure --enable-shared --prefix=/usr