Centos6安装php7.2

1、配置安装yum源 EPEL and Remi repository


# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm


# yum install http://rpms.remirepo.net/enterprise/remi-release-6.rpm


2、安装 yum-utils


# yum install 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 php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo php-fpm



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

你可能感兴趣的:(php)