redhat6.2下架设apache2.2服务器
首先下载apache2.2的压缩包httpd-2.2.24.tar.bz2新建用户apache1,修改apache1的密码
把apache的压缩包上传到/home/apache1/下,使用tar -jxvf httpd-2.2.24.tar.bz2解压缩
解压缩之后
进入目录:cd httpd-2.2.24
编译:./configure --prefix=/usr/local/apache --enable-so --enable-proxy --enable-proxy-http --enable-proxy-balancer --enable-modules=all --enable-mods-shared=all
(注意一点,我们如果需要查看apache的服务器状态,需要在编译的时候加上这一模块
–enable-module=so)
全部的编译命令为:
./configure --prefix=/usr/local/apache --enable-so --enable-proxy --enable-proxy-http --enable-proxy-balancer --enable-modules=all --enable-mods-shared=all --enable-module=so
然后使用make
make install命令完成编译。
redhat 6.2下默认是会装在/usr/local/apache/下,所以,如果没有权限,使用root用户把此目录赋予apache用户权限。
配置文件修改:/usr/local/apache/conf/httpd.conf
详细讲解配置文件:
如果想要apache服务器的状态,需要在httpd.conf中加入图一的东西,继续加入ExtendedStatus On
会让server-status变成完整的部分。
第二部分,apache服务器的端口:Listen为设置端口的部分。
第三张图:编译的时候有可能报错,就把ServerName 前面的注释去掉。
我们想要的到的apache的server-status的网页为:
网页也可以变为动态变化的网页加入http://192.168.3.64:8888/server-status?refresh=1
apache还有一个server-info的界面模块可以编译:
编译的时候,加入 --enable-info
界面为:
http://ip:8888/server-status?auto
阿帕奇运行的信息
页:
[1]