[Linux 使用(2)] 64位Linux下安装jboss-as-7.1 以及jdk1.7

 一、软件的下载

jdk下载地址:
    http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

jboss下载地址:

   http://jbossas.jboss.org/downloads/

 

二、jdk的安装

     1、安装之前要先判断系统是否有默认的jdk,

# rpm -qa|grep jdk

     2、如果输完这个命令后,后面有显示jdk的信息,那么你就得先把这些东西给删除了后,然后在安装。

#rpm -e xxx --nodeps              # xxx是第一步执行后显示的,要把所有显示的一步一步给做完。

  3、准备安装步骤

      在操作之前,我的jdk1.7压缩包在 /home/java目录下

# tar -xzvf jdk-7u79-linux-i586.tar.gz 

      4、环境变量的配置

# vi /etc/profile                                                                # 编辑这个文件在文件后面追加以下内容
.....

#set java environment
export JAVA_HOME=/home/java/jdk1.7.0_79
export JRE_HOME=/home/java/jdk1.7.0_79/jre
export PATH=$PATH:/home/java/jdk1.7.0_79/bin
export CLASSPATH=./:/home/java/jdk1.7.0_79/lib:/home/java/jdk1.7.0_79/jre/lib

       5、查看是否安装成功

#  java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) Client VM (build 24.79-b02, mixed mode)

  出现Java信息则说明安装成功。

三、jboss的安装

      1、安装之前先看看系统有没有安装了jboss,若有则先删除,删除类似上面jdk的删除。

      2、准备安装(注:我的jboss安装包位置/home/jboss目录下)

# unzip jboss-as-7.1.1.Final.zip

  3、配置jboss环境变量

# vi /etc/profile          # 编辑这个文件在文件后面追加以下内容
..... 

# set jboss environment
export JBOSS_HOME=/home/jboss/jboss-as-7.1.1.Final

  

  4、启动\关闭jboss服务器

# /home/jboss/jboss-as-7.1.1.Final/bin/standalone.sh
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/jboss/jboss-as-7.1.1.Final

  JAVA: /home/java/jdk1.7.0_79/bin/java

  JAVA_OPTS:  -server -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

=========================================================================

08:08:29,847 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
08:08:32,665 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
08:08:32,985 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
08:08:43,126 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
08:08:43,169 INFO  [org.xnio] XNIO Version 3.0.3.GA
08:08:43,209 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
08:08:43,373 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
08:08:43,402 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
08:08:43,546 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
08:08:43,551 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
08:08:43,755 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
08:08:43,874 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
08:08:44,262 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
08:08:45,091 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final
08:08:45,305 INFO  [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
08:08:45,706 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
08:08:46,070 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
08:08:47,829 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]
08:08:49,705 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA
08:08:51,043 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--192.168.118.128-8080
08:08:54,080 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
08:08:55,084 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /home/jboss/jboss-as-7.1.1.Final/standalone/deployments
08:08:55,159 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /192.168.118.128:4447

  这样就算是jboss服务器启动成功了。

      若关闭服务器   直接  CTRL + C 就可以直接关闭所有的jboss的服务了。

      5、Linux下浏览器测试jboss

如果出现欢迎页就说明安装配置成功了。

      6、外网下访问服务器

      默认情况下是只能Linux本机才能访问的,如果需要外网访问,那么就得下面的配置

 

# cd /home/jboss/jboss-as-7.1.1.Final/standalone/configuration
# vi standalone.xml

....

        <interface name="public">
            <inet-address value="${jboss.bind.address:192.168.118.128}"/>         # 对外接口设置成Linux的ip地址
        </interface>


...

  设置完成后保存退出,开启jboss服务器,在外网访问

 

 

   

  

  

 

posted on 2016-08-15 13:10  与我同在  阅读(2029)  评论(0编辑  收藏  举报

导航