首页 > 代码库 > CentOS6下安装PHP7

CentOS6下安装PHP7

更新软件源[1]

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm

rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm

安装php7[2][3]

yum install php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring php70-php-mcrypt

然后重启一下httpd就已经安装好了

 

CentOS6下安装PHP7