1. 先决条件
下载 并安装ntp from:
NTP
homepage 下载 并安装perl5
2. 下载apache http server
httpd-2.2.8.tar.gz
3. 解压缩
> tar zxvf httpd-2.2.8.tar.gz
4. 配置, 启动DSO动态模块支持
> ./configure
--prefix=/usr/local/apache \
> --with-included-apr \
>
--enable-mods-shared=most \
>
--enable-modules=most \
>
--enable--enable-so
5. make & install
> make
> sudo make install
5. 修改配置文件
> cd /usr/local/apache/conf
> sudo vi httpd.conf
增加下面行:
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule dir_module modules/mod_dir.so
LoadModule mime_module modules/mod_mime.so
6. 链接启动脚本
> cd ../bin
> sudo ln -s /usr/local/apache/bin/apachectl /etc/init.d/apache
> sudo chmod u+x /etc/init.d/apache
7. 启动测试
> sudo /etc/init.d/apache start
> w3m localhost
...It Works!
> sudo /etc/init.d/apache stop