- 2010-09-02 (木) 16:14
- CentOS
VirtualBox 上の CentOS 5.x を開発環境として使っているのですが、標準レポジトリからインストールされる PHP はバージョン 5.1.x 系です。開発中の動作環境が 5.2.x 系に上がったのでこの機会に開発環境も 5.2.x 系に変更してみました。
まずは古い PHP を削除します。
# yum -y remove php # yum -y remove php-common # yum -y remove curl
/etc/php.ini は /etc/php.ini.rpmsave にリネームされますのでバックアップを取ってなくてもとりあえず大丈夫っぽい。
次に、比較的新しい PHP や MySQL, Apache なんかを配布してくださっている(多謝)
Utter Ramblings のレポジトリを追加します。以下のコマンドを実行して、RPM-GPG-KEY をインポートします。
# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
/etc/yum.repos.d/utterramblings.repo を以下の内容で作成します。
[utter] name=Jason’s Utter Ramblings Repo baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/ enabled=0 gpgcheck=1 gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
常用ではないので、enabled=0 にしています。
次に以下のコマンドを実行して、PHP をインストールします。
# yum --enablerepo=utter -y install php # yum --enablerepo=utter -y install php-mysql # yum --enablerepo=utter -y install php-mcrypt # yum --enablerepo=utter -y install php-mbstring # yum --enablerepo=utter -y install php-devel
httpd を再起動して動作確認します。
以下の関連(しているかもしれない)記事もどうぞ!
コメント:0
トラックバック:0
- このエントリーのトラックバックURL
- http://digitalbox.jp/happy-go-lucky-computing/centos/howto-install-php52-on-centos5/trackback/
- Listed below are links to weblogs that reference
- CentOS 5.x に PHP 5.2.x をインストールする from digitalbox
