JBoss 7.1.1 will work with JDK 6 or JDK 7.
Download
jdk from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Downloads]#
rpm
-ivh jdk-7u7-linux-x64.rpm
Downloads]#
wget
http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip
unzip
jboss-as-7.1.1.Final.zip -d /usr/share/
cd
/usr/share
mv
jboss-as-7.1.1.Final/ jboss-as
Create
a new group, jboss, and then create the user jboss and add the user
to the jboss group.
Downloads]#
groupadd jboss;useradd -s /bin/bash -g jboss jboss
Downloads]# chown -Rf jboss.jboss /usr/share/jboss-as/
Downloads]# passwd jboss
Downloads]# cat /root/.bash_profile
JAVA_HOME=/usr/java/jdk1.7.0_07
export
JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export
PATH
Downloads]#
.
~/.bash_profile
java
version "1.7.0_07"
Java(TM)
SE Runtime Environment (build 1.7.0_07-b10)
Java
HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
Downloads]# java -version
java
version "1.7.0_07"
Java(TM)
SE Runtime Environment (build 1.7.0_07-b10)
Java
HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
Downloads]# su - jboss
vellore
~]$ java -version
java
version "1.6.0_24"
OpenJDK
Runtime Environment (IcedTea6 1.11.1) (rhel-1.45.1.11.1.el6-x86_64)
OpenJDK
64-Bit Server VM (build 20.0-b12, mixed mode)
vellore
~]$ exit
Downloads]#
cp /usr/share/jboss-as/bin/init.d/jboss-as-standalone.sh
/etc/init.d/jboss
Downloads]# vim /etc/init.d/jboss
5
# chkconfig: 234 80 20
18
JBOSS_USER=jboss
19
export JBOSS_USER
Downloads]#
chmod 755 /etc/init.d/jboss
Downloads]# chkconfig --add jboss
Downloads]# chkconfig --level 234 jboss on
Downloads]# service jboss start
Starting
jboss-as: [ OK ]
Downloads]#
service jboss stop
vim
/usr/share/jboss-as/standalone/configuration/standalone.xml
By
default, JBoss 7.1.1 is bound to the loopback IP of 127.0.0.1, so if
we want to make it available on the web, we need to change this.
Locate
standalone.xml under
/usr/share/jboss-as/standalone/configuration/.
Open standalone.xml in vi or a text editor and look for the public interfaces node as shown below.
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
To make JBoss publicly accessible, change 127.0.0.1 to either 0.0.0.0 to allow access on all interfaces or to your public IP.
So, for example, if your public IP is 10.66.191.232, you would change it as so:
Open standalone.xml in vi or a text editor and look for the public interfaces node as shown below.
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
To make JBoss publicly accessible, change 127.0.0.1 to either 0.0.0.0 to allow access on all interfaces or to your public IP.
So, for example, if your public IP is 10.66.191.232, you would change it as so:
[root@vellore
~]# vim /usr/share/jboss-as/standalone/configuration/standalone.xml
275
<interfaces>
276
<interface name="management">
277
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
278
</interface>
279
<interface name="public">
280
<inet-address value="${jboss.bind.address:10.66.191.232}"/>
281
</interface>
282
<!-- TODO - only show this if the jacorb subsystem is added -->
283
<interface name="unsecure">
284
<!--
285
~ Used for IIOP sockets in the standard configuration.
286
~ To secure JacORB you need to setup SSL
287
-->
288
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
289
</interface>
[root
~]# service jboss start
adding
a Management user as shown on the error page:
#
cd /usr/share/jboss-as/bin
Issue
'./add-user.sh' to run the script to add a Management user. Follow
the prompts. Some defaults are provided.
bin]#
./add-user.sh
What
type of user do you wish to add?
a)
Management User (mgmt-users.properties)
b)
Application User (application-users.properties)
(a):
Enter
the details of the new user to add.
Realm
(ManagementRealm) :
Username
: amit
Password
: ------ > should not give user name as password
Re-enter
Password :
*
Error *
JBAS015238:
Username must not match the password.
Enter
the details of the new user to add.
Realm
(ManagementRealm) :
Username
(amit) :
Password
:
Re-enter
Password :
About
to add user 'amit' for realm 'ManagementRealm'
Is
this correct yes/no? yes
Added
user 'amit' to file
'/usr/share/jboss-as/standalone/configuration/mgmt-users.properties'
Added
user 'amit' to file
'/usr/share/jboss-as/domain/configuration/mgmt-users.properties'
[root@vellore
bin]#
While
you can now access the Admin console on localhost (127.0.0.1), if you
want to access it publicly, we need to update standalone.xml under
/usr/share/jboss-as/standalone/configuration/ as we did earlier.
Open
standalone.xml in vi or a text editor and look for the management
interface node as shown below.
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
To make the JBoss Admin console publicly accessible, change 127.0.0.1 to your your public IP or to 0.0.0.0 for all interfaces.
So, for example, if your public IP is 10.66.191.232, you would change it as so:
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
To make the JBoss Admin console publicly accessible, change 127.0.0.1 to your your public IP or to 0.0.0.0 for all interfaces.
So, for example, if your public IP is 10.66.191.232, you would change it as so:
[root@vellore bin]# vim
/usr/share/jboss-as/standalone/configuration/standalone.xml
275 <interfaces>
276 <interface
name="management">
277 <inet-address
value="${jboss.bind.address.management:10.66.191.232}"/>
278 </interface>
279 <interface
name="public">
280 <inet-address
value="${jboss.bind.address:10.66.191.232}"/>
281 </interface>
282 <!-- TODO - only show
this if the jacorb subsystem is added -->
283 <interface
name="unsecure">
284 <!--
285 ~ Used for IIOP
sockets in the standard configuration.
286 ~ To
secure JacORB you need to setup SSL
287 -->
288 <inet-address
value="${jboss.bind.address.unsecure:127.0.0.1}"/>
289 </interface>
290 </interfaces>
Again, if you wish to have the Admin
console publicly accessible on all interfaces, use 0.0.0.0 in place
of your IP above.
Retstart JBoss to reload the the change to standalone.xml:
Retstart JBoss to reload the the change to standalone.xml:
[root@vellore bin]# service jboss
restart
Stopping jboss-as: *** JBossAS process
(16532) received TERM signal ***
[ OK ]
Starting jboss-as:
[ OK ]
website excess : http://10.66.191.232:8080
website Deployed path: -
/usr/share/jboss-as/standalone/deployments
example:- [root@mail deployments]# ls
bkchindiagro.war WelcomHelloJBoss.war
bkchindiagro.war.deployed WelcomHelloJBoss.war.deployed
README.txt
bkchindiagro.war WelcomHelloJBoss.war
bkchindiagro.war.deployed WelcomHelloJBoss.war.deployed
README.txt
then service restart
First check 127.0.0.1:9990 then chang configration file after that excess your ip http://10.66.191.232:9990
No comments:
Post a Comment