一、下载安装
首先要注意安装jdk环境,笔者安装的是较新的jdk1.7版本
1、下载地址: ,下载Certified Java EE
6 Full Profile版本。
2、解压 jboss-as-7.1.1.Final.tar.gz 到 /usr/local/jboss
tar zxvf jboss-as-7.1.1.Final.tar.gz
cp -r jboss-as-7.1.1.Final /usr/local/jboss
4、启动JBoss
cd /usr/local/jboss
./bin/standalone.sh ##请注意 新版本的jboss不再使用bin目录下的run.sh
-
15:48:06,958 信息 [org.jboss.modules] JBoss Modules version 1.1.1.GA
-
15:48:07,287 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
-
15:48:07,363 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
-
15:48:09,285 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
-
15:48:09,295 INFO [org.xnio] XNIO Version 3.0.3.GA
-
15:48:09,318 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
-
15:48:09,326 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
-
15:48:09,402 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
-
15:48:09,459 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
-
15:48:09,538 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
-
15:48:09,596 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
-
15:48:09,815 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
-
15:48:09,823 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
-
15:48:09,871 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
-
15:48:09,881 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
-
15:48:09,981 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final
-
15:48:10,063 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
-
15:48:10,168 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
-
15:48:10,524 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
-
15:48:10,810 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA
-
15:48:11,004 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--0.0.0.0-8080
-
15:48:11,826 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /usr/local/jboss/standalone/deployments
-
15:48:11,862 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
-
15:48:11,896 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /0.0.0.0:4447
-
15:48:11,987 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
-
15:48:12,122 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
-
15:48:12,122 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 5775ms - Started 133 of 208 services (74 services are passive or on-demand)
5、访问,这里注意默认情况下绑定的地址是127.0.0.1,外网地址此时不能访问,如需外网地址启动,需要修改standalone/configuration/standalone.xml文件内的public下的地址将127.0.0.1改为0.0.0.0,重启下就可以了
-
<interface name="public">
-
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
-
-
</interface>
出现 Welcome
to AS 7访问界面,说明jboss启动成功。
6、停止JBoss。在Server的命令行控制台,只要按下 Ctrl + C 就能够干净的停止这个Server。
此时jboss服务是不会在后台运行的,如果需要后台运行需要修改bin/standalone.sh
或者运行使用nohup ./standalone.sh &启动jboss。
这里我们可以新建一个启动脚本run.sh
vi run.sh
-
#!/bin/sh
-
nohup ./standalone.sh &
新增管理用户
访问该Web服务器时,提示新增用户。可在服务端执行add-user.sh 来添加管理员用户。
./add-user.sh
What type of user do you wish to add?
a)
Management User (mgmt-users.properties)
b) Application User
(application-users.properties)
(a):
回车后
Enter the details of the new user to add.
Realm (ManagementRealm) : //回车,选用默认
Username : //填写管理员用户名
Password :
Re-enter Password :
添加管理员后,访问 http://你的IP地址:9990/console
好了基本的配置就完成了,至于部署优化后面继续。
阅读(5697) | 评论(0) | 转发(1) |