php7 安装步骤

1、下载源码
2、解压
3、执行配置
./configure --prefix=/usr/local/php
–with-curl
–with-freetype-dir
–with-gd
–with-gettext
–with-iconv-dir
–with-kerberos
–with-libdir=lib64
–with-libxml-dir
–with-mysqli
–with-openssl
–with-pcre-regex
–with-pdo-mysql
–with-pdo-sqlite
–with-pear
–with-png-dir
–with-xmlrpc
–with-xsl
–with-zlib
–with-apxs2
–enable-fpm
–enable-bcmath
–enable-libxml
–enable-inline-optimization
–enable-gd-native-ttf
–enable-mbregex
–enable-mbstring
–enable-opcache
–enable-pcntl
–enable-shmop
–enable-soap
–enable-sockets
–enable-sysvsem
–enable-xml
–enable-zip

报错执行
yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel mysql pcre-devel httpd-devel

编译:
make && make install

拷贝配置和执行文件
cp php.ini-development /usr/local/php/lib/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm

原文链接:https://www.cnblogs.com/grimm/p/5299212.html
本文链接:https://blog.csdn.net/Felix_CB/article/details/91918629

你可能感兴趣的:(PHP)