日期:2014-05-16  浏览次数:20760 次

linux下apache安装配置
1. http://www.apache.org/dist/httpd/httpd-2.0.64.tar.gz下载httpd-2.0.63.tar.gz 源码安装包
2. [root@u3ccentos55 users]#tar zxvf httpd-2.0.44.tar.gz                              //解压
3. [root@u3ccentos55 httpd-2.0.64]#./configure --prefix=/users/httpd-2.0.64            //生成默认配置
4. [root@u3ccentos55 httpd-2.0.64]#make                                         //编译
5. [root@u3ccentos55 httpd-2.0.64]#make install                                   //安装
6. 修改httpd.conf配置,该文件在/etc/httpd/conf目录下

1)找到Listen 80,为了避免和tomcat冲突,可修改成81
2)找到#ServerName xxxxx:80,把ServerName前的#号去掉,
把xxxxx改成自己的机器全名,如我改成ServerName pig.home.cn

7. 启动Apache:

#cd  /users/httpd-2.0.64/bin
#./apachectl start

测试Apache是否工作了,激动人心的时刻到了,到浏览器里输入:
http://localhost