Apache 的编译安装

直接看步骤:

1.安装必备环境:gcc、pcre ..................................

2.安装apr、apr-util

3.解压编译安装Apache:

./configure --prefix=/usr/local/apache-2.4 --enable-so --enable-cgi --enable-modules=most --with-apr=/usr/local/apr1.5/ --with-apr-util=/usr/local/apr-util/

 注意:

--prefix=/usr/local/apache 安装路径(必须)

--sysconfdir=/etc/httpd24 配置文件路径

--enable-so 允许运行时加载DSO模块(必须)

--enable-ssl 如果不加载将无法使用使用https(必须)

--enable-cgi 允许使用cgi脚本

--enable-rewrite 支持URL重写机制

--with-zlib 支持网络通用压缩库(必须)

--with-pcre 支持pcre(必须)

--with-apr=/usr/local/apr 指定apr的安装路径(必须)

--with-apr-util=/usr/local/apr-util/ 指定apr-util的安装路径(必须)

--enable-modules=most 启用大多数常用的模块(必须)

--enable-mpms-shared=all 启用MPM所有支持的模式

--with-mpm=event 默认使用enevt模式

4.make&&make install

5.运行apache: /usr/local/apache-2.4/bin/httpd

6.测试

后续查阅资料更详细:http://blog.csdn.net/xuxingzhuang/article/details/51592363

./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd  --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre=/usr/local/pcre  --with-apr=/usr/local/apr  --with-apr-util=/usr/local/apr-util  --enable-mods-shared=most --enable-mpms-shared=all  --with-mpm=event

原文地址:https://www.cnblogs.com/chenjw-note/p/5727703.html