httpd編譯安裝php

megachen發表於2018-10-17
  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


相關文章