1、查看配置选项

./configure-h

2、配置Apache

./configure\--prefix=/usr/local/apache2\//指定Apache的安装位置--sysconfdir/etc/httpd/\//指定Apache配置文件的存放位置--with-z=/usr/local/zlib///指定zlib库文件的位置--with-included-apr\//使用捆绑APR/APR_Util的副本--enable-so\//以动态共享对象DSO编译--enable-deflate=shared\//缩小传输编码的支持--enable-expires=share\//期满头控制--enavle-rewrite=share\//基于规则的url操控--enable-static-support//建立一个静态链接版本的支持

3、开启、关闭Apache

启动

/usr/local/apache2/bin/apachectlstart

关闭

/usr/local/apache2/bin/apachectlstop

4、查看80端口是否开启

netstat-tnl|grep80

5、添加自启动

echo"/usr/local/apache2/bin/apachectlstart">>/etc/rc.d/rc.local