![Red Hat APPLICATION STACK 2.2 RELEASE Скачать руководство пользователя страница 18](http://html.mh-extra.com/html/red-hat/application-stack-2-2-release/application-stack-2-2-release_release-note_1427413018.webp)
Chapter 4. Using JBoss Application Server
14
ln -s /etc/init.d/jbossas /etc/init.d/jbossas-ports-01
2. Create a new config file for
service-name
,
/etc/sysconfig/
service-name
. The contents
of this file should be similar to
/etc/sysconfig/jbossas
, except with instance specific values
uncommented and updated, e.g:
cp /etc/sysconfig/jbossas /etc/sysconfig/jbossas-ports-01
. Uncomment and
update
JBOSSCONF
to
ports-01
in
/etc/sysconfig/jbossas-ports-01
.
3. Then add
service-name
for management by
chkconfig
, e.g:
chkconfig --add jbossas-ports-01
4. To start/stop the service, simply:
service
service-name
start/stop
, e.g:
service jbossas-ports-01 start
4.5.2. Running multiple instances of JBoss Application Server
binding to different local IP addresses
Each JBoss Application Server instance is bound to a particular IP address.
1. Create a new file
/etc/init.d/
service-name
which is a symlink to
/etc/init.d/jbossas
,
e.g:
ln -s /etc/init.d/jbossas /etc/init.d/jbossas-instance2
2. Create a new config file for
service-name
,
/etc/sysconfig/
service-name
with instance
specific values uncommented and updated , e.g:
cp /etc/sysconfig/jbossas /etc/sysconfig/jbossas-instance2
. Uncomment and
update
JBOSSCONF
to
instance2
. Create a new variable
JBOSS_IP
and set it to another IP
address in
/etc/sysconfig/jbossas-instance2
3. Then add
service-name
for management by
chkconfig
, e.g:
chkconfig --add jbossas-instance2
4. To start/stop the service, simply:
service
service-name
start/stop, e.g:
service jbossas-instance2 start