如何安装编译apache和resin?
PACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0 class=Apple-style-span 前言:前段时间,对公司前台多机分布方案的做了一些探索,总结了一些东西,贴出来分享。 类似内容网上比较多,但是都不够详细,我第一次弄时费力不少,希望后来人可以更方...全部
PACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0 class=Apple-style-span 前言:前段时间,对公司前台多机分布方案的做了一些探索,总结了一些东西,贴出来分享。
类似内容网上比较多,但是都不够详细,我第一次弄时费力不少,希望后来人可以更方便一些。
一。 安装编译apache ◆从编译apache官网上下载apache最新的 release版本2。2。6 unix版本取httpd-2。
2。6。tar。gz ◆解开包 gunzip httpd-2。2。6。tar。gz tar xvf httpd-2。2。6。tar ◆编译安装 进入解压后的目录httpd-2。2。6,依次执行 。
/configure --prefix=/*要安装apache的目录*/ --enable-so make make install 成功后apache就安装到前面指定的目录了
二。启动apache 进入编译apache安装目录 ◆修改apache/conf/httpd。
conf Listen 80 修改80为需要的端口如 11280 ◆启动 进入apache/bin/执行: 。/apachectl start ◆打开浏览起访问 http://ip: 11280
三。
编译安装resin 。/configure --prefix=/data/aoxj/artest/resin --with-apxs=/data/aoxj/artest/apache/bin/apxs --with-apache=/data/aoxj/artest/apache make make install 上述操作除了编译安装resin外(其实不做这些操作,resin本身也是可以跑起来的),还会修改apache,包括: ◆copy mod_caucho。
so到apache目录(就是前面指定的--with-apache=/data/aoxj/artest/apache)的modules ◆v修改apache的配置文件conf/httpd。conf,自动增加以下内容 LoadModule caucho_module ***/modules/mod_caucho。
so ResinConfigServer localhost 6802 CauchoConfigCacheDirectory /tmp CauchoStatus yes
四。配置resin 需要修改resin。
conf文件 cluster srun server-id=a host=192。168。0。1 port=6802/ srun server-id=a host=192。168。0。1 port=6802/ /cluster
五。
启动resin 运行resin/bin/httpd。sh 注意一定要加-server,否则resin启动后是监听80/8080这样的端口,而不是上面cluster设置里面的6802 。/httpd。
sh -server a start 这样resin才会监听6802,建议手工telnet确认一下。如果resin启动不正确,后面编译apache启动后访问resin就会失败,然后在页面报503错误。
以后stop/restart 时也需要加-server
六。配置编译apache 确认conf/httpd。conf文件中的以下内容 ◆LoadModule caucho_module ***/modules/mod_caucho。
so 检查mod_caucho。so是否存在 ◆ResinConfigServer localhost 6802 这个ResinConfigServer只能出现一行,如果resin有多台,请在这里指定的那台resin配置文件中的cluster中配置其他机器的ip/port ◆CauchoConfigCacheDirectory /tmp ◆CauchoStatus yes七。
最后修改的配置为:LoadModule caucho_module /data/aoxj/artest/apache/modules/mod_caucho。so ResinConfigServer 192。
168。0。1 6802 AddHandler caucho-request 。action CauchoConfigCacheDirectory /tmp CauchoStatus yes八。
web访问 启动编译apache用浏览器访问apache的端口,注意不是访问resin的端口。收起