参考文章
http://blog.csdn.net/21aspnet/article/details/47708763
step 1
php 7.0下载地址
http://cn2.php.net/distributions/php-7.0.2.tar.gz
7.1 版本http://php.net/get/php-7.1.0.tar.gz/from/a/mirror
step 2
yum install libxslt-devel
step 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-jpeg-dir \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--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 \
--disable-fileinfo
step 4
make ZEND_EXTRA_LIBS='-liconv'
stet 5
make install
step 6
# 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
step 7
# /etc/init.d/php-fpm
问题解决列表
1、解决error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distrib
http://www.admpub.com/blog/?post=169
2、解决make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1错误
http://www.itbulu.com/disable-fileinfo.html
http://my.oschina.net/maczhao/blog/365176
3、解决make: *** [sapi/cli/php] Error 1
http://lxsym.blog.51cto.com/1364623/753199/
Linux环境PHP7.0安装
最新推荐文章于 2023-12-28 13:54:57 发布