经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库运维 » LinuxShell » 查看文章
Centos 7 编译php 7.2.10
来源:cnblogs  作者:青春往事  时间:2018/10/8 8:58:43  对本文有异议

步骤一:安装依赖

  1. 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安装包

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

步骤三:编译源代码

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

步骤四:复制文件

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

步骤五:启动php-fpm

  1. service php-fpm start
  2. chkconfig --add php-fpm
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号