PHP7 安装

参考文档:

Linux 服务器PHP7的安装,之前在服务器上已安装  php 5.6 版本,所以我没有去安装一些相关的依赖库了
下载
# cd /home/soft
# tar zxvf  php-7.1.7.tar.gz  
# cd  php-7.1.7
查看配置参数
# ./configure --help
# ./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysqli=mysqlnd --with-mysql-sock=/data/mysql/mysqld.sock --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-openssl --with-pcre-regex --with-pdo-mysql=/usr/local/mysql --with-pdo-sqlite --with-pear --with-png-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

安装出错
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
# yum install -y libxslt libxslt-devel

OK 继续 配置  ,  完成后 , 编译 , 安装 
# make && make install

安装目录
# cd /home/soft/php-7.1.7 
# cp php.ini-development /usr/local/php7/etc/php.ini
# cd /usr/local/php7/etc
# cp php-fpm.conf.default php-fpm.conf
# cd /usr/local/php7/etc/php-fmp.d/
# cp www.conf.default www.conf

配置启动脚本
# cd /home/soft/php-7.1.7 
# cp sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm
# chmod 755 /etc/init.d/php7-fpm
# vim /usr/local/php7/etc/php-fpm.conf
在这文档中找到  
;pid = run/php-fpm.pid
pid = /usr/local/php7/var/run/php-fpm.pid
# chkconfig --add php7-fpm
# chkconfig php7-fpm on

启动
# /etc/init.d/php7-fpm start
关闭
# service php7-fpm stop





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值