jboss7.1部署安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jboss7.1部署安装相关的知识,希望对你有一定的参考价值。
环境:Redhat6.5
jboss安装包:jboss-as-7.1.1.Final.zip
jdk安装包:jdk-7u45-linux-x64.rpm
安装jdk
rpm -ivh jdk-7u45-linux-x64.rpm
使用rpm安装jdk会只自动安装到 /usr/java/目录下
在 /etc/profile 文件中添加一下信息
export JAVA_HOME=/usr/java/jdk1.7.0_45
export JRE_HOME=/usr/java/jdk1.7.0_45/jre
export PATH=$PATH:/usr/java/jdk1.7.0_45/bin
export CLASSPATH=./:/usr/java/jdk1.7.0_45/lib:/usr/java/jdk1.7.0_45/jre/lib
加载文件并查看jdk是否安装成功
[[email protected] ~]# source /etc/profile
[[email protected] ~]# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
安装JBOSS
直接解压到安装目录并在/etc/profile文件中添加
[[email protected] ~]unzip jboss-as-7.1.1.Final.zip -d /usr/
export JBOSS_HOME=/usr/jboss-as-7.1.1.Final #JBOSS的安装目录
export PATH=$PATH:$JBOSS_HOME/bin #JBOSS的bin目录
启动JBOSS
[[email protected] ~]# /usr/jboss-as-7.1.1.Final/bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/jboss-as-7.1.1.Final
JAVA: /usr/java/jdk1.7.0_45/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
03:39:12,095 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
03:39:12,766 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
03:39:12,828 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
03:39:14,930 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
03:39:14,943 INFO [org.xnio] XNIO Version 3.0.3.GA
03:39:14,974 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
03:39:15,001 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
03:39:15,036 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
03:39:15,044 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
03:39:15,091 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
03:39:15,144 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
03:39:15,152 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
03:39:15,174 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
03:39:15,201 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
03:39:15,291 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final
03:39:15,341 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
03:39:15,384 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
03:39:15,484 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
03:39:15,734 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
03:39:16,140 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA
03:39:16,313 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
03:39:16,702 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /usr/jboss-as-7.1.1.Final/standalone/deployments
03:39:16,735 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
03:39:16,754 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:4447
03:39:16,873 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
03:39:16,944 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
03:39:16,944 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 5470ms - Started 133 of 208 services (74 services are passive or on-demand)
到这里表示启动成功,但是不会返回到当前目录,而是直接停在这里。如果ctrl+c停止的话,jboss也就被强制停掉。可以用下面这条命令执行启动脚本,让进程在后台运行
[[email protected] usr]# nohup /usr/jboss-as-7.1.1.Final/bin/standalone.sh &
[3] 3339
[[email protected] usr]# nohup: ignoring input and appending output to `nohup.out‘
^C
[[email protected] usr]#
使用虚拟机自带的firefox浏览器在浏览器输入localhost:8080可直接访问
如果你使用电脑上的浏览器 需要将虚拟机网卡设置为桥接,并修改配置文件
文件的第280行,默认IP是127.0.0.1修改为虚拟机的实际IP
如下:
[[email protected] ~]# vim /usr/jboss-as-7.1.1.Final/standalone/configuration/standalone.xml
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
==》
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
我是在虚拟机安装并且iptables已被关闭所以不存在端口问题,如果iptables是在开启状态需要开启对应的端口8080才能访问
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
以上是关于jboss7.1部署安装的主要内容,如果未能解决你的问题,请参考以下文章
在 Jboss 7.1 上部署 datasource.xml
JBoss EAP 7.1 部署失败的集成器:未找到提供程序