这里使用 Webtatic EL6的YUM源来安装php5.4,我们首页安装Webtatic EL6 YUM源
rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
安装php5.4
yum install php54w
这里使用 Webtatic EL6的YUM源来安装php5.4,我们首页安装Webtatic EL6 YUM源
CentOS/RHEL 6.x:
1 | rpm -Uvh http: //mirror .webtatic.com /yum/el6/latest .rpm |
CentOS/RHEL 5.x:
1 | rpm -Uvh http: //mirror .webtatic.com /yum/el5/latest .rpm |
Now you can install php by doing:
1 | yum install php54w |
安装php其他组件
1 | yum install php54w-mysql php54w-gd libjpeg* php54w-imap php54w-ldap php54w-odbc php54w-pear php54w-xml php54w-xmlrpc php54w-mbstring php54w-mcrypt php54w-bcmath php54w-mhash libmcrypt |
yum 安装php的时候,用命令yum -y install php*遇到提示php53-common conflicts with php-common这个错误信息,这时候可以看到
Error: php53-common conflicts with php-common
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
这样的错误提示。
这样在重新安装的时候 用命令 yum -y install php* --skip-broken 就可以解决问题了