Linux下Apache整合Resin

来源:互联网 发布:物性参数查询软件 编辑:程序博客网 时间:2024/05/21 15:40

1Apache安装
# tar zxvf httpd-2.2.8.tar.gz

# cd httpd-2.2.8  
# ./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-so 
--prefix
用来指定路径
--enable-modules
用来指定系统允许使用的功能扩展模块的类型,这里指定为so类型。
--enabel-so
用来指定允许使用DSODynamic Share Object动态共享对象)。
# make
# make install
设置apache自动启动:
Apache的启动文件apachectl写入rc.local
/usr/local/httpd/bin/apachectl start

2Resin安装

# tar zxvf resin-3.0.25.tar.gz
# cd resin-3.0.25  
# ./configure --prefix=/usr/local/ resin_3.0.25 --with-apache=/usr/local/httpd
# make
# make install
此时已经生成Resin连接Apache2.so文件了,其存在与$APACHE_HOMEe/modules/mod_caucho.so

conf/httpd.conf中就会多出以下语句:

LoadModule caucho_modules modules/mod_caucho.so    
 ResinConfigServer localhost 6802    

 

分别先后启动ResinApache
端口转发后访问:

http://localhost:9000/    显示it works

http://localhost:9000/caucho-status 可以看到Resin的状态页面

 

===============================

如果是已经装好了Resin后要装Apache(比如Apache要升级了哈)

简单可以这样整合,三步:

1:单独装完Apache或是升级的更高的版本

2:修改apache/conf/httpd.conf文件

在最后添加

#
# mod_caucho Resin Configuration
#

LoadModule caucho_module /usr/local/apache_2.2.8/modules/mod_caucho.so

ResinConfigServer localhost 6802
CauchoConfigCacheDirectory /tmp
CauchoStatus yes

 

另外如果Log 的路径或是设置了cronlog的也把相应的修改一下

3:之后一定要确保/usr/local/apache_2.2.8/modules/路径下面有mod_caucho.so模块

如果没有要不从老系统Copy一个,要不单独下Resin源代码编译下mod_caucho.so模块

 

OK,启动Resin和Apache就行了。。。

 

 

 

原创粉丝点击