centos7.3 yum php7.1
要安装,首先必须将对应于您的CentOS / RHEL版本的Webtatic EL yum存储库信息添加到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
您可以通过执行以下操作来安装PHP 7.1yum install mod_php71w php71w-opcache
安装php扩展包yum install php71w-mysql php71w-bcmath php71w-gd php71w-mcrypt php71w-mbstring php71w-odbc php71w-xml
重启apache
systemctl restart httpd
可以测试 phpinfo()
以下为扩展包可参考:
PackagesPackageProvidesmod_php71wphp71w, mod_php, php71w-zts
php71w-bcmath
php71w-cliphp-cgi, php-pcntl, php-readline
php71w-commonphp-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php71w-dba
php71w-devel
php71w-embeddedphp-embedded-devel
php71w-enchant
php71w-fpm
php71w-gd
php71w-imap
php71w-interbasephp_database, php-firebird
php71w-intl
php71w-ldap
php71w-mbstring
php71w-mcrypt
php71w-mysqlphp-mysqli, php_database
php71w-mysqlndphp-mysqli, php_database
php71w-odbcphp-pdo_odbc, php_database
php71w-opcachephp71w-pecl-zendopcache
php71w-pdophp71w-pdo_sqlite, php71w-sqlite3
php71w-pdo_dblibphp71w-mssql
php71w-pear
php71w-pecl-apcu
php71w-pecl-imagick
php71w-pecl-memcached
php71w-pecl-mongodb
php71w-pecl-redis
php71w-pecl-xdebug
php71w-pgsqlphp-pdo_pgsql, php_database
php71w-phpdbg
php71w-processphp-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php71w-pspell
php71w-recode
php71w-snmp
php71w-soap
php71w-tidy
php71w-xmlphp-dom, php-domxml, php-wddx, php-xsl
php71w-xmlrpc