JBoss 5.0 installation and configuration Xiangjie

2010-03-26  来源:本站原创  分类:Web  人气:466 

JBoss 5.0 installation and configuration Xiangjie

1. Download and install JBoss

In this article, I downloaded the JBoss version: JBOSS5.0 Beta4.

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

In the above download page to download JBOSS5.0 Beta4.zip file.

Download is complete, extract it can be completed after the installation, unzip and place it after a directory without spaces (if the directory with a space, for example: C: "Program Files, in the future may have some inexplicable error), eg: E: "JBossJBOSS5.0 Beta4. At the same time in the "environment variable" to set an environment variable called JBOSS_HOME, value JBoss installation path

In this, JBoss installation has been completed, can be as follows Testing the installation:

Run the JBoss installation directory "bin" run.bat, if the window does not appear abnormal, and appears: 10:16:19,765 INFO [Server] JBoss (MX MicroKernel) [5.0.Beta4 (build: SVNTag = 5.0.Beta4 date = 20080831605 )] Started in 30s: 828ms words, then installed successfully.

We can visit: http://localhost:8080/ into JBoss's Welcome screen, click on the JBoss Management under the JBoss JMX Console to enter the console.

If the launch fails, may be caused by the following reasons:

1) JBoss port used (8080,1099,1098,8083, etc.) to be occupied. Under normal circumstances for the 8080 port is occupied (for example, Oracle takes up 8080 port), then need to modify the JBoss port, methods for entry into the JBoss installation directory "server" default "deployer" jboss-web.deployer catalog, modify their under server.xml directory, search for 8080 in this file, to change the port you want you can (for example, 8088);

2) JDK is not installed correctly;

3) JBoss download incomplete.

2. JBoss directory structure Contents

Description

bin

JBoss startup and shutdown scripts (run.bat under the windows system startup scripts, shutdown.bat to close under the windows system scripts).

client

Communicate with the JBoss client required Java libraries (JARs).

docs

Sample configuration files (database configuration, etc.).

docs / dtd

JBoss used in a variety of XML document DTD.

lib

Some JAR, JBoss loads at startup, and JBoss configuration shared by all. (Do not put your library on here)

server

Various JBoss configuration. Each configuration must be placed in different subdirectories. Subdirectory name that configuration's name. JBoss default configuration contains three: minimial, default and all, you can choose to install.

server / all

JBoss fully configured, start all services, including clustering and IIOP.

server / default

JBoss default configuration. In the absence of the JBoss configuration name is specified in the command line use. (We downloaded JBOSS5.0 Beta4 version of the default with this configuration).

server / default / conf

JBoss configuration file.

server / default / data

JBoss database file. For example, the embedded database, or JBossMQ

server / default / deploy

JBoss hot deployment directory. Place where any files or directories will be automatically deployed JBoss. EJB, WAR, EAR, or services.

server / default / lib

Some JAR, JBoss specific configuration in the startup load them. (Default and minimial configuration is also included in this and the following two directories.)

server / default / log

JBoss's log file.

server / default / tmp

JBoss temporary files.

3. JBoss configuration

1. Log file settings

If you need to modify the JBoss default log4j settings, can modify the JBoss installation directory "server" default "conf file under jboss-log4j.xml, you can see in the file, log4j log output in the JBoss installation directory" server "default" log under the server.log file. The log4j settings, readers can search the web for more detailed information.

2. Web service changes the port number

This has been mentioned in the previous article, that modify the JBoss installation directory "server" default "deployer" jboss-web.deployer under the server.xml file, as follows:

<Connector port = "8080" address = "$ (jboss.bind.address)"

maxThreads = "250" maxHttpHeaderSize = "8192"

emptySessionPath = "true" protocol = "HTTP/1.1"

enableLookups = "false" redirectPort = "8443" acceptCount = "100"

connectionTimeout = "20000" disableUploadTimeout = "true" />

Port above 8080 will be amended to the port you want you can. After the visit to re-start JBoss: http://localhost/ : a new set of ports, you can see the welcome screen JBoss.

3. JBoss security settings

1) jmx-console login user name and password settings

By default, access http://localhost:8080/jmx-console jboss can browse some of the deployment of management information, do not enter a user name and password, to use a little security risk. Here we address this problem on jboss configuration, making access jmx-console also need to know the user name and password before they can go visit. Steps are as follows:

i) find the JBoss installation directory / server / default / deploy / jmx-console.war / WEB-INF / jboss-web.xml file, remove the <security-domain> java: / jaas / jmx-console </ security-domain > Notes. The revised contents of the file:

Java code

  1. <jboss-web>
  2. <! - Uncomment the security-domain to enable security. You will
  3. need to edit the htmladaptor login configuration to setup the
  4. login modules used to authentication users .-->
  5. <security-domain> java: / jaas / jmx-console </ security-domain>
  6. </ Jboss-web>

<jboss-web>

   <!-- Uncomment the security-domain to enable security. You will

       need to edit the htmladaptor login configuration to setup the

       login modules used to authentication users.-->

      <security-domain>java:/jaas/jmx-console</security-domain>

</jboss-web>

ii) modify and i) in the jboss-web.xml web.xml file under the same level directory, find <security-constraint/> node, remove its comments, the revised contents of this section:

Java code

  1. <! - A security constraint that restricts access to the HTML JMX console
  2. to users with the role JBossAdmin. Edit the roles to what you want and
  3. uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
  4. secured access to the HTML JMX console .-->
  5. <security-constraint>
  6. <web-resource-collection>
  7. <web-resource-name> HtmlAdaptor </ web-resource-name>
  8. <description> An example security config that only allows users with the
  9. role JBossAdmin to access the HTML JMX console web application
  10. </ Description>
  11. <url-pattern> / * </ url-pattern>
  12. <http-method> GET </ http-method>
  13. <http-method> POST </ http-method>
  14. </ Web-resource-collection>
  15. <auth-constraint>
  16. <role-name> JBossAdmin </ role-name>
  17. </ Auth-constraint>
  18. </ Security-constraint>

<!-- A security constraint that restricts access to the HTML JMX console

    to users with the role JBossAdmin. Edit the roles to what you want and

    uncomment the WEB-INF/jboss-web.xml/security-domain element to enable

    secured access to the HTML JMX console.-->

   <security-constraint>

     <web-resource-collection>

       <web-resource-name>HtmlAdaptor</web-resource-name>

       <description>An example security config that only allows users with the

          role JBossAdmin to access the HTML JMX console web application

       </description>

       <url-pattern>/*</url-pattern>

       <http-method>GET</http-method>

       <http-method>POST</http-method>

     </web-resource-collection>

     <auth-constraint>

       <role-name>JBossAdmin</role-name>

     </auth-constraint>

   </security-constraint>

As can be seen here, for the log configuration of the role of the JBossAdmin.

iii) In the first step in the jmx-console security domain and the second step of running role JBossAdmin are configured in login-config.xml, we have JBoss installation directory / server / default / config to find it. Find the name to: jmx-console the application-policy:

Java code

  1. <application-policy name = "jmx-console">
  2. <authentication>
  3. <Login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
  4. flag = "required">
  5. <module-option name="usersProperties"> props / jmx-console-users.properties </ module-option>
  6. <module-option name="rolesProperties"> props / jmx-console-roles.properties </ module-option>
  7. </ Login-module>
  8. </ Authentication>
  9. </ Application-policy>

<application-policy name = "jmx-console">
       <authentication>
          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
              flag = "required">
           <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
           <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
          </login-module>
       </authentication>
    </application-policy>

Here you can see, the role of the registry, users and other information at props directory jmx-console-roles.properties and jmx-console-users.properties file settings, open the two files respectively.

One jmx-console-users.properties file reads as follows:

# A sample users.properties file for use with the UsersRolesLoginModule

admin = admin

The document defines the format: user name = password, the file defines a default user name admin, password for admin user, the reader may be required to change the user name and password.

jmx-console-roles.properties reads as follows:

# A sample roles.properties file for use with the UsersRolesLoginModule

admin = JBossAdmin, HttpInvoker

The document defines the format: user name = role, multiple roles in "," to separate the file defaults to the admin user defined JBossAdmin and HttpInvoker these two roles.

After configuration, the reader can visit: http://localhost:8088/jmx-console/ , enter the jmx-console-roles.properties file defined in the user name and password, to access jmx-console page.

4. Configuring JBoss in MyEclipse

Author MyEclipse version: 6.5 GA

JBoss Version: 5.0
JDK version: 1.6

Into the Window-> Preferences-> MyEclipse -> Application Servers -> JBoss5, for the following settings:

相关文章
  • JBoss 5.0 installation and configuration Xiangjie 2010-03-26

    JBoss 5.0 installation and configuration Xiangjie 1. Download and install JBoss In this article, I downloaded the JBoss version: JBOSS5.0 Beta4. Download: http://www.jboss.org/jbossas/downloads/ In the above download page to download JBOSS5.0 Beta4.z

  • JBOSS5.0 Installation and Configuration Xiangjie 2010-04-14

    1. Download and install JBoss In this article, I downloaded the JBoss version: JBOSS5.0 Beta4. Download: http://www.jboss .org / JBossAS / Downloads / In the above the download page to download JBOSS5.0 Beta4.zip file. The download is complete, it wi

  • Nexus1.5.0 installation and configuration (Mave local storage configuration) 2010-04-21

    Nexus1.5.0 Installation and Configuration 1, Nexus Maven Repository Manager is, if you use Maven, you can download from the Maven central repository components required (artifact), but this is usually not a good idea, you should set up a Maven reposi

  • Nexus1.5.0 installation and configuration (Mave local repository configuration) 2010-04-21

    Nexus1.5.0 Installation and Configuration 1, Nexus is a Maven repository manager, if you are using Maven, you can download from the Maven central repository of components required (artifact), but this is usually not a good idea, you should set up a l

  • Linux, Apache 2.2, MySQL 5.0 and PHP 5.0 installation and configuration 2010-12-21

    1. Installation Environment Operating System: Red Hat Linux Enterprise AS 4.0 Database: MySQL 5.0.24 Web server: Apache 2.2.3 Scripting languages: PHP 5.1.6 2. Installing MySQL 5.0.24 ------------- Download package mysql-5.0.24.tar.gz, address http:/

  • jobss5.0 Installation and Configuration 2010-07-23

    1. Download and install JBoss In this article, I downloaded the JBoss version: JBOSS5.0 Beta4. Download: http://www.jboss.org/jbossas/downloads/ In the above download page to download JBOSS5.0 Beta4.zip file. Download is complete, extract it can be c

  • Linux, installation and configuration of MRTG 2011-01-13

    MRTG SNMP from the device to get through the use of equipment (such as switches) and network traffic information, and the PNG graphics in HTML format display it easy to monitor the network administrator on the device (switch) to manage. Can be manage

  • JBoss 5.0.0GA the installation guide in ubuntu 2010-07-28

    Recent experience of the applications are basically based on JBoss, look at sales is Tianhundian were blown, sun, moon and no light, so they explore the meaning from one mind, had a look at Ubuntu 8.10 in the JBoss AS package, but it looked Readme, f

  • ubuntu-qmail installation configuration Xiangjie (step by step) (1) 2010-02-10

    I. Introduction Qmail features Qmail Security to verify the safety, Qmail's supporters and even provide $ 1,000 reward to find security holes Qmail, a year later, the money has not been received, which were donated to the Free Software Foundation. Cu

  • javafx for eclipse installation and configuration, and sample video Xiangjie lwxshow xshow tugg bill 2010-05-10

    Javafx javafx sample video video video javafx for eclipse installation and configuration, and sample more javafx for eclipse installation and configuration, and sample Xiangjie Sdk important statement on the configuration according to the official gu

  • Ubuntu10.10 installation and configuration under the Tomcat7.0 2011-01-11

    Ubuntu10.10 installation and configuration under the Tomcat7.0 Before we introduced the Tomcat7 configuration under Windows, and today we introduce how to install and configure ubuntu Tomcat7.0. First, the software download 1. Tomcat7: http://tomcat.

  • JBoss3.0 under the configuration and deployment EJB brief introduction 2009-05-04

    (By huihoo.org ZHAO Chen Greek, [email protected]) 1. About JBoss JBoss is an EJB running the J2EE application server. It is open-source projects, following the latest J2EE specification. JBoss project from the beginning until now, it has from

  • centos5.3 System Configuration DNS server configuration Xiangjie 2010-07-13

    Transfer from: http://hi.baidu.com/waibaohuo/blog/item/cc99d611f2efa18a6438db42.html [Original] centos5.3 System Configuration DNS server configuration Xiangjie 2009-10-22 12:03 Article excerpts of some users of the relevant information in this thank

  • EJBCA preliminary inquiry (Installation and Configuration) 2010-12-09

    EJBCA Technical Overview :( Reprinted ) EJB:EJB(Enterprise JavaBeans)--J2EE Core components, EJB is not a product . It is a framework for Java server-side service specification , Software vendors to implement EJB server based on its . EJBCA:EJBCA CA

  • hibernate configuration Xiangjie 2010-03-29

    1, hibernate.cfg.xml configuration Xiangjie Hibernate can be a description of the file properties properties file, it can be a xml file. Here to talk about the Hibernate.cfg.xml configuration. Configure the following format: 1. Configure Data Source

  • James mail server installation and configuration 2010-03-29

    James mail server installation and configuration of environment: Mail Server: OS: REDHAT LINUX AS 4 IP: 192.168.1.108 Subnet Mask: 255.255.0 Gateway: 192.168.1.1 DNS: 192.168.1.2 Client: Operating System: windows 2003 IP: 192.168.1.2 Subnet Mask: 255

  • Flex Installation and Configuration (change) 2010-05-01

    Need to install the software Eclipse3.3 MyEclipse6.0 (optional) Jdk1.5 Flash Plyer ActiveX 10 Windows debugger (IE) FB3_WWEJ_Plugin.exe (flex builder3) Installation Steps Eclipse Installation and Configuration (omitted) MyEclipse Installation and Con

  • apache2 configuration Xiangjie 2008-12-04

    1, ServerRoot ServerRoot "/ usr/local/apache2" # apache software installation location. Configuration files of other specified directory if an absolute path is not specified, then the directory is relative to the directory. 2, PidFile logs / htt

  • installation and configuration of windows on the jetspeed2 2008-07-01

    1, jetspeed2 the installation of Home http://portals.apache.org/jetspeed-2/ Download jetspeed-installer-minimal-2.2.0.jar Installation java-jar jetspeed-installer-minimal-2.2.0.jar Opens the graphical installation interface Command Line Installation

  • Apache2 + php5 + mysql under the windows installation and configuration diagrams 2010-02-16

    First ready software: Download the official Apache: apache_2.0.55-Win32-x86-no_ssl.msi , more versions here ; Download the official php: PHP-5.0.5-win32.zip , more mirror download address , more version of the download ; Download the official mysql: