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

php7.2.6编码编译安装

时间:2018-06-15 22:41:04      阅读:692      评论:0      收藏:0      [点我收藏+]

标签:init.d   evel   code   lxml   iconv   line   ftp   string   soc   

mkdir /tools && cd /tools && wget http://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz

tar xf libiconv-1.15.tar.gz

cd libiconv-1.15

./configure --prefix=/usr/local/libiconv

make -j grep processor /proc/cpuinfo |wc -l && make install

yum install make gcc gcc-c++ zlib-devel libxml2-devel libxslt-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel openssl-devel bzip2-devel gmp-devel libmcrypt-devel readline-devel mhash mcrypt openldap-devel -y

cd /tools && wget -O php-7.2.6.tar.gz http://cn2.php.net/get/php-7.2.6.tar.gz/from/this/mirror

tar xf /tools/php-7.2.6.tar.gz

cd /tools/php-7.2.6

./configure --prefix=/application/php7.2.6 --with-pdo-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-png-dir --with-jpeg-dir --with-zlib-dir --with-zlib --with-libxml-dir --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-sysvshm --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=www --with-fpm-group=www --enable-ftp --enable-opcache --with-bz2 --with-gettext --with-libdir=lib64 --with-pcre-regex --with-pdo-sqlite --with-pear --enable-zip --with-ldap=shared --with-ldap-sasl --disable-debug --enable-shared --with-gettext --enable-session --without-gdbm --disable-fileinfo

make -j grep processor /proc/cpuinfo |wc -l

make install

ln -s /application/php7.2.6 /application/php

cp /tools/php-7.2.6/php.ini-production /application/php/lib/php.ini

cp /application/php/etc/php-fpm.conf.default /application/php/etc/php-fpm.conf

cp /application/php/etc/php-fpm.d/www.conf.default /application/php/etc/php-fpm.d/www.conf

cp /tools/php-7.2.6/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

chmod +x /etc/init.d/php-fpm

echo “/etc/init.d/php-fpm start” >> /etc/rc.local

vim /application/php/lib/php.ini 修改以下项,去掉#号

sed -i ‘s/;extension=mysqli/extension=mysqli/g‘ /application/php/lib/php.ini

/etc/init.d/php-fpm start

排错
如果make时出现以下样式错误
collect2: error: ld returned 1 exit status
make: *** [sapi/fpm/php-fpm] Error 1

vim Makefile :118行

EXTRA_LIBS = -lcrypt -lz -lexslt -lresolv -lcrypt -lrt -lpng -lz -ljpeg -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -lfreetype -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxslt -lxml2 -lz -ldl -lm -lssl -lcrypto -lcrypt -liconv

php7.2.6编码编译安装

标签:init.d   evel   code   lxml   iconv   line   ftp   string   soc   

原文地址:http://blog.51cto.com/7726736/2129968

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