linux下JBOSS安装
来源:互联网 发布:pandomo磐多魔 知乎 编辑:程序博客网 时间:2024/06/04 09:00
1,下载jboss.4.2.2.GA.zip
# wget http://nchc.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.2.GA.zip
2,解压unzip jboss-4.2.2.GA.zip
解压后拷贝到/usr/local/ :sudo mv ./jboss-4.2.2.GA.zip /usr/local
3.设置环境变量
sudo gedit /etc/profile
添加
#set JBOSS env
export JBOSS_HOME=/usr/local/jboss-4.2.2.GA
export PATH=$PATH:$JBOSS_HOME/bin
让修改生效:source /etc/profile
echo $JBOSS_HOME检查是否设置成功
4.手动启动:run.sh,输出如下
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/local/jboss-4.2.2.GA
JAVA: /usr/lib/jdk1.7.0_40/bin/java
JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
CLASSPATH: /usr/local/jboss-4.2.2.GA/bin/run.jar:/usr/lib/jdk1.7.0_40/lib/tools.jar
=========================================================================
16:37:33,822 INFO [Server] Starting JBoss (MX MicroKernel)...
16:37:33,823 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
16:37:33,824 INFO [Server] Home Dir: /usr/local/jboss-4.2.2.GA
16:37:33,824 INFO [Server] Home URL: file:/usr/local/jboss-4.2.2.GA/
16:37:33,825 INFO [Server] Patch URL: null
16:37:33,825 INFO [Server] Server Name: default
16:37:33,825 INFO [Server] Server Home Dir: /usr/local/jboss-4.2.2.GA/server/default
16:37:33,826 INFO [Server] Server Home URL: file:/usr/local/jboss-4.2.2.GA/server/default/
16:37:33,827 INFO [Server] Server Log Dir: /usr/local/jboss-4.2.2.GA/server/default/log
16:37:33,827 INFO [Server] Server Temp Dir: /usr/local/jboss-4.2.2.GA/server/default/tmp
16:37:33,827 INFO [Server] Root Deployment Filename: jboss-service.xml
16:37:34,566 INFO [ServerInfo] Java version: 1.7.0_40,Oracle Corporation
16:37:34,566 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 24.0-b56,Oracle Corporation
16:37:34,566 INFO [ServerInfo] OS-System: Linux 3.5.0-46-generic,i386
16:37:35,164 INFO [Server] Core system initialized
16:37:37,458 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
16:37:37,460 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
16:37:38,189 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
16:37:38,193 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
16:37:38,505 INFO [TransactionManagerService] Starting recovery manager
16:37:38,616 INFO [TransactionManagerService] Recovery manager started
16:37:38,616 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
16:37:41,741 INFO [EJB3Deployer] Starting java:comp multiplexer
16:37:42,083 INFO [STDOUT] no object for null
16:37:42,086 INFO [STDOUT] no object for null
16:37:42,104 INFO [STDOUT] no object for null
16:37:42,121 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
16:37:42,128 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
16:37:44,229 INFO [NativeServerConfig] JBoss Web Services - Native
16:37:44,229 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
16:37:44,857 INFO [Embedded] Catalina naming disabled
16:37:44,974 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
16:37:45,035 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
16:37:45,036 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
16:37:45,036 INFO [Catalina] Initialization processed in 179 ms
16:37:45,036 INFO [StandardService] Starting service jboss.web
16:37:45,038 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
16:37:45,118 INFO [Catalina] Server startup in 81 ms
16:37:45,267 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
16:37:45,831 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
16:37:45,924 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
16:37:45,996 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
16:37:46,657 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
16:37:47,318 INFO [MailService] Mail Service bound to java:/Mail
16:37:47,452 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
16:37:47,480 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
16:37:47,545 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
16:37:47,582 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
16:37:47,647 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
16:37:47,687 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
16:37:47,751 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
16:37:47,758 INFO [QuartzResourceAdapter] start quartz!!!
16:37:47,899 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
16:37:47,971 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
16:37:47,973 INFO [RAMJobStore] RAMJobStore initialized.
16:37:47,973 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
16:37:47,973 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
16:37:47,974 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
16:37:48,751 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
16:37:49,078 INFO [A] Bound to JNDI name: queue/A
16:37:49,079 INFO [B] Bound to JNDI name: queue/B
16:37:49,080 INFO [C] Bound to JNDI name: queue/C
16:37:49,081 INFO [D] Bound to JNDI name: queue/D
16:37:49,082 INFO [ex] Bound to JNDI name: queue/ex
16:37:49,095 INFO [testTopic] Bound to JNDI name: topic/testTopic
16:37:49,096 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
16:37:49,098 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
16:37:49,100 INFO [testQueue] Bound to JNDI name: queue/testQueue
16:37:49,127 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
16:37:49,155 INFO [DLQ] Bound to JNDI name: queue/DLQ
16:37:49,253 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
16:37:49,311 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
16:37:49,523 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
16:37:49,571 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
16:37:49,607 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 15s:777ms
也可设置开机自动启动,但感觉没必要
设置自动启动 # cp $JBOSS_HOME/bin/jboss_init_redhat.sh /etc/init.d/jboss
# gedit /etc/init.d/jboss
如果想支持全部IP,可以在该文件一开始追加以下内容 JBOSS_HOST=${JBOSS_HOST:-"0.0.0.0"}
修改以下内容
18:JBOSS_HOME=${JBOSS_HOME:-"/usr/local/jboss-4.2.2.GA"}
21:JBOSS_USER=${JBOSS_USER:-"root"}
24:JAVAPTH=${JAVAPTH:-"/usr/java/jdk1.6.0_02/bin"}
保存退出
设置JBoss启动sh文件
设置启动脚步
# ln –s /etc/init.d/jboss_init_redhat.sh /etc/rc3.d/K20jboss_init_redhat
# ln –s /etc/init.d/jboss_init_redhat.sh /etc/rc3.d/S80jboss_init_redhat
# ln –s /etc/init.d/jboss_init_redhat.sh /etc/rc5.d/K20jboss_init_redhat
# ln –s /etc/init.d/jboss_init_redhat.sh /etc/rc5.d/S80jboss_init_redhat
设置运行权限
# chmod –f 777 /etc/init.d/jboss
# chmod –f 777 /etc/rc3.d/S80jboss
# chmod –Rf 777 $JBOSS_HOME
到这jboss就能随系统一起启动了。
在Linux关闭的时候,它是以Kill的形式关闭JBoss进程的,不是很安全。我们可以做以下设置,让Linux在关闭的时候安全的关闭JBoss
1.在76和77行之间插入以下代码 if [ -f /var/lock/subsys/jboss ];then echo "Running jboss" else
2.在82和83行之间插入以下代码 echo "Starting jboss" touch /var/lock/subsys/jboss fi
3.在84和85行之间插入以下代码 if [ -f /var/lock/subsys/jboss ];then
4.在89和90行之间插入以下代码 echo "Stopping jboss" rm /var/lock/subsys/jboss else echo "Not Running jboss" fi
这样的话,关闭Linux的时候JBoss就可以安全的关闭了。
- linux 下安装JBOSS
- Linux下安装Jboss
- linux下安装jboss
- Linux下安装JBoss
- linux下jboss安装
- Linux下安装Jboss
- linux下JBOSS安装
- linux下安装jboss
- Linux下安装部署Jboss
- JBOSS入门简介与在linux 下安装JBOSS
- linux下jboss,jdk的安装配置
- linux下jboss的安装配置
- linux下安装jdk和JBOSS
- 在Linux环境下安装JDK+JBoss
- LINUX下JBoss安装与配置(备忘)
- LINUX下JBOSS的安装及配置
- linux系统下安装jboss服务器
- LINUX下JBOSS的安装及配置
- 【java performance】确定StringBuffer的容量
- 【TOMCAT】tomcat 类加载及配置文件
- 大家好
- 关于四元数
- android反编译后value文件夹下个文件的作用解析
- linux下JBOSS安装
- IOS Table中Cell的重用reuse机制分析
- 黑马程序员_Java函数和数组
- Jquery实现倒计后可操作
- 判断两个矩形是否相交的4个方法
- view移除所有子视图
- struts2中<s:select>标签的使用
- 修改设置语言选项,删除 [Developer]Accented English或者增加其他自己喜欢的语种
- Remove Nth Node From End of List