Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Sande Gilda Eamon Logue Darrin Mison David Ryan Misty Stanley-Jones Tom Wells
Installation Guide
JBoss Enterprise Application Platform 6 Installation Guide For Use with JBoss Enterprise Application Platform 6 Edition 2
Author Author Author Author Author Author Copyright 2012 Red Hat, Inc.. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons AttributionShare Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the United States and other countries. Java is a registered trademark of Oracle and/or its affiliates. XFS is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries. All other trademarks are the property of their respective owners. Sande Gilda Eamon Logue Darrin Mison David Ryan Misty Stanley-Jones Tom Wells
This book is a guide to the installation of JBoss Enterprise Application Platform 6 and its patch releases.
Preface v 1. Document Conventions ................................................................................................... v 1.1. Typographic Conventions ...................................................................................... v 1.2. Pull-quote Conventions ........................................................................................ vi 1.3. Notes and Warnings ............................................................................................ vii 2. Getting Help and Giving Feedback ................................................................................. vii 2.1. Do You Need Help? ............................................................................................ vii 2.2. Give us Feedback .............................................................................................. viii 1. JBoss Enterprise Application Platform 6 1 1.1. Introducing JBoss Enterprise Application Platform 6 ....................................................... 1 1.1.1. Introducing JBoss Enterprise Application Platform 6 ............................................. 1 1.1.2. New and Changed Features in JBoss Enterprise Application Platform 6 ................. 1 1.2. Downloading JBoss Enterprise Application Platform 6 .................................................... 2 1.2.1. Download JBoss Enterprise Application Platform 6 .............................................. 2 1.2.2. Available Downloads for JBoss Enterprise Application Platform 6 .......................... 2 1.2.3. About the Red Hat Customer Portal ................................................................... 4 1.3. Preparing to Install JBoss Enterprise Application Platform 6 ............................................ 5 1.3.1. Installation Prerequisites for JBoss Enterprise Application Platform 6 ..................... 5 1.3.2. Java Environments Supported By JBoss Enterprise Application Platform 6 ............ 5 1.3.3. Install OpenJDK on Red Hat Enterprise Linux ..................................................... 5 1.4. Installing JBoss Enterprise Application Platform 6 .......................................................... 7 1.4.1. Installation Methods for JBoss Enterprise Application Platform 6 ........................... 7 1.4.2. Install JBoss Enterprise Application Platform 6 Using the Installer Method .............. 8 1.4.3. Install JBoss Enterprise Application Platform 6 Using the ZIP Download ................ 9 1.4.4. Install JBoss Enterprise Application Platform 6 using the Red Hat Network (RPM installation) ...................................................................................................... 10 1.4.5. Installation Structure and Details ...................................................................... 11 1.5. Running JBoss Enterprise Application Platform 6 as a Service ...................................... 13 1.5.1. Run JBoss Enterprise Application Platform 6 as an Operating System Service ...... 13 1.5.2. Install JBoss Enterprise Application Platform as a Service in Red Hat Enterprise Linux ........................................................................................................................ 13 1.5.3. Install JBoss Enterprise Application Platform 6 as a Service in Microsoft Windows ................................................................................................................... 15 1.6. Getting Started with JBoss Enterprise Application Platform 6 ......................................... 16 1.6.1. Add the Initial User for the Management Interfaces ............................................ 16 1.6.2. Start JBoss Enterprise Application Platform 6 .................................................... 18 1.6.3. Start JBoss Enterprise Application Platform 6 as a Managed Domain .................. 19 1.6.4. Start JBoss Enterprise Application Platform 6 as a Standalone Server ................. 19 1.6.5. Running JBoss Enterprise Application Platform 6 as a Service ............................ 20 1.6.5.1. Run JBoss Enterprise Application Platform 6 as an Operating System Service ............................................................................................................. 20 1.6.5.2. Install JBoss Enterprise Application Platform as a Service in Red Hat Enterprise Linux ................................................................................................ 20 1.6.5.3. Install JBoss Enterprise Application Platform 6 as a Service in Microsoft Windows ........................................................................................................... 22 1.6.6. Test the Installation .......................................................................................... 23 1.6.7. Network Ports Used By JBoss Enterprise Application Platform 6 ......................... 24 1.6.8. Configure Network Firewalls to Work with JBoss Enterprise Application Platform 6 .............................................................................................................................. 26 1.6.9. Default User Security Configuration .................................................................. 29 1.7. Uninstalling JBoss Enterprise Application Platform 6 ..................................................... 30 1.7.1. Uninstall JBoss Enterprise Application Platform 6 .............................................. 30 1.7.2. Uninstall JBoss Enterprise Application Platform 6 From a Zip Installation ............. 30
iii
Installation Guide 1.7.3. Uninstall JBoss Enterprise Application Platform 6 From a Graphical Installation 31 .... 1.7.4. Uninstall JBoss Enterprise Application Platform 6 From an RPM Installation ......... 31 A. Revision History 33
iv
Preface
1. Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.
1
https://fedorahosted.org/liberation-fonts/
Preface Close to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand). To insert a special character into a gedit file, choose Applications Accessories Character Map from the main menu bar. Next, choose Search Find from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Doubleclick this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose Edit Paste from the gedit menu bar. The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context. Mono-spaced Bold Italic or Proportional Bold Italic Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example: To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh john@example.com. The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home. To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release. Note the words in bold italics above username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system. Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: Publican is a DocBook publishing system.
Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:
package org.jboss.book.jca.ex1; import javax.naming.InitialContext;
vi
Note
Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration.
Warning
Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
Preface access other product documentation. Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/ listinfo. Click on the name of any mailing list to subscribe to that list or to access the list archives.
Additional information:
Be sure to give us your name so that you can receive full credit for reporting the issue.
viii
Chapter 1.
Chapter 1. JBoss Enterprise Application Platform 6 Datasource management is streamlined. Database drivers can be deployed just like other services. In addition, datasources are created and managed directly in the Management Console or Management CLI. JBoss Enterprise Application Platform 6 starts and stops very quickly, which is especially beneficial to developers. It uses fewer resources and is extremely efficient in its use of system resources. Report a bug
2
Result
The JBoss Enterprise Application Platform 6 file that you selected is downloaded to your computer, along with any supplemental downloads you have selected. Report a bug
3
Available Downloads for JBoss Enterprise Application Platform 6 Table 1.1. Available Downloads for JBoss Enterprise Application Platform 6 Name Apache HTTP Server Description A stand-alone Apache HTTP server instance for each supported operating system and architecture. This HTTP server has been tested and verified to work with JBoss Enterprise Application Platform 6. Components which have been compiled to be optimized for a specific platform. For instance, DLLs are provided for Microsoft Windows Server environments. In some cases, the native components may provide performance improvements. Utilities specific to each supported operating system and architecture, such as scripts and utilities for installing JBoss Enterprise Application Platform as a service in your operating system and generating SSL encryption keys and certificates. Pre-compiled modules for Apache, Microsoft, and Netscape HTTPD servers, for HTTP load balancing and highavailability capabilities. These binaries are extensively tested and known to work well with JBoss Enterprise Application Platform 6. Documentation for all public APIs exposed by JBoss Enterprise Application Platform 6. You can install these into your local HTTP server or IDE, or can view them on your local machine. Java graphical installer for JBoss Enterprise Application Platform 6 A Maven repository which you can download and make available in your local development environment, and which contains artifacts Operating Systems Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6, Microsoft Windows Server 2008, Solaris 10 and 11
Native Components
Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6, Microsoft Windows Server 2008, Solaris 10 and 11
Native Utilities
Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6, Microsoft Windows Server 2008, Solaris 10 and 11
Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6, Microsoft Windows Server 2008, Solaris 10 and 11
Javadocs
Platform-independent
Installer
Platform-independent
Maven Repository
Platform-independent
Chapter 1. JBoss Enterprise Application Platform 6 Name Description common to applications built upon JBoss Enterprise Application Platform 6. Quickstarts Example applications to help you get started developing Java EE 6 applications with APIs supplied with JBoss Enterprise Application Platform 6. The Java source code for JBoss Enterprise Application Platform 6, provided so that you can recompile it in your own environment or audit it yourself. The ZIP installation package which can be installed and run on every supported platform. This is the most common way to install JBoss Enterprise Application Platform 6. Platform-independent Operating Systems
Source Code
Platform-independent
Application Platform
Platform-independent
The RPM installation method's Red Hat Enterprise Linux 5, downloads are not available Red Hat Enterprise Linux 6 on the Customer Portal, but via the Red Hat Network (RHN). To install JBoss Enterprise Application Platform 6 via RPM, refer to the following topic: Section 1.4.4, Install JBoss Enterprise Application Platform 6 using the Red Hat Network (RPM installation)
Report a bug
https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Instance+Name%3A+Not+Defined%0ABuild %3A+CSProcessor+Builder+Version+1.5%0ABuild+Filter%3A+null%0ABuild+Name%3A+%0ABuild +Date%3A+31-07-2012+11%3A58%3A00&cf_build_id=254-155458+31+Jul+2012+11%3A58+enUS&assigned_to=misty%40redhat.com&product=JBoss+Enterprise+Application+Platform +6&component=documentation&version=6.0&keywords=Documentation 6 https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Instance+Name%3A+Not+Defined%0ABuild %3A+CSProcessor+Builder+Version+1.5%0ABuild+Filter%3A+null%0ABuild+Name%3A+%0ABuild +Date%3A+31-07-2012+11%3A58%3A00&cf_build_id=234-155458+31+Jul+2012+11%3A58+enUS&assigned_to=misty%40redhat.com&product=JBoss+Enterprise+Application+Platform +6&component=documentation&version=6.0&keywords=Documentation 7 https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Instance+Name%3A+Not+Defined%0ABuild %3A+CSProcessor+Builder+Version+1.5%0ABuild+Filter%3A+null%0ABuild+Name%3A+%0ABuild +Date%3A+31-07-2012+11%3A58%3A00&cf_build_id=300-155458+31+Jul+2012+11%3A58+enUS&assigned_to=misty%40redhat.com&product=JBoss+Enterprise+Application+Platform +6&component=documentation&version=6.0&keywords=Documentation
Note
It is possible to install multiple JDKs on a single system.
Task Prerequisites
You must meet the following conditions before continuing with this task: You must be running Red Hat Enterprise Linux 6. OpenJDK is not available or supported for Red Hat Enterprise Linux 5 at this time. The server running Red Hat Enterprise Linux 6 must be registered with RHN and subscribed to the base channel. Refer to the Package Management section of the Red Hat Enterprise Linux 6 Deployment Guide on http://access.redhat.com/knowledge/docs/ for more information about managing subscriptions and entitlements on Red Hat Enterprise Linux systems. 1. Install the OpenJDK RPM. There are two different ways to install an RPM, depending on whether you have used a command-line interface (CLI) or a Graphical User Interface (GUI). From the CLI After logging in with administrator access, run one of the following two commands: OpenJDK 6 yum install java-1.6.0-openjdk-devel OpenJDK 7 yum install java-1.7.0-openjdk-devel From a GUI a. In Gnome, select Administration from the System menu, and click Add / Remove Software. b. c. d. 2. Search for openjdk and choose the java-1.6.0-openjdk-devel option for OpenJDK 6 or the java-1.7.0-openjdk-devel option for OpenJDK 7. Click Apply to install the selected packages and dependencies. When prompted, enter the administrator password to install the packages.
Optional: Set the JAVA_HOME environment variable. Some applications such as Apache Maven and Apache Ant require you to set the JAVA_HOME environment variable. If you need to do this, follow these steps. a. Determine the correct value for JAVA_HOME. Red Hat Enterprise Linux installs OpenJDK 1.6 into either /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/ or /usr/lib/jvm/ java-1.6.0-openjdk-1.6.0.0.x86_64/, depending on whether your system is a 32-bit or 64-bit architecture. The JAVA_HOME should point to the directory containing a bin/java executable. As the user who will use OpenJDK, open the shell configuration file. For the Bash shell, this file is /home/username/.bashrc.
b.
Installing JBoss Enterprise Application Platform 6 c. d. 3. At the bottom of the file, type the following line, replacing the hypothetical path with the actual path to use on your own system: export JAVA_HOME="/path/to/java/home" Save the file, and log out of and back into your session.
Switch between different OpenJDK versions using the alternatives utility. Red Hat Enterprise Linux includes a utility called alternatives, which lets you change the default version for applications which allow multiple versions to be installed. OpenJDK is one such application. To use the alternatives utility, perform the following steps. Note that setting the environment variables overrides the behavior of the alternatives command. For instance, if you use a script which manually sets $JAVA_HOME and $JAVA variables to a different JDK from the one specified by the alternatives command, the environment variables will override the command. Log in as the root user, or prefix the commands below with the sudo command. The alternatives command is not installed by default, but may already be installed on your system. If not, install the alternatives package by running the following command:
yum install alternatives
Follow the prompts that follow to set the default version of OpenJDK.
Result:
OpenJDK is installed on your server and available for your use. If necessarily, the JAVA_HOME environment variable has been specified as well. If necessary, the default OpenJDK for your system has been set using the alternatives utility. Report a bug
8
Chapter 1. JBoss Enterprise Application Platform 6 You can use the RPM installer if you have a compatible operating system, or the Zip file if you would like to extract the server manually. The installer file is available to assist new users in the configuration and startup process, which also creates an XML installation script to automate the installation process for other or future installations. Report a bug
9
1.4.2. Install JBoss Enterprise Application Platform 6 Using the Installer Method
Summary
The JBoss Enterprise Application Platform 6 installer offers multiple methods for installation. Choose from either the standard Graphical User Interface (GUI) installation, or a Command Line Interface (CLI) mode with the console parameter. An Automatic Installation mode enables you to generate an XML file of your selected installation settings to assist in future installations. Prerequisites Section 1.2.1, Download JBoss Enterprise Application Platform 6 Procedure 1.1. Task Install JBoss Enterprise Application Platform 6 Choose your installation preference. GUI Installation a. Launch the GUI installer with the following Java command.
java -jar jboss-eap-6.0.0-installer.jar
b.
Follow the installation prompts. At the end of installation, an XML file of the installation can be generated, for future use with the Automatic Installation feature.
Console Installation a. Launch the console installer with the following Java command.
java -jar jboss-eap-6.0.0-installer.jar -console
b.
Follow the installation text prompts. At the end of the installation, an XML file of the installation can be generated, for use with the automatic installation feature.
Automatic Installation a. If you have created a previous installation instance, you will have generated an automatic installation XML script. You can use this file to run the automatic installation option. b. Launch the automatic installer with the following Java command.
c.
Result
The installation is complete. Report a bug
10
1.4.3. Install JBoss Enterprise Application Platform 6 Using the ZIP Download
Summary
The Zip file installation method is appropriate for all support operating systems.
Prerequisites
Before you can install JBoss Enterprise Application Platform 6, you need to download the Zip archive from the Red Hat Customer Service Portal. Procedure 1.2. Task 1. Move the Zip archive to the desired location. Move the Zip file to the server and directory where you want to install JBoss Enterprise Application Platform 6. The directory should be accessible by the user who will start and stop the server. 2. Use an appropriate application to extract the Zip archive. In Linux, the command to extract a Zip archive is typically called unzip. In a Microsoft Windows environment, right-click the file and select Extract All.
Result
The directory created by extracting the Zip archive is the top-level directory for JBoss Enterprise Application Platform 6. This is typically referred to as EAP_HOME. If you ever decide to move your installation, you can move this directory to another directory or another server. Report a bug
11
10
1.4.4. Install JBoss Enterprise Application Platform 6 using the Red Hat Network (RPM installation)
Summary
The RPM package method of installing JBoss Enterprise Application Platform 6 is appropriate for Red Hat Enterprise Linux 6. The recommended installation method is to use the Red Hat Network (RHN) to manage your server subscriptions and channels.
Prerequisites
If you are installing an RPM package by using YUM to access the Red Hat Network, you will first need to add your server to the JBoss Enterprise Application Platform 6 channel on the RHN website at http://rhn.redhat.com. You will also be required to log in to your server as the root user. Please note that the RPM package method is only appropriate for Red Hat Enterprise Linux 6. Procedure 1.3. Task Access and install the RPM package by using the YUM install via the Red Hat Network. 1. Install the RPM package by using YUM and the Red Hat Network You can use YUM to install the default JBoss Enterprise Application Platform 6 group package by using the groupinstall command.
[user@host ~]$ yum groupinstall jboss-eap6
The jbossas-hornetq-native package is included as a method of implementing high availability in JBoss Enterprise Application Platform 6 and is activated by default. 2. Set the EAP_HOME environment variable to /usr/share/jbossas/. Use the following command to set the EAP_HOME environment variable to /usr/share/ jbossas/ if you use the Bash shell. The command may be different if you use a different shell.
export EAP_HOME=/usr/share/jbossas
To make the change persistent, add the command to the end of the .bashrc in the home directory of the user running JBoss Enterprise Application Platform. 3. Configure additional options. Several options are available to be configured using the /etc/sysconfig/jbossas/ file. Refer to this file for the configuration options. Note that the order and precedence of these options is important, so do not change the order of the options in the file.
Result
The installation is complete. Report a bug
12
12
10
bundles/
docs/ domain/
modules/
standalone/
welcome-content/
jboss-modules.jar
Table 1.3. Directories within the domain/ directory Name configuration/ Purpose Configuration files for the managed domain. These files are modified by the Management Console and Management CLI, and are not meant to be edited directly. Information about deployed services. Services are deployed using the Management Console and Management CLI, rather than by a deployment scanner. Therefore, do not place files in this directory manually.
data/
US&assigned_to=misty%40redhat.com&product=JBoss+Enterprise+Application+Platform +6&component=documentation&version=6.0&keywords=Documentation
11
Chapter 1. JBoss Enterprise Application Platform 6 Name log/ Purpose Contains the run-time log files for the host and process controllers which run on the local instance. Contains the equivalent data/, log/, and tmp/ directories for each server instance in a domain, which contain similar data to the same directories within the top-level domain/ directory. Contains temporary data such as files pertaining to the shared-key mechanism used by the Management CLI to authenticate local users to the managed domain.
servers/
tmp/
Table 1.4. Directories within the standalone/ directory Name configuration/ Purpose Configuration files for the standalone server. These files are modified by the Management Console and Management CLI, and are not meant to be edited directly. Information about deployed services. The standalone server does include a deployment scanner, so you can place archives in this directory to be deployed. However, the recommended approach is to manage deployments using the Management Console or Management CLI. External libraries which pertain to a standalone server mode. Empty by default. Contains temporary data such as files pertaining to the shared-key mechanism used by the Management CLI to authenticate local users to the server.
13
deployments/
lib/ tmp/
Report a bug
13
12
1.5.2. Install JBoss Enterprise Application Platform as a Service in Red Hat Enterprise Linux
Summary
This task installs JBoss Enterprise Application Platform 6 as a service on Red Hat Enterprise Linux.
Prerequisites
You need administrator access to complete this task. Procedure 1.4. Task 1. Copy the start-up script to the /etc/init.d/ directory The start-up script is a different file, depending on whether you use a Managed Domain or Standalone Server. Standalone Server
cp EAP_HOME/bin/standalone.sh /etc/init.d/
Managed Domain
cp EAP_HOME/bin/domain.sh /etc/init.d/
14
13
Chapter 1. JBoss Enterprise Application Platform 6 2. Define $JBOSS_HOME in the /etc/init.d/standalone.sh or /etc/init.d/domain.sh script. Edit the /etc/init.d/standalone.sh or /etc/init.d/domain.sh script to set the JBOSS_HOME variable. This will override the logic in previous parts of the script, which sets $JBOSS_HOME programmatically. a. Locate the following section:
# Setup JBOSS_HOME if [ "x$JBOSS_HOME" = "x" ]; then # get the full path (without any relative bits) JBOSS_HOME=`cd $DIRNAME/..; pwd` fi export JBOSS_HOME
b.
Edit the line that reads export JBOSS_HOME to point to the installation directory for JBoss Enterprise Application Platform 6. This should be the top-level directory, which contains a bin/ directory.
export JBOSS_HOME=/path/to/installation/
3.
Provide run-level, startup and shutdown priorities to the initialization subsystem of Red Hat Enterprise Linux. Edit the /etc/init.d/standalone.sh or /etc/init.d/domain.sh script to include runlevel, startup, and shutdown priority information for chkconfig. Add these three lines below the first line of the script, which reads #!/bin/sh.
#chkconfig: 2345 95 20 #description: JBoss AS 7 #processname: standalone.sh
4.
Add the start-up script as a service. Add the new standalone.sh or domain.sh service to the chkconfig service management command.
chkconfig --add standalone.sh
Result
JBoss Enterprise Application Platform 6 starts automatically when the Red Hat Enterprise Linux reaches its default run-level, and stops automatically when the operating system goes through its shutdown routine. Report a bug
15
15
14
Prerequisites
You need administrator access to complete this task. Procedure 1.5. Task 1. Download the Native Utilities package for your architecture. 32-bit, 64-bit, and Itanium 64-bit packages are available from the Red Hat Customer Portal at http://access.redhat.com. For more information on downloading software from the Red Hat Customer Portal, refer here: Section 1.2.2, Available Downloads for JBoss Enterprise Application Platform 6 2. Unzip the downloaded archive. Unzip the archive into a new folder.
Result
The service is installed. JBoss Enterprise Application Platform 6 is listed in the Services applet services.msc. 4. Manage your service. Use the modules\bin\prunmgr.exe executable to manage, edit, add, or delete services. The following command-line options are supported: run service start stop update install delete pause [seconds]
15
Chapter 1. JBoss Enterprise Application Platform 6 version help The general syntax is:
prunmgr.exe command service_name
Result
You can use the net service command at the command line, or the services.msc applet, to start, stop, and manage automatic start-up of JBoss Enterprise Application Platform 6 in Microsoft Windows Server. Report a bug
16
16
16
Note
HTTP communication with JBoss Enterprise Application Platform 6 is considered to be remote access, even if the traffic originates on the localhost. Therefore, you must create at least one user in order to be able to use the management console. If you attempt to access the management console before adding a user, you will receive an error because it does not even deploy until the user is added.
Procedure 1.6. Task 1. Invoke the add-user.sh or add-user.bat script. Change to the EAP_HOME/bin/ directory. Invoke the appropriate script for your operating system. Red Hat Enterprise Linux
[user@host bin]$ ./add-user.sh
2.
Choose to add a Management user. Select option a to add a Management user. This user is added to the ManagementRealm and is authorized to perform management operations using the web-based Management Console or command-line based Management CLI. The other choice, b, adds a user to the ApplicationRealm, and provides no particular permissions. That realm is provided for use with applications. Choose the realm for the user. The next prompt refers to the realm where the user will be added. For a user with permissions to manage JBoss Enterprise Application Platform 6, choose the default, which is ManagementRealm. Enter the desired username and password. When prompted, enter the security realm, username and password. Pressing ENTER selects the default realm of ManagementRealm, which allows the user to administer JBoss Enterprise Application Platform 6 using the management interfaces. You must add at least one user to this realm. You are prompted to confirm the information. If you are satisfied, type yes . Choose whether the user represents a remote JBoss Enterprise Application Platform 6 server instance. Besides administrators, the other type of user which occasionally needs to be added to JBoss Enterprise Application Platform 6 in the ManagementRealm is a user representing another instance of JBoss Enterprise Application Platform 6, which needs to be able to authenticate to join a cluster as a member. The next prompt allows you to designate your added user for this purpose. If you select yes, you will be given a hashed secret value, representing the user's password, which would need to be added to a different configuration file. For the purposes of this task, answer no to this question.
3.
4.
5.
17
Chapter 1. JBoss Enterprise Application Platform 6 6. Enter additional users. You can enter additional users if desired, by repeating the procedure. You can also add them at any time on a running system. Instead of choosing the default security realm, you can add users to other realms to fine-tune their authorizations. Create users non-interactively. You can create users non-interactively, by passing in each parameter at the command line. This approach is not recommended on shared systems, because the passwords will be visible in log and history files. The syntax for the command, using the management realm, is:
[user@host bin]$ ./add-user.sh username password
7.
Result
Any users you add are activated within the security realms you have specified. Users active within the ManagementRealm realm are able to manage JBoss Enterprise Application Platform 6 from remote systems. Report a bug
17
17
18
2.
3.
Result:
The JBoss Enterprise Application Platform 6 Managed Domain instance starts. Report a bug
19
2.
3.
Result
The JBoss Enterprise Application Platform 6 Standalone Server instance starts. Report a bug
20
19
19
1.6.5.2. Install JBoss Enterprise Application Platform as a Service in Red Hat Enterprise Linux
Summary
This task installs JBoss Enterprise Application Platform 6 as a service on Red Hat Enterprise Linux.
Prerequisites
You need administrator access to complete this task. Procedure 1.7. Task 1. Copy the start-up script to the /etc/init.d/ directory The start-up script is a different file, depending on whether you use a Managed Domain or Standalone Server. Standalone Server
cp EAP_HOME/bin/standalone.sh /etc/init.d/
Managed Domain
cp EAP_HOME/bin/domain.sh /etc/init.d/
2.
Define $JBOSS_HOME in the /etc/init.d/standalone.sh or /etc/init.d/domain.sh script. Edit the /etc/init.d/standalone.sh or /etc/init.d/domain.sh script to set the JBOSS_HOME variable. This will override the logic in previous parts of the script, which sets $JBOSS_HOME programmatically.
21
20
Running JBoss Enterprise Application Platform 6 as a Service a. Locate the following section:
# Setup JBOSS_HOME if [ "x$JBOSS_HOME" = "x" ]; then # get the full path (without any relative bits) JBOSS_HOME=`cd $DIRNAME/..; pwd` fi export JBOSS_HOME
b.
Edit the line that reads export JBOSS_HOME to point to the installation directory for JBoss Enterprise Application Platform 6. This should be the top-level directory, which contains a bin/ directory.
export JBOSS_HOME=/path/to/installation/
3.
Provide run-level, startup and shutdown priorities to the initialization subsystem of Red Hat Enterprise Linux. Edit the /etc/init.d/standalone.sh or /etc/init.d/domain.sh script to include runlevel, startup, and shutdown priority information for chkconfig. Add these three lines below the first line of the script, which reads #!/bin/sh.
#chkconfig: 2345 95 20 #description: JBoss AS 7 #processname: standalone.sh
4.
Add the start-up script as a service. Add the new standalone.sh or domain.sh service to the chkconfig service management command.
chkconfig --add standalone.sh
Result
JBoss Enterprise Application Platform 6 starts automatically when the Red Hat Enterprise Linux reaches its default run-level, and stops automatically when the operating system goes through its shutdown routine. Report a bug
22
22
21
Prerequisites
You need administrator access to complete this task. Procedure 1.8. Task 1. Download the Native Utilities package for your architecture. 32-bit, 64-bit, and Itanium 64-bit packages are available from the Red Hat Customer Portal at http://access.redhat.com. For more information on downloading software from the Red Hat Customer Portal, refer here: Section 1.2.2, Available Downloads for JBoss Enterprise Application Platform 6 2. Unzip the downloaded archive. Unzip the archive into a new folder.
Result
The service is installed. JBoss Enterprise Application Platform 6 is listed in the Services applet services.msc. 4. Manage your service. Use the modules\bin\prunmgr.exe executable to manage, edit, add, or delete services. The following command-line options are supported: run service start stop update install delete pause [seconds]
22
Result
You can use the net service command at the command line, or the services.msc applet, to start, stop, and manage automatic start-up of JBoss Enterprise Application Platform 6 in Microsoft Windows Server. Report a bug
23
Result:
If the server started properly, there will be no errors, and you will see output similar to the following: Example 1.1. Example of a successful start-up
[Server:server-two] 15:47:44,372 INFO [org.jboss.as] (MSC service thread 1-3) JBoss AS 7.0.0.Final" started in 4227ms - Started 114 of 162 services (48 services are passive or on-demand)
In a managed domain, you see a similar message for each locally-run server.
23
23
Chapter 1. JBoss Enterprise Application Platform 6 2. Browse to the Management Console. If the installation worked properly and your server is running, you should be able to access the Management Console by pointing your web browser at an address similar to http://YOUR_SERVER:9990/, replacing YOUR_SERVER with a valid value.
Result:
The front page of the Management Console appears.
Result:
The Management Console is a deployable service. If you are able to reach it after starting the server, your installation is working properly and is able to deploy services. Report a bug
24
Unless otherwise stated, the ports use the TCP protocol. The default socket binding groups full-ha-sockets full-sockets ha-sockets standard-sockets
24
24
Network Ports Used By JBoss Enterprise Application Platform 6 Table 1.5. Reference of the default socket bindings Name ajp Port 8009 Mulicast Description Port full-hasockets fullsockets Yes hasocket Yes standardsocket Yes
Apache JServ Yes Protocol. Used for HTTP clustering and load balancing. The default port for deployed web applications. SSL-encrypted connection between deployed web applications and clients. CORBA services for JTS transactions and other ORBdependent services. SSL-encrypted CORBA services. 7500 Multicast. Used for peer discovery in HA clusters. Yes
http
8080
Yes
Yes
Yes
https
8443
Yes
Yes
Yes
Yes
jacorb
3528
Yes
Yes
No
No
Yes Yes
Yes No
No Yes
No No
45700
Multicast. Used Yes to discover initial membership in a HA cluster. Unicast peer discovery in HA clusters using TCP. Used for HA failure detection over TCP. Yes
No
Yes
No
jgroups- 7600 tcp jgroups- 57600 tcp-fd jgroups- 55200 udp jgroups- 54200 udp-fd messaging 5445 messaginggroup 45688
No
Yes
No
Yes Yes
No No
Yes Yes
No No
Unicast peer discovery in HA clusters using UDP. Used for HA failure detection over UDP. JMS service. Referenced by HornetQ JMS broadcast and discovery groups. Used by JMS Remoting.
No Yes Yes
Yes No No
No No No
Yes Yes
Yes No
No Yes
No No
25
Chapter 1. JBoss Enterprise Application Platform 6 Name Port Mulicast Description Port JBoss Enterprise Application Platform and the HTTP load balancer. osgihttp 8090 Used by internal components which use the OSGi subsystem. Used for remote EJB invocation. The JTA transaction recovery manager. The JTA / JTS transation manager. Yes Yes Yes Yes full-hasockets fullsockets hasocket standardsocket
Yes Yes
Yes Yes
Yes Yes
Yes Yes
Yes
Yes
Yes
Yes
Management Ports
In addition to the socket binding groups, each host controller opens two more ports for management purposes: 9990 - The Web Management Console port 9999 - The port used by the Management Console and Management API Report a bug
25
1.6.8. Configure Network Firewalls to Work with JBoss Enterprise Application Platform 6
Overview
Most production environments use firewalls as part of an overall network security strategy. If you need multiple server instances to communicate with each other or with external services such as web servers or databases, your firewall needs to take this into account. A well-managed firewall only opens the ports which are necessary to operation, and limits access to the ports to specific IP addresses, subnets, and network protocols. A full discussion of firewalls is out of the scope of this documentation.
25
26
Configure Network Firewalls to Work with JBoss Enterprise Application Platform 6 Prerequisites Determine the ports you need to open. Refer to Section 1.6.7, Network Ports Used By JBoss Enterprise Application Platform 6 to determine the list of ports for your situation. An understanding of your firewall software is required. This procedure uses the system-configfirewall command in Red Hat Enterprise Linux 6. Microsoft Windows Server includes a built-in firewall, and several third-party firewall solutions are available for each platform.
Assumptions
This procedure configures a firewall in an environment with the following assumptions: The operating system is Red Hat Enterprise Linux 6. JBoss Enterprise Application Platform 6 runs on host 10.1.1.2. Optionally, the server has its own firewall. The network firewall server runs on host 10.1.1.1 on interface eth0, and has an external interface eth1. You want traffic on port 5445 (a port used by JMS) forwarded to JBoss Enterprise Application Platform 6. No other traffic should be allowed through the network firewall. Procedure 1.9. Task 1. Log into the Management Console. Log into the Management Console. By default, it runs on http://localhost:9990/console/. 2. Managed Domain: Determine the socket binding group your server group uses. Each server group uses a socket binding group, which is a collection of socket bindings. A socket binding is a name-value pair of port name and number. To determine which socket binding group your server groups, click the Server Groups label at the top right side of the screen. Then click the name of your server group in the Available server group configurations table. The Server attributes area at the bottom of the screen is populated with the profile and socket binding group used by the server group. 3. Determine the socket bindings used by the socket binding group. Click the Profiles label at the top right of the Management Console. At the left-hand side of the screen, a series of menus is shown. The bottom menu heading is General Configuration. Click the Socket Binding Groups item below this heading. The Socket Binding Declarations screen appears. Initially, the standard-sockets group is shown. You can choose a different group by selecting it from the combo box on the right-hand side.
Note
If you use a standalone server, it has only one socket binding group.
The list of socket names and ports is shown, six values per page. You can go through the pages by using the arrow navigation below the table. 4. Determine the ports you need to open. Depending on the function of the particular port and the needs of your environment, some of the ports may need to be accessible across your firewall. If you are unsure of the purpose of a socket 27
Chapter 1. JBoss Enterprise Application Platform 6 binding, refer to Section 1.6.7, Network Ports Used By JBoss Enterprise Application Platform 6 for a list of the default socket bindings and their purposes. 5. Configure your firewall to forward traffic to JBoss Enterprise Application Platform 6. Perform these steps to configure your network firewall to allow traffic on the desired port. a. b. Log into your firewall machine and access a command prompt, as the root user. Issue the command system-config-firewall to launch the firewall configuration utility. A GUI or command-line utility launches, depending on the way you are logged into the firewall system. This task makes the assumption that you are logged in via SSH and using the command-line interface. Use the TAB key on your keyboard to navigate to the Customize button, and press the ENTER key. The Trusted Services screen appears. Do not change any values, but use the TAB key to navigate to the Forward button, and press ENTER to advanced to the next screen. The Other Ports screen appears. Use the TAB key to navigate to the <Add> button, and press ENTER. The Port and Protocol screen appears. Enter 5445 in the Port / Port Range field, then use the TAB key to move to the Protocol field, and enter tcp. Use the TAB key to navigate to the OK button, and press ENTER. Use the TAB key to navigate to the Forward button until you reach the Port Forwarding screen. Use the TAB key to navigate to the <Add> button, and press the ENTER key. Fill in the following values to set up port forwarding for port 5445. Source interface: eth1 Protocol: tcp Port / Port Range: 5445 Destination IP address: 10.1.1.2 Port / Port Range: 5445 Use the TAB key to navigate to the OK button, and press ENTER. j. k. 6. Use the TAB key to navigate to the Close button, and press ENTER. Use the TAB key to navigate to the OK button, and press ENTER. To apply the changes, read the warning and click Yes.
c. d. e. f. g. h. i.
Configure a firewall on your JBoss Enterprise Application Platform 6 host. Some organizations choose to configure a firewall on the JBoss Enterprise Application Platform 6 server itself, and close all ports that are not necessary for its operation. Consult Section 1.6.7, Network Ports Used By JBoss Enterprise Application Platform 6 and determine which ports to open, then close the rest. The default configuration of Red Hat Enterprise Linux 6 closes all ports except 22 (used for Secure Shell (SSH) and 5353 (used for multicast DNS). While you are configuring ports, make sure you have physical access to your server so that you do not inadvertently lock yourself out.
28
Result
Your firewall is configured to forward traffic to your internal JBoss Enterprise Application Platform 6 server in the way you specified in your firewall configuration. If you chose to enable a firewall on your server, all ports are closed except the ones needed to run your applications. Report a bug
26
Note
HTTP access is considered to be remote, even if you connect to the localhost using HTTP.
1. The client sends a message to the server which includes a request to authenticate with the local SASL mechanism. 2. The server generates a one-time token, writes it to a unique file, and sends a message to the client with the full path of the file. 3. The client reads the token from the file and sends it to the server, verifying that it has local access to the filesystem. 4. The server verifies the token and then deletes the file. Remote clients, including local HTTP clients, use realm-based security. The default realm with the permissions to configure the JBoss Enterprise Application Platform 6 remotely using the management interfaces is ManagementRealm. A script is provided which allows you to add users to this realm (or realms you create). For more information on adding users, refer to the Getting Started chapter of the Installation guide for JBoss Enterprise Application Platform 6. For each user, the username, a hashed password, and the realm are stored in a file. The file is in a different location if the JBoss Enterprise Application Platform 6 is configured as a managed domain or a standalone server.
26
29
Standalone server
EAP_HOME/standalone/configuration/mgmt-users.properties
Even though the contents of the mgmt-users.properties are masked, the file should still be treated as a sensitive file. It is recommended that it be set to the file mode of 600, which gives no access other than read and write access by the file owner. Report a bug
27
27
30
Uninstall JBoss Enterprise Application Platform 6 From a Graphical Installation 2. Remove the installation directory. JBoss Enterprise Application Platform 6 installs in a single directory when you use the Zip installation method. Delete the installation directory to uninstall JBoss Enterprise Application Platform 6. Optional: Remove any initialization scripts you created. If you created initialization scripts or other scripts which depended upon JBoss Enterprise Application Platform 6 being installed on your computer, remove them. Optional: Microsoft Windows: Remove JBoss Enterprise Application Platform 6 from your Services. To remove the JBoss Enterprise Application Platform 6 service, run the following command at a command prompt, as an administrative user: sc delete "JBEAP6SVC".
3.
4.
Result:
JBoss Enterprise Application Platform 6 is uninstalled from your server. Report a bug
29
2.
Result:
JBoss Enterprise Application Platform 6 is uninstalled from your server. Report a bug
30
29
31
Chapter 1. JBoss Enterprise Application Platform 6 2. Optional: Create a list of files and directories created by the RPM installation. To create a list of files and directories created by the RPM installation, run the command rpm ql jboss-eap6 > /tmp/jbeap6.txt. The reason to do this step is because removing the RPM may not remove all of these files and directories from your system. You may need to remove some of them by hand. Remove the package with the yum command. Use the YUM groupremove command to remove the jboss-eap6 group.
yum groupremove jboss-eap6
3.
4.
Optional: Check for and remove files or directories that were not removed by the yum groupremove command. Check the list of files and directories created by the rpm -ql command above. Remove any that were not removed automatically.
Result
JBoss Enterprise Application Platform 6 is uninstalled from your server. Report a bug
31
31
32
33
34