安装resin4.0
1、下载
# wget http://www.caucho.com/download/resin-4.0.35.tar.gz2、解压
# sudo tar -vzxf resin-4.0.35.tar.gz3、编译
# cd resin-4.0.35# sudo ./configure --enable-64bit --with-java-home=$JAVA_HOME
Resin Configuration Summary:
RESIN : 4.0.35
home : /usr/local/share/resin-4.0.35
root : /var/resin
conf : /etc/resin
log : /var/log/resin
plugins : common resin_os
init : /etc/init.d/resin
JAVA_HOME : /usr/lib/jvm/jdk1.7.0_13
JNI : 64-bit
include : -I/usr/lib/jvm/jdk1.7.0_13/include -I/usr/lib/jvm/jdk1.7.0_13/include/linux
CFLAGS :
cflags_shlib : -fpic
ld_shlib : gcc
ldflags_shlib : -shared -fPIC -m64
libs_shlib :
epoll() for keepalives
# make
# sudo make install
4、启动resin
# sudo resinctl start或者
# sudo java -jar lib/resin.jar start
或者
# sudo /etc/init.d/resin start
5、测试是否启动成功
# curl http://localhost:8080<html>
<head><title>Resin® Default Home Page</title></head>
<body>
<h1 style="background: #ccddff">Resin® Default Home Page</h1>
This is the default page for the Resin web server.
<p>Documentation is available at <a href="/resin-doc">/resin-doc</a>.
<p>Administration is available at <a href="/resin-admin">/resin-admin</a>.
</body>
</html>
6、停止resin
# sudo resinctl stop或者
# sudo java -jar lib/resin.jar stop
或者
# sudo /etc/init.d/resin stop
7、修改防火墙策略,开启8080等常用端口
# sudo vi /etc/sysconfig/iptables# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #新增行
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT #新增行
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
重启防火墙
# sudo /etc/init.d/iptables restart
iptables:清除防火墙规则: [确定]
iptables:将链设置为政策 ACCEPT:filter [确定]
iptables:正在卸载模块: [确定]
iptables:应用防火墙规则: [确定]
8、添加resin到系统服务
检查是否已经存在# chkconfig --list resin
添加resin服务
# chkconfig --add resin
重启看resin是否已经自启动
# reboot
# service resin status
Resin/4.0.35 status for watchdog at 127.0.0.1:6600
watchdog:
watchdog-pid: 1189
server 'app-0' : ACTIVE
password: missing
watchdog-user: root
user: root
root: /var/resin
conf: /etc/resin/resin.xml
pid: 1231
uptime: 0 days 00h00
附1:解决CentOS5.8下设置JAVA_HOME RESIN配置无法识别和alternatives指令无效的问题
检查环境变量是否含有/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/sbin
将以上添加至PATH
# sudo vi /etc/profile