前回の続き、次はPHPのインストール。
# yum install httpd
途中でファイルサイズを聞かれるので[y]で続行、これでインストール完了。
# /etc/init.d/httpd restart
apacheの再起動を行うとPHPがインストールされています。
このままだとPHPのバージョンが4.3.9なんで5にアップデート。
まずはyumのリポジトリを変更
# vi /etc/yum.repos.d/CentOS-Base.repo
[centosplus]のenabled=0をenabled=1に変更
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
それからPHPをアップデート
# yum update php
apacheの再起動を行うとPHPが5.1.6にアップデートされています。
あと、使いそうなパッケージはあらかじめインストールしておきましょう。
# yum install php-mysql
# yum install php-mbstring
# yum install php-gd
インストールされているパッケージは
# yum list | grep php
で確認できます。
スポンサードリンク
サーバー OR 技術系に関するエントリー
メールで購読する
twitterで購読する
RSSで購読する
コメントする