httpd编译安装php

  1. 云栖社区>
  2. 博客>
  3. 正文

httpd编译安装php

megachen 2018-10-17 21:47:00 浏览210 评论0

摘要: wget http://hk1.php.net/distributions/php-5.6.31.tar.gz yum groupinstall "Development Tools" yum install zlib openssl perl yum install httpd httpd-devel tar -xf php.

  1. wget http://hk1.php.net/distributions/php-5.6.31.tar.gz
  2. yum groupinstall "Development Tools"
  3. yum install zlib openssl perl
  4. yum install httpd httpd-devel
  5. tar -xf php.tar.gz -C /usr/src
  6. cd /usr/src/php
  7. yum install mariadb mariadb-server php-mysql
  8. 配置

./configure --prefix /usr/local/php56 --with-apxs2=/usr/local/httpd24/bin/apxs  --with-config-file-path=/etc/ --with-config-file-scan-dir=/etc/php.d --with-libxml-dir --with-openssl --with-zlib --enable-mbstring --with-mysql

其中php与httpd的联系就是apxs, 与mysql的联系就是with-mysql
  1. make && make install
  2. cp php.ini-development /etc/php.ini
  3. mkdir /etc/php.d/
  4. 修改httpd.conf
【云栖快讯】一站式开发者服务,海量学习资源免费学  详情请点击

网友评论