使えるネットでyum updateするまで
まずは http://centos.bungu-do.jp/2008/05/vpsyum.html を参照して、yumとその依存するrpmをwgetします。
# wget ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm # rpm -ivh yum-3.2.8-9.el5.centos.1.noarch.rpm warning: yum-3.2.8-9.el5.centos.1.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 error: Failed dependencies: python-elementtree is needed by yum-3.2.8-9.el5.centos.1.noarch python-iniparse is needed by yum-3.2.8-9.el5.centos.1.noarch python-sqlite is needed by yum-3.2.8-9.el5.centos.1.noarch rpm-python is needed by yum-3.2.8-9.el5.centos.1.noarch urlgrabber >= 3.1.0 is needed by yum-3.2.8-9.el5.centos.1.noarch yum-metadata-parser >= 1.1.0 is needed by yum-3.2.8-9.el5.centos.1.noarch # # wget ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/rpm-python-4.4.2-48.el5.x86_64.rpm ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/python-urlgrabber-3.1.0-2.noarch.rpm # rpm -ivh * warning: m2crypto-0.16-6.el5.2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 Preparing... ########################################### [100%] 1:yum-metadata-parser ########################################### [ 13%] 2:rpm-python ########################################### [ 25%] 3:python-sqlite ########################################### [ 38%] 4:python-elementtree ########################################### [ 50%] 5:m2crypto ########################################### [ 63%] 6:python-urlgrabber ########################################### [ 75%] 7:python-iniparse ########################################### [ 88%] 8:yum ########################################### [100%] # # yum install yum-fastestmirror
これはちゃんと入って有効になるんだけど、次が問題。
# yum update Loading "fastestmirror" plugin (中略) --> Processing Dependency: libssl.so.4 for package: drweb-daemon ---> Package dbus-libs.x86_64 0:1.1.2-12.el5 set to be updated --> Finished Dependency Resolution Error: Missing Dependency: libcrypto.so.4 is needed by package drweb-daemon Error: Missing Dependency: libssl.so.4 is needed by package drweb-daemon
まじで?yum provideで調べてみる
# yum provides libcrypto.so.4 Loading "fastestmirror" plugin Loading mirror speeds from cached hostfile * base: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp * addons: ftp.jaist.ac.jp * extras: ftp.jaist.ac.jp openssl097a.i386 : The OpenSSL toolkit # # yum provides libssl.so.4 Loading "fastestmirror" plugin Loading mirror speeds from cached hostfile * base: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp * addons: ftp.jaist.ac.jp * extras: ftp.jaist.ac.jp openssl097a.i386 : The OpenSSL toolkit #
opensslはどうなっているのかを調べてみると、
# yum info openssl Loading "fastestmirror" plugin Installed Packages Name : openssl Arch : x86_64 Version: 0.9.8e Release: 7.el5 Size : 3.4 M Repo : installed Summary: The OpenSSL toolkit Description: The OpenSSL toolkit provides support for secure communications between machines. OpenSSL includes a certificate management tool and shared libraries which provide various cryptographic algorithms and protocols. Name : openssl Arch : i686 Version: 0.9.8e Release: 7.el5 Size : 3.3 M Repo : installed Summary: The OpenSSL toolkit Description: The OpenSSL toolkit provides support for secure communications between machines. OpenSSL includes a certificate management tool and shared libraries which provide various cryptographic algorithms and protocols.
入っているけど、バージョンが違うのね。
なので、openssl097a.i386 を さっきのrpmを落としたところftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/ で探してみると発見したので、
# wget ftp://ftp.riken.jp/Linux/centos/5.2/os/x86_64/CentOS/openssl097a-0.9.7a-9.x86_64.rpm # rpm -ivh rpm -ivh openssl097a-0.9.7a-9.x86_64.rpm
で改めてyum updateしてみる
# yum update Loading "fastestmirror" plugin (中略) ---> Package libselinux-utils.x86_64 0:1.33.4-5.1.el5 set to be updated ---> Package dbus-libs.x86_64 0:1.1.2-12.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Updating: SysVinit x86_64 2.86-15.el5 base 117 k (中略) yum noarch 3.2.19-18.el5.centos base 917 k Installing for dependencies: dbus-libs x86_64 1.1.2-12.el5 base 122 k libselinux-utils x86_64 1.33.4-5.1.el5 base 55 k Transaction Summary ============================================================================= Install 2 Package(s) Update 99 Package(s) Remove 0 Package(s) Total download size: 105 M Is this ok [y/N]: y
で、ダウンロードが始まりました。
あーよかった。
CentOS 5.2 で railsをインストールするまで
入っていたRubyは1.8.5なので、1.8.7をインストールします。RubyGemsも入ってないのでインストール。
http://www.takuto.biz/private/memo/changelog/2008-07-13.html を参考にやります。
$ sudo yum install gcc* compat-gcc* compat-lib* $ sudo yum groupinstall 'Development Libraries'
checkinstallのインストール
だけど、別にrpmじゃなくてもソースからインストールすればいいかなとおもって、方針転換。
やっぱりRubyのパッチレベルを上げる時とか考えるとせめてrpmでインストールしたいので、やっぱりcheckinstallをインストールする方向で。
$ wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm $ sudo rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
で、rpmforgeを通常のyumでは有効にしないようにenabledを0にする。
$ sudo vi /etc/yum.repos.d/rpmforge.repo
rpmforgeにアクセスするキーを取得してyumにインポート
$ wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt rpm --import RPM-GPG-KEY.dag.txt
で、checkinstallをインストール。の前に、infoで見てみる
$ sudo yum --enablerepo=rpmforge info checkinstall Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * rpmforge: ftp-stud.fht-esslingen.de * base: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp * addons: ftp.jaist.ac.jp * extras: ftp.jaist.ac.jp rpmforge | 1.1 kB 00:00 base | 1.1 kB 00:00 updates | 951 B 00:00 addons | 951 B 00:00 extras | 951 B 00:00 Error: No matching Packages to list
?どういうこと?ないの?まじで?listしてみる
$ yum --enablerepo=rpmforge list | grep checkinstall
????落ち着け俺。こういう時はログアウトしてみたり、再起動・・・やっぱり一緒。意味分かんない。
仕方ないので、rpmからcheckinstallをインストールする。
http://asic-linux.com.mx/%7Eizto/checkinstall/download.php
でrpmのURLをコピーして
$ wget http://asic-linux.com.mx/%7Eizto/checkinstall/files/rpm/checkinstall-1.6.1-1.i386.rpm $ sudo rpm -ivh checkinstall-1.6.1-1.i386.rpm Preparing... ########################################### [100%] 1:checkinstall ########################################### [100%] $ $ sudo checkinstall --version sudo: checkinstall: command not found $ $ sudo find / -name checkinstall /usr/local/lib/checkinstall /usr/local/sbin/checkinstall /usr/doc/checkinstall $ $ sudo /usr/local/sbin/checkinstall --version audit_log_user_command(): Connection refused checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The checkinstallrc file was not found at: /usr/local/lib/checkinstall/checkinstallrc Assuming default values. Copyright (C) 2002 Felipe Eduardo Sanchez Diaz Duran <izto@asic-linux.com.mx> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. $
ちゃんと入ったらしい。うーん、yumでなんで入んないんだろう?
これでインストールしたら、yumで見えるようになりました・・・。
$ yum info checkinstall Loaded plugins: fastestmirror Installed Packages Name : checkinstall Arch : i386 Version : 1.6.1 Release : 1 Size : 431 k Repo : installed Summary : CheckInstall installations tracker, version 1.6.1 License : GPL Description: CheckInstall installations tracker, version 1.6.1 CheckInstall keeps track of all the files created or modified by your : installation script ("make install" "make install_modules", "setup", etc), builds a standard binary package and : installs it in your system giving you the ability to uninstall it with your distribution's standard package management : utilities.
Rubyのインストール
なんとか入ったので、これはもう、http://www.takuto.biz/private/memo/changelog/2008-07-13.html のまんまです。
$ sudo yum remove ruby $ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz $ tar zxvf ruby-1.8.7-p72.tar.gz $ cd ruby-1.8.7-p72 $ ./configure --prefix=/usr $ make $ sudo /usr/local/sbin/checkinstall --fstrans=no checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. The checkinstallrc file was not found at: /usr/local/lib/checkinstall/checkinstallrc Assuming default values. The package documentation directory ./doc-pak does not exist. Should I create a default set of package docs? [y]: Preparing package documentation...OK Please choose the packaging method you want to use.Slackware [S], RPM [R] or Debian [D]? *** Invalid type. Please choose the packaging method you want to use.Slackware [S], RPM [R] or Debian [D]? r Please write a description for the package. End your description with an empty line or EOF.>> ************************************** **** RPM package creation selected *** ************************************** This package will be built according to these values: 1 - Summary: [ Package created with checkinstall 1.6.1 ]2 - Name: [ ruby-1.8.7 ]3 - Version: [ p72 ]4 - Release: [ 1 ]5 - License: [ GPL ]6 - Group: [ Applications/System ]7 - Architecture: [ x86_64 ]8 - Source location: [ ruby-1.8.7-p72 ]9 - Alternate source location: [ ]10 - Requires: [ ]11 - Provides: [ ruby-1.8.7 ] Enter a number to change any of them or press ENTER to continue: Installing with make install... (中略) ********************************************************************** Done. The new package has been saved to /usr/src/redhat/RPMS/x86_64/ruby-1.8.7-p72-1.x86_64.rpm You can install it in your system anytime using: rpm -i ruby-1.8.7-p72-1.x86_64.rpm ********************************************************************** $
で、rpmができたので、インストールしちゃう。
$ sudo rpm -ivh /usr/src/redhat/RPMS/x86_64/ruby-1.8.7-p72-1.x86_64.rpm audit_log_user_command(): Connection refused Preparing... ########################################### [100%] package ruby-1.8.7-p72-1.x86_64 is already installed $ $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
ちゃんと入ってますね。irb, rdoc, ri も入ってました。
RubyGemsのインストール
これも http://www.takuto.biz/private/memo/changelog/2008-07-13.html とほぼ一緒。
$ wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz $ tar zxvf rubygems-1.3.1.tgz $ cd rubygems-1.3.1 $ sudo checkinstall -R "ruby setup.rb" (中略) ********************************************************************** Done. The new package has been saved to /usr/src/redhat/RPMS/x86_64/rubygems-1.3.1-1.x86_64.rpm You can install it in your system anytime using: rpm -i rubygems-1.3.1-1.x86_64.rpm **********************************************************************
rpmができたのでインストール。
$ sudo rpm -Uvh /usr/src/redhat/RPMS/x86_64/rubygems-1.3.1-1.x86_64.rpm Preparing... ########################################### [100%] 1:rubygems ########################################### [100%] $ gem -v 1.3.1 $
できました!
その他にインストールしたもの
$ sudo yum install emacs $ sudo yum install subversion
subversionは1.4.2だけど、まあ1.5の機能は使わないから。まいっかってことで。