本文我們主要跟大家分享CentOS7yum安裝PHP7.2實例方法,希望能幫助大家。
如果之前已經安裝我們先卸載一下
yum -y remove php*
#由於linux的yum來源不存在php7.x,所以我們要更改yum來源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum 安裝php72w和各種拓展,選自己需要的即可
yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
如果之前已經安裝我們先卸載一下
yum -y remove php*
由於linux的yum來源不存在php7.x,所以我們要更改yum來源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
以上是CentOS7yum安裝PHP7.2實例方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!