本文主要是介绍PHP7编译与安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
yum安装环境依赖
yum install -y libxml2 libxml2-devel
yum -y install bzip2-devel libjpeg-devel curl curl-devel
yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
yum install libicu-devel
yum install libxslt-devel* -y
下载安装包后,编译与安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #etc路径不要带数字 目前发现etc带数字会有BUG ./configure - -prefix =/usr/local/php/ - -with -config -file -path =/usr/local/php/etc/ \ - -with -bz2 \ - -with -gd \ - -with -jpeg -dir \ - -with -freetype -dir \ - -with -pdo -mysql =shared,mysqlnd \ - -with -gettext \ - -with -iconv -dir \ - -with -kerberos \ - -with -libxml -dir \ - -with -mhash \ - -with -zlib -dir \ - -without -pdo -sqlite \ - -with -pear \ - -with -xmlrpc \ - -with -xsl \ - -enable -soap \ - -enable -sockets \ - -enable -sysvsem \ - -enable -xml \ - -enable -bcmath \ - -enable -libxml \ - -enable -mbregex \ - -enable -zip \ - -enable -fpm \ - -enable -mbstring \ - -enable -gd -native -ttf \ - -enable -gd -jis -conv \ - -enable -calendar \ - -enable -fpm \ - -enable -pcntl \ - -enable -shmop \ - -enable -exif \ - -enable -pcntl \ - -enable -wddx \ - -enable -intl \ - -enable -libgcc \ cp php.ini -development /usr/local/php/etc/php.ini cp php.ini -development /usr/local/php/etc/php.ini -dev cp php.ini -prod /usr/local/php/etc/php.ini -prod cp php.ini -production /usr/local/php/etc/php.ini -prod 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 sapi/fpm/init.d.php -fpm /etc/init.d/php -fpm chmod +x /etc/init.d/php -fpm service php -fpm start chkconfig php -fpm |
这篇关于PHP7编译与安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!