lighttpd+resin 负载均衡

 

安装过程

1.Lighttpd:

下载最新版本:

wget http://www.lighttpd.net/download/lighttpd-1.4.16.tar.gz

tar zxvf lighttpd-1.4.16.tar.gz

cd lighttpd-1.4.16

 ./configure --prefix=/usr/local/lighttpd1416

make

make install

cp doc/rc.lighttpd.redhat /etc/rc.d/init.d/lighttpd

cp doc/sysconfig.lighttpd /etc/sysconfig/lighttpd

mkdir /etc/lighttpd

cp doc/lighttpd.conf /usr/local/lighttpd1416/conf/lighttpd.conf

chkconfig lighttpd on

接下来打开/etc/rc.d/init.d/lighttpd修改lighttpd的值如下

LIGHTTPD_CONF_PATH="/usr/local/lighttpd1416/conf/lighttpd.conf"

lighttpd="/usr/local/lighttpd1416/sbin/lighttpd"

vi /etc/sysconfig/lighttpd

LIGHTTPD_CONF_PATH=/usr/local/lighttpd1416/conf/lighttpd.conf

shell> service lighttpd start

更多关于lighttpd的配置请看lighttpd的文档 

 

2resincluster配置

下载Resintar zxvf resin.*.*.tar.gz

 Cd resin

./configure –prefix=/usr/local/resin

Make&&make install

Vi  resin.conf

 

<cluster id="app-space">

    <server id="space" address="127.0.0.1" port="6804">       <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>

       <watchdog-port>6604</watchdog-port>

       <thread-max>50</thread-max>

       <jvm-arg>-Xmx256m</jvm-arg>

       <jvm-arg>-XX:MaxPermSize=64m</jvm-arg>

       <jvm-arg>-Xdebug</jvm-arg>

       <jvm-arg>-Xnoagent</jvm-arg>

       <jvm-arg>-Djava.compiler=NONE</jvm-arg>

       <jvm-arg>-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999</jvm-arg>

       <http id="" port="8084"/>

    </server>

    <host id="17.16.9.27" root-directory="/www/htdocs/webapps">

        <stdout-log path='/www/htdocs/logs/resin/space/stdout.log'  rollover-period='1D'/>

        <stderr-log path='/www/htdocs/logs/resin/space/stderr.log'  rollover-period='1D'/>

        <access-log path='/www/htdocs/logs/resin/space/access.log'  rollover-period='1D'/>

        <web-app id="/" root-directory="space"/>

    </host>

  </cluster>

 

Resin 启动命令 bin/httpd.sh –server space start|stop|restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值