LINUX下为apache 和 PHP 添加模块

LINUX下为apache 和 PHP 添加模块

https://www.path8.net/tn/archives/4717

/opt/lampp/bin/httpd -V
/opt/lampp/bin/httpd -M
/opt/lampp/bin/httpd -l

1. 先编辑下这个文件
vim /opt/lampp/build/libtool
把第一行 换成 #!/bin/bash

2. 用apxs 给apache编译增加模块
# 样例 /usr/local/apache2/bin/apxs -i -c -a mod_deflate.c

# http://mpm-itk.sesse.net
cd /opt/lampp/src
wget http://mpm-itk.sesse.net/mpm-itk-2.4.7-04.tar.gz
tar xvf mpm-itk-2.4.7-04.tar.gz
cd mpm-itk-2.4.7-04
./configure –with-apxs=/opt/lampp/bin/apxs
make && make install

vim /opt/lampp/etc/httpd.conf
LoadModule mpm_itk_module modules/mpm_itk.so

3. 用phpize 给PHP 增加模块
cd /opt/lampp/src
wget https://pecl.php.net/get/mcrypt-1.0.1.tgz
tar zxvf mcrypt-1.0.1.tgz
cd mcrypt-1.0.1
# 执行一下这个命令
/opt/lampp/bin/phpize

# 然后通过configure来配置
./configure –with-php-config=/opt/lampp/bin/php-config
make && make install

vim /opt/lampp/etc/php.ini
extension=”mcrypt.so”

原文链接:,转发请注明来源!

发表评论