1.apache的下载

[root@Nomysql]#cd/usr/local/src/

[root@Nosrc]#wgethttp://mirrors.sohu.com/apache/httpd-2.4.18.tar.bz2

2.解压

[root@Nosrc]#tarjvxfhttpd-2.4.18.tar.bz2

3.配置编译参数

[root@Nosrc]#cdhttpd-2.4.18

[root@Nohttpd-2.4.18]#

./configure\

--prefix=/usr/local/apache2\

--with-included-apr\

--enable-so\

--enable-deflate=shared\

--enable-expires=shared\

--enable-rewrite=shared\

--with-pcre

--prefix指定安装到哪里,--enable-so表示启用DSO,--enable-deflate=shared表示共享的方式编译deflate

make&&makeinstall