Centos-6.3-x86_64 minimal 迷你版安装笔记 - Resin篇


安装resin4.0

1、下载

# wget http://www.caucho.com/download/resin-4.0.35.tar.gz

2、解压

# sudo tar -vzxf resin-4.0.35.tar.gz

3、编译

# 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值