CentOS6 安装 php7.2+
1、配置安装yum源 EPEL and Remi repository
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum install -y http://rpms.remirepo.net/enterprise/remi-release-6.rpm
2、安装 yum-utils
yum install -y yum-utils
3、 yum-config-manager 管理要安装的版本,以下3个,选择自己要安装的版本执行
yum-config-manager --enable remi-php72 [Install PHP 7.2]
如果要安装php7.0或php7.1
# yum-config-manager --enable remi-php70 [Install PHP 7.0]
# yum-config-manager --enable remi-php71 [Install PHP 7.1]
4、开始安装
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum install -y http://rpms.remirepo.net/enterprise/remi-release-6.rpm
yum install -y yum-utils
yum-config-manager --enable remi-php72
yum install -y php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo php-fpm php-sodium php-posix php-xml php-mbstring php-bcmath php-gd php-opcache php-pdo php-ssh2 php-soap
# 分割
5、查看版本
php -v
PHP 7.2.0 (cli) (built: Nov xxxxxxx) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
作者:杨鑫newlfe
来源:CSDN
原文:https://blog.csdn.net/u012965373/article/details/80592163
版权声明:本文为博主原创文章,转载请附上博文链接!