首页 > 代码库 > 安装 Apache 源代码包

安装 Apache 源代码包

把自己在网易博客的文章迁移过来

cd /lamp/httpd-2.2.9
./configure --prefix=/usr/local/apache2/
--sysconfdir=/usr/local/apache2/etc/ --with-included-apr --enable-dav
--enable-so --enable-deflate=shared --enable-expires=shared
--enable-rewrite=shared
make
make install
启动 Apache 测试:
/usr/local/apache2/bin/apachectl restar
查看进程:
ps -le | grep httpd
查看 apache 模块:
/usr/local/apache2/bin/apachectl –h
#share 动态模块或动态库文件
Php5 rewrite
#static 静态模块或表态库文件
Server-status
Userdir
Virtual host
测试:
http://localhost/index.html
“it works”
设置 Apache 随机启动
Vi /etc/rc.local
/usr/local/apache2/bin/apachectl restart

安装 Apache 源代码包