RHEL6.3安装resin-4.0

本文介绍如何在 RHEL 6.3 系统上安装 Resin 4.0.36,包括配置 Java 环境、解决 OpenSSL 编译问题、启动 Resin 服务器及配置防火墙与 SELinux 的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、因为resin的安装,需要首先配置Java环境,如果没有安装Java环境,请首先查看我之前的文章,安装JDK1.7,配置Java。

二、环境准备

1、OS : rhel6.3

2、Java:java version"1.7.0_79"

3、resin:resin-4.0.36

 

三、安装

1、下载resin-4.0.36安装包 resin-4.0.36.tar.gz,并临时放置到/mnt下,也可放在其他位置,并解压。如下:(相关文件已打黄底)

  [root@fanweiwebmnt]# ls

  jdk-7u79-linux-x64.gz  resin-4.0.36  resin-4.0.36.tar.gz

2、用root账号安装即可,创建目录/usr/resin-4.0.36

  [root@fanweiwebusr]# mkdir resin-4.0.36

   后面将resin安装到该目录

3、进入/mnt/resin-4.0.36目录,并进行编译

   [root@fanweiwebmnt]# cd resin-4.0.36

   [root@fanweiwebresin-4.0.36]# ls

   aclocal.m4 compat      config.status  contrib  ext-lib  lib      licenses     Makefile.in   README    webapp-jars  win64

   automake   conf        configure      doc      init.d   libtool  Makefile    modules       resin.exe  webapps

   bin        config.log  configure.ac   endorsed keys     LICENSE  Makefile.am project-jars  setup.exe  win32

   [root@fanweiweb resin-4.0.36]# ./configure --prefix=/usr/resin-4.0.36--with-java-home=/usr/java/jdk1.7.0_79 --enable-64bit

4、安装中我碰到的问题

   运行.configure 后,出现以下报错:(打黄部分)

   Resin Configuration Summary:

 

   RESIN       : 4.0.36

   home      :/usr/local/share/resin-4.0.36

   root      : /var/resin

   conf      : /etc/resin

   log       : /var/log/resin

   plugins   : common resin_os

   init      : /etc/init.d/resin

 

   JAVA_HOME   :/usr/java/jdk1.7.0_79

 

   JNI         : 64-bit

   include       :-I/usr/java/jdk1.7.0_79/include -I/usr/java/jdk1.7.0_79/include/linux

   CFLAGS        :

   cflags_shlib  : -fpic

   ld_shlib      : gcc

   ldflags_shlib : -shared -fPIC -m64

   libs_shlib    :

   epoll() for keepalives

 

  OPENSSL     : No OpenSSL has been found

    *** OpenSSL libraries cannotbe compiled ***

 

  解决办法:安装openssl-devel

  [root@fanweiweb media]# yum -y installopenssl-devel.x86_64

  我首先配置了yum源(我直接用的安装镜像做为源),然后才能用以上命令安装。

  安装openssl-devel 后,重新./configure ,问题解决。

 

5、./configure成功后,执行make&&make install

 

6、启动resin

   [root@fanweiwebresin-4.0.36]# cd bin

   [root@fanweiwebbin]# ls

   resinctl  resinctl.in resin.sh  start.bat  stop.bat

   [root@fanweiwebbin]# ./resin.sh start

   Resin/4.0.36 launching watchdogat 127.0.0.1:6600

   Resin/4.0.36 started -server'app-0' with watchdog at 127.0.0.1:6600

  出现以上黄色提示,说明启动成功。

 

四、对于防火墙,我直接关闭;同时设置selinux 为disabled

 

   [root@fanweiweb bin]# service iptablesstatus

   表格:filter

   Chain INPUT (policy ACCEPT)

   num target     prot opt source               destination        

   1   ACCEPT     all  -- 0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED

   2   ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0          

   3   ACCEPT     all  -- 0.0.0.0/0            0.0.0.0/0           

   4   ACCEPT     tcp  -- 0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22

   5   REJECT     all  -- 0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

 

   Chain FORWARD (policy ACCEPT)

   num target     prot opt source               destination        

   1   REJECT     all  -- 0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

 

   Chain OUTPUT (policy ACCEPT)

   num target     prot opt source               destination         

 

   [root@fanweiweb bin]# service iptables stop

   iptables:清除防火墙规则:[确定]

   iptables:将链设置为政策 ACCEPT:filter [确定]

   iptables:正在卸载模块:[确定]

   [root@fanweiweb bin]# chkconfig iptablesoff

   [root@fanweiweb bin]# service ip6tablesstop

   ip6tables:清除防火墙规则:[确定]

   ip6tables:将 chains 设置为 ACCEPT 策略:filter [确定]

  :正在卸载模块:[确定]

  [root@fanweiweb bin]# chkconfig ip6tablesoff

 

   [root@fanweiweb resin-4.0.36]# getenforce-l

   Enforcing

   查看发现selinux没有关闭

   关闭selinux,将SELINUX 改为disabled即可,如下黄色部分:

  [root@fanweiweb ~]# vi /etc/selinux/config


  # This file controls the state of SELinuxon the system.

  # SELINUX= can take one of these threevalues:

  #    enforcing - SELinux security policy is enforced.

  #    permissive - SELinux prints warnings instead of enforcing.

  #    disabled - No SELinux policy is loaded.

  SELINUX=disabled

  # SELINUXTYPE= can take one of these twovalues:

  #    targeted - Targeted processes are protected,

  #    mls - Multi Level Security protection.

  SELINUXTYPE=targeted

 

至此,resin配置完成。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值