1. Prerequisites
Set up the following directories.
l JAVA_HOME /usr/java5_64
l JBOSS_HOME /opt/jboss405
In this guide, take note that
l # refers to the root user prompt
l $ refers to the jboss user prompt
2. Configuration Process
Edit “/home/jboss/.profile” and add the following statements:
Add the following statements:
JAVA_HOME= /usr/java5_64
JBOSS_HOME=/opt/jboss405
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME JBOSS _HOME PATH
Create “startjboss” and “stopjboss” file in “/etc/rc.d/init.d” and grant executable privilege as follows:
(1) “startjboss” file contend
cd $JBOSS_HOME/bin
nohup ./run.sh > ./nohup.out &
(2) “stopboss” file contend
cd $JBOSS_HOME/bin
./shutdown.sh --server=jnp://localhost:1099/
(3) grant executable privilege
# chmod a+x startjboss
# chmod a+x stopjboss
Create “rc.startjboss” file in /etc and enter the following statement:
su - jboss "-c /etc/init.d/startjboss"
Create “rc.shutdown” file in /etc and enter the following statement:
su - jboss "-c /etc/init.d/stopjboss"
Grant Execute Privilege
# chmod a+x rc.startjboss
# chmod a+x rc.shutdown
Edit “/etc/inittab” and append the following statements:
startjboss:2345678:wait:/etc/rc.startjboss
Restart AIX Server
本文档详细介绍了如何配置JBoss应用服务器的环境变量,并创建启动与停止脚本实现服务的自动化管理。主要内容包括设置JAVA_HOME和JBOSS_HOME路径、编辑.profile文件以确保正确的环境变量被加载、创建startjboss和stopjboss脚本以便于服务的启动和关闭,以及通过编辑inittab文件使服务随系统启动。
1万+

被折叠的 条评论
为什么被折叠?



