首页 > 代码库 > centos 安装php7

centos 安装php7

yum安装php7

删除之前的版本

# yum remove php*

rpm 安装 Php7 相应的 yum源

CentOS/RHEL 7.x:

# 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

CentOS/RHEL 6.x:
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

yum安装php7

yum install php70w php70w-opcache
安装其他插件(选装)
注:如果安装pear,需要安装php70w-devel
php70w
php70w-bcmath
php70w-cli
php70w-common
php70w-dba
php70w-devel
php70w-embedded
php70w-enchant
php70w-fpm
php70w-gd
php70w-imap
php70w-interbase
php70w-intl
php70w-ldap
php70w-mbstring
php70w-mcrypt
php70w-mysql
php70w-mysqlnd
php70w-odbc
php70w-opcache
php70w-pdo
php70w-pdo_dblib
php70w-pear
php70w-pecl-apcu
php70w-pecl-imagick
php70w-pecl-xdebug
php70w-pgsql
php70w-phpdbg
php70w-process
php70w-pspell
php70w-recode
php70w-snmp
php70w-soap
php70w-tidy
php70w-xml
php70w-xmlrp

centos 安装php7