How to configure PHP 5 on Centos

Published on Author bloggereightLeave a comment

1. Edit CentOS-Base.repo

vi /etc/yum.repos.d/CentOS-Base.repo

2. Enable CentOSPlus by changing:

#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=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
to:
#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
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

3. Run yum
yum install php – to freshly install PHP5
Or
yum update php – to update PHP5 (in case PHP4 was already installed)
4. Restart Apache
/etc/init.d/httpd restart

Comments

comments

Leave a Reply

Your email address will not be published. Required fields are marked *