Centos - php5.4升級到7.1 yum安裝

查看當前 PHP 版本php

1
php - v

查看當前 PHP 相關的安裝包,刪除之mysql

 

1
2
3
4
5
yum list installed |  grep  php
 
yum remove php
 
yum remove php-*

  

更換 RPM 源

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

  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
相關文章
相關標籤/搜索