Friday, May 16, 2014

Configuration jboss 7

quoted from

http://opensourcearchitect.co/tutorials/ip-addresses-interfaces-jboss-eap6-as7


Configuration through the cli:
Your JBoss AS 7 or EAP 6 server must be started before in order to access the administration console.

Configuring the Default Public Interface:

First we connect to the cli by using the jboss-cli.bat or jboss-cli.sh scripts depending on your operating system:
Step 1:
Windows:
jboss-cli.bat connect
Linux:
$ ./jboss-cli.sh connect
Step 2:
Next we update the interface by issuing the following cli command:
/interface=public:write-attribute(name=inet-address,value=192.168.1.67)
Step 3:
Lastly, we can confirm the updates by viewing the following output:
{
“outcome” => “success”,
“response-headers” => {
“operation-requires-reload” => true,
“process-state” => “reload-required”
}
}
A successful restart of the server will result in the following message printed out in the console and log file:
13:13:09,397 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-15) Starting Coyote HTTP/1.1 on http–192.168.1.67-8080
This will allow you to successfully access your application on the public interface by typing in:
http://{youripaddress}:8080/myapp
For our example, the url will be:
http://192.168.1.67:8080/myapp

Configuring the new Administration Interface:

Step 1:
First we connect to the cli by using the jboss-cli.bat or jboss-cli.sh scripts depending on your operating system:
Windows:
jboss-cli.bat connect
Linux:
$ ./jboss-cli.sh connect
Step 2:
Next we update the administrative interface by issuing the following cli command:
/interface=management:write-attribute(name=inet-address,value=192.168.1.67)
Step 3:
Lastly, we can confirm the updates by viewing the following output:
{
“outcome” => “success”,
“response-headers” => {
“operation-requires-reload” => true,
“process-state” => “reload-required”
}
}
A successful startup will result in the following message printed out in the console and log file:
13:31:00,880 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.1.67:9990
This will allow you to successfully access the administration console on the administration interface by typing the following in the address bar of your browser:
http://{youripaddress}:9990
For our example, the url will be:
http://192.168.1.67:9990

Configuration through xml files:

In JBoss AS 7, interfaces can be configured in the standalone.xml or domain.xml for a JBoss server.
For example, if we have server installed under:
/home/opensourcearchitect/jboss-as-7.1.1.Final/
The standalone.xml file will be located under:
/home/opensourcearchitect/jboss-as-7.1.1.Final/standalone/standalone.xml
In the standalone.xml file for example you will see:
<interfaces>
<interface name=”management”>
<inet-address value=”127.0.0.1″/>
</interface>
<interface name=”public”>
<inet-address value=”127.0.0.1″/>
</interface>
</interfaces>
This defines the public interface (interface name=”public”) as 127.0.0.1 and the management interface as 127.0.0.1.

Configuring the Default Public Interface:

Step 1:
Edit the standalone.xml file in your favorite text editor.
Step 2:
Next, update the following section:
From:
<interface name=”public”>
<inet-address value=”127.0.0.1″/>
</interface>
To:
<interface name=”public”>
<inet-address value=”{youripaddress}”/>
</interface>
For our example, the ip address will be:
<interface name=”public”>
<inet-address value=”192.168.1.67″/>
</interface>
A successful restart of the server will result in the following message printed out in the console and log file:
13:13:09,397 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-15) Starting Coyote HTTP/1.1 on http–192.168.1.67-8080
This will allow you to successfully access your application on the public interface by typing in:
http://{youripaddress}:8080/myapp
For our example, the url will be:
http://192.168.1.67:8080/myapp

Configuring the new Administration Interface:

Step 1:
Edit the standalone.xml file in your favorite text editor.
Step 2:
Next, update the following section:
From:
<interface name=”management”>
<inet-address value=”127.0.0.1″/>
</interface>
To:
<interface name=”management”>
<inet-address value=”{youripaddress}”/>
</interface>
For our example, the ip address will be:
<interface name=”management”>
<inet-address value=”192.168.1.67″/>
</interface>
A successful startup will result in the following message printed out in the console and log file:
13:31:00,880 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.1.67:9990
This will allow you to successfully access the administration console on the administration interface by typing the following in the address bar of your browser:
http://{youripaddress}:9990
For our example, the url will be:
http://192.168.1.67:9990

No comments:

Post a Comment