查看當前 PHP 版本php
1
|
php -
v
|
查看當前 PHP 相關的安裝包,刪除之mysql
1
2
3
4
5
|
yum list installed |
grep
php
yum remove php
yum remove php-*
|
1
2
3
4
5
6
7
8
9
|
#Centos 5.X:
rpm -Uvh http:
//mirror
.webtatic.com
/yum/el5/latest
.rpm
#CentOs 6.x:
rpm -Uvh http:
//mirror
.webtatic.com
/yum/el6/latest
.rpm
#CentOs 7.X:
rpm -Uvh https:
//mirror
.webtatic.com
/yum/el7/epel-release
.rpm
rpm -Uvh https:
//mirror
.webtatic.com
/yum/el7/webtatic-release
.rpm
|
php 7.0/7.1/7.2 分別表示爲 70w/71w/72w
目前(2018-5-4)
CentOs 6.x 的 RPM 源中最高只有 7.1
CentOs 7.x 的 RPM 源中有 7.2web
yum install -y php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo php71w-xml php71w-ldap php71w-mcryptsql
php -vruby
啓動PHP-fpm bash
systemctl start php-fpm