Press "Enter" to skip to content

日期: 2013 年 2 月 2 日

JBoss7配置局域网公网可访问

默认情况下只允许本地访问JBOSS,为了能让局域网其他同事访问或是公网能访问,可以简单做以下配置即可实现访问。

1.打开D:\jboss\standalone\configuration下standalone.xml文件
找到

    <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
        </interface>
        <interface name="public">
            <inet-address value="${jboss.bind.address:127.0.0.1}"/>
        </interface>
        <!-- TODO - only show this if the jacorb subsystem is added  -->
        <interface name="unsecure">
            <!--
              ~  Used for IIOP sockets in the standard configuration.
              ~                  To secure JacORB you need to setup SSL 
              -->
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
    </interfaces>

在interfaces添加中添加

		<interface name="any">
		<any-ipv4-address/>
		</interface>

成为:

    <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
        </interface>
        <interface name="public">
            <inet-address value="${jboss.bind.address:127.0.0.1}"/>
        </interface>
        <!-- TODO - only show this if the jacorb subsystem is added  -->
        <interface name="unsecure">
            <!--
              ~  Used for IIOP sockets in the standard configuration.
              ~                  To secure JacORB you need to setup SSL 
              -->
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
		<interface name="any">
		<any-ipv4-address/>
		</interface>
    </interfaces>

第二步:找到

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

修改default-interface=”public”中的public为any
如下代码所示:

<socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">

第三步:双击D:\jboss\bin下的standalone.bat文件,然后在浏览器中输入局域网IP:8080进行访问是否成功。
jboss7-2

Leave a Comment

Windows服务下安装JBoss 7

本文以JBOSS 7为例子:

第一步:下载JBOSS
官方下载地址:http://www.jboss.org/jbossas/downloads/

第二步: 设置环境变量:
将JBOSS_HOME设置成JBOSS的目录,例如:
D:\JBoss
另外在Path添加%JBOSS_HOME%\bin

第三步:双击D:\jboss\bin下的standalone.bat 显示启动

第四步:在浏览器输入:http://localhost:8080/ 看到以下内容说明已经安装成功。
jboss7

Leave a Comment