最近のCMS(コンテンツ・マネジメント・システム)で、PHP 5.3以上を要求するものが増えてきたので、バージョンアップすることにしました。ここのサイトでメインに使ってる「MediaWiki」「WordPross」「XOOPS」はPHPのバージョンアップをしても影響は無いと思われる。
注意事項
Les RPM de Remiのリポジトリ登録
[root@host2 ~]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm [root@host2 ~]# rpm -Uvh epel-release-5-4.noarch.rpm [root@host2 ~]# wget http://rpms.famillecollet.com/el5.i386/remi-release-5-8.el5.remi.noarch.rpm [root@host2 ~]# rpm -Uvh remi-release-5-8.el5.remi.noarch.rpm [root@host2 ~]# rm -f epel-release-5-4.noarch.rpm [root@host2 ~]# rm -f remi-release-5-8.el5.remi.noarch.rpm
yumでepelのリポジトリを使えるようにする
[root@host2 ~]# vi /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 5 – $basearch #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch failovermethod=priority priority=1 ← 行追加 enabled=0 ← 変更 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
yumでremiのリポジトリを使えるようにする
[root@host2 ~]# vi /etc/yum.repos.d/remi.repo [remi] name=Les RPM de remi pour Enterprise Linux $releasever – $basearch #baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/ mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi failovermethod=priority priority=1 ← 行追加
remiのリポジトリを使用してMySQLをアップデートする
[root@host2 ~]# yum --enablerepo=remi install mysql
MySQL関連のパッケージをアップデートしたら、依存関係でPHP5.3.6がインストールされます。
Apacheを再起動
[root@host2 ~]#/etc/rc.d/init.d/httpd reload
バージョン確認
[root@host2 ~]# rpm -q php php-5.3.6-1.el5.remi [root@host2 ~]# rpm -q php-mcrypt php-mcrypt-5.3.6-1.el5.remi [root@host2 ~]# rpm -q mysql mysql-5.1.56-1.el5.remi