安装环境:
CentOS 5.4 x64
Mysql 5.0.45
Apache 2.2.3
Tomcat 6.0.18
Jboss 5.0
CentOS、Apache、Mysql、Tomcat的安装就不在叙述了,注重Jboss
首先从网上下载jboss-5.0.0.GA-jdk6
然后使用Winscp上传到服务器,
在执行以下命令:
unzip jboss-5.0.0.GA-jdk6.zip
cp -fr jboss-5.0.0.GA /usr/local/jboss
cd /usr/local/jboss
手动启动:/usr/local/jboss/bin/run.sh -b IP
手动关闭:/usr/local/jboss/bin/shutdown.sh -S(注意大小写)
后台运行:nohup ./run.sh -b 0.0.0.0 > /dev/null &
然后修改jboss的默认端口
修改8080端口到9080端口
a.vi /usr/local/jboss/server/default/deploy/jbossweb.sar/server.xml
enableLookups="false" redirectPort="8443" acceptCount="100" 改为 enableLookups="false" redirectPort="9443" acceptCount="100"
emptySessionPath="true" enableLookups="false" redirectPort="8443" /> 改为 emptySessionPath="true" enableLookups="false" redirectPort="9443" />
b.vi /usr/local/jboss/server/default/conf/jndi.properties
添加:java.naming.provider.usr=localhost:2099
mv /usr/local/jboss/server/default/conf/jndi.properties /usr/local/jboss/client
在编辑环境变量
vi /root/.bash_profile
添加:PATH=$PATH:$HOME/bin
export JBOSS_HOME=/usr/local/jboss
export JBOSS_CLASSPATH=$JBOSS_HOME/client
export PATH=$PATH:$JBOSS_HOME/bin
注:.sh文档运行前,需更改权限. chmod 777
./shutdown.sh --server 192.168.1.188 关闭
./run.sh --host 192.168.1.188 启动
./run.sh -b 0.0.0.0 > /dev/null & 后台启动
至此Jboss安装完成,访问 就会看到jboss的安装的成功界面
但是在不是应用程序的时候会报错,不过在经过一同事的帮助终于成功了,
是按照 Jboss4.5的说明做的,
Installing JBossTS 4.5.GA JTA into JBossAS 5.0.0.GA
------------------------------------------------------------
The application server ships with a earlier release of JBossTS JTA as its default transaction manager.
To update the JTA the following steps are necessary:
- Replace JBossAS common/lib/jbossjta.jar and common/lib/jbossjta-integration.jar with the newer
versions from JBossTS lib
- Replace JBossAS common/lib/jbossts-common.jar with the newer version from JBossTS lib/ext/
- Replace JBossAS server/xxx/conf/jbossjta-properties.xml with JBossTS etc/jbossjta-properties.xml
成功了!!
http://wang6237.blog.51cto.com/24982/147098