Linux环境PHP7.0安装

参考文章
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/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值