继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

php 7.0 编译安装

linux零基础学习视频
关注TA
已关注
手记 276
粉丝 29
获赞 121


linux版本:64位CentOS 6.5

php版本:php-7.0.2


1、下载安装包(tar)

http://php.net/get/php-7.0.2.tar.gz/from/a/mirror


2、解压安装

# tar zxvf php-7.0.2.tar.gz

# cd php-7.0.2


yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel pcre-devel libxslt-devel curl curl-devel openssl-dev* 


./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 \

 --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



 编译:

 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



需要注意的是php7中www.conf这个配置文件配置phpfpm的端口号等信息,如果你修改默认的9000端口号需在这里改,再改nginx的配置


启动

#  /etc/init.d/php-fpm

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP