1.检查当前安装的PHP包
yum list installed | grep php
2.Type in the following to download and install the required files:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm
3.Now to enable the REMI repository globally:
nano /etc/yum.repos.d/remi.repo
做如下修改
[remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1 #将0改成1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
CTRL-O 保存, CTRL-X退出
4.安装php
sudo yum install php php-gd php-mysql php-mcrypt
网友评论