系统环境【 Red Hat Enterprise Linux Server release 5.4】
httpd安装:
1、下载httpd-2.4.2.tar.gz、 pcre-8.30.tar.gz、 apr-1.4.6.tar.gz、 apr-util-1.4.1.tar.gz安装包放到\root目录下
2、使用 tar -zxvf 解压上述四个压缩包
3.1、cd pcre-8.30; ./configure --prefix=/opt/pcre 【我将这些软件安装在opt目录下了】
3.2、执行 make 和 make install
4.1 cd apr-1.4.6; ./configure --prefix=/opt/apr
4.2、执行 make 和 make install
5.1 cd apr-util-1.4.1 ; ./configure --prefix=/opt/apr-unit –with-apr=/opt/apr
5.2、执行 make 和 make install
6、cd httpd-2.4.2; ./configure --prefix=/opt/apache2 --with-apr=/opt/apr/ --with-apr-util= /opt/apr-util/ --with-pcre= /opt/pcre --enable-module=so
[应用服务器是resin 所以添加了--enable-module=so 配置项]
7、make 和make install
resin安装:
1、下载并解压resin安装包,进入resin目录
2、配置 ./configure --prefix=/opt/resin3 --with-apxs=/opt/apache2/bin/apxs
3、make 和 make insall
httpd的配置:
1、修改了监听端口 Listen 8081
2、修改了文件所在位置 DocumentRoot “/var/www/html”
3、设置VirtualHost 端口与文档位置的设置保持一致
4、在编译的时候添加了对resin的支持,因此在httpd中设置ResinConfigure 中端口与resin中监听端口保持一致
resin的配置:
1、修改了resin查看文档的路径 <web-app id="/" root-directory="" />