httpd编译安装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
posted @ 2018-10-17 21:47  gogogo11  阅读(211)  评论(0编辑  收藏  举报