Apache HTTP 服务器简易安装指南
Apache HTTP 服务器从下载到安装只需要七步1.下载
到http://httpd.apache.org/download.cgi下载稳定版http://labs.renren.com/apache-mirror//httpd/httpd-2.2.21.tar.gz
2.解压缩
执行指令
tar -zxvf httpd-2.2.21.tar.gz 完成后当前目录会出现文件夹httpd-2.2.21
3.配置
执行指令
./configure 如果你想指定安装路径可以带参数
./configure --prefix=PREFIX 如:
./configure --prefix=/usr/pkg/apache \如果你不指定安装路径,默认的是/usr/local/apache2
4.编译
执行指令
make
5.安装
执行指令
make install
6.定制
用一个文本编辑器打开 PREFIX/conf/httpd.conf 文件,进行编辑,比如指定端口神马的。你可以跳过这步。具体可参考http://httpd.apache.org/docs/2.2/7.运行
启动服务器:
$ /usr/local/apache2/bin/apachectl -k start在IE浏览器里面输入 http://your-server-name 就可以看到一个欢迎页。
停止服务器
$ /usr/local/apache2/bin/apachectl -k stop
页:
[1]