码迷,mamicode.com
首页 > Web开发 > 详细

Centos 7 编译php 7.2.10

时间:2018-10-07 00:40:21      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:har   lib   string   soap   centos 7   file   lin   with   regex   

步骤一:安装依赖

yum install -y wget gcc gcc-c++ gd-devel zlib-devel libjpeg-devel libpng-devel libiconv-devel freetype-devel libxml2 libxml2-devel openssl openssl-devel curl-devel libxslt-devel libmcrypt-devel mhash mcrypt

步骤二:下载php安装包

wget http://101.247.192.75/files/50030000062C2C69/cn2.php.net/distributions/php-7.2.10.tar.gz

步骤三:编译源代码

tar xvf php*
cd php*
./configure --with-openssl --with-pcre-regex --with-kerberos --with-libdir=lib --with-libxml-dir \ 
--with-mysqli=shared,mysqlnd --with-pdo-mysql=shared,mysqlnd --with-pdo-sqlite --with-gd --with-iconv \ 
--with-zlib --with-xmlrpc --with-xsl --with-pear --with-gettext --with-curl --with-png-dir --with-jpeg-dir \ 
--with-freetype-dir --with-fpm-user=nginx --with-fpm-group=nginx --enable-mysqlnd --enable-zip \ 
--enable-inline-optimization --enable-shared --enable-libxml --enable-xml --enable-bcmath --enable-shmop \ 
--enable-sysvsem --enable-mbregex --enable-mbstring --enable-ftp --enable-pcntl --enable-sockets --enable-soap \ 
--enable-session --enable-opcache --enable-fpm --enable-maintainer-zts --enable-fileinfo \ 
--with-mysqli=/usr/local/mysql
make
make install

步骤四:复制文件

cp php.ini-development /usr/local/lib/php.ini
cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
cp sapi/fpm/php-fpm /usr/local/bin
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

步骤五:启动php-fpm

service php-fpm start
chkconfig --add php-fpm

Centos 7 编译php 7.2.10

标签:har   lib   string   soap   centos 7   file   lin   with   regex   

原文地址:https://www.cnblogs.com/iove/p/9749103.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!