Chapter 5. Install the Platform

5.1. Install OpenJDK on Red Hat Enterprise Linux

Download and Install OpenJDK

Complete this task to install OpenJDK on Red Hat Enterprise Linux, and configure the system to use it as the default Java installation. OpenJDK is one of many Java Development Kits (JDKs) supported in Red Hat Enterprise Linux for use with Red Hat JBoss products.

Note

It is possible to install multiple JDKs on a single system.

Prerequisites

Your system must meet the following conditions before continuing with this task:
  1. Install the OpenJDK RPM

    Install OpenJDK using the yum command-line interface as a root user. Install the latest compatible version of OpenJDK for your Red Hat Enterprise Linux installation.
    OpenJDK 6
    yum install java-1.6.0-openjdk-devel
    OpenJDK 7
    yum install java-1.7.0-openjdk-devel
  2. Optional: Install and configure the alternatives utility

    Red Hat Enterprise Linux includes a utility called alternatives, which lets you change the default Java version for applications which allow multiple versions to be installed. OpenJDK is one such application.
    To use the alternatives utility, perform the following steps.
    1. Log in as the root user, or prefix the commands below with the sudo command.
    2. 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
    3. Issue the following command:
      /usr/sbin/alternatives --config java
    4. Follow the prompts to set the default version of OpenJDK.
  3. Optional: Set the JAVA_HOME environment variable

    Some applications, such as Apache Maven and Apache Ant, and utilities, such as alternatives require you to set the JAVA_HOME environment variable. The JAVA_HOME variable points to the bin directory containing the required Java executable. To set the JAVA_HOME environment variable perform the following steps.
    1. Determine the correct value for JAVA_HOME. For example, 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.
    2. As the user who will use OpenJDK, open the shell configuration file. For the Bash shell, this file is /home/username/.bashrc.
    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"
      If you are setting the environment variable for alternatives utility, then at the bottom of the file type the following line: export JAVA_HOME="/etc/alternatives/jre"
    4. Save the file, and log out of and back into your session.
OpenJDK is installed on the server and available for use. If necessary, 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.

5.2. Install Red Hat JBoss Portal

  1. Navigate to the parent directory where the Red Hat JBoss Portal (JBoss Portal) Zip archive will be extracted.
    Before continuing, verify the chosen directory, and it's access permissions, meet organizational security and deployment requirements.
  2. Unzip jboss-portal-[version].zip to extract the Zip archive contents to the directory.
    A command-line or GUI archive manager is suitable for this task, depending on the server environment.
    The jboss-portal-[version] directory is created with an installation of JBoss Portal in its default configuration.

5.3. Install and Configure JBoss Operations Network Plug-in

Red Hat JBoss Portal provides a JBoss Operations Network agent plug-in pack, which is available for download for customers with a "JPP with Management" entitlement.
Information about what the agent plug-in offers is located in the Administration and Monitoring section of the Administration and Configuration Guide, which is hosted at https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Portal/6.1/html/Administration_and_Configuration_Guide/part-Administration_and_Monitoring.html.
You must download and install the Red Hat JBoss Operations Network server before you can install the Agent Plug-in. See the Red Hat JBoss Operations Network Installation Guide for instructions relating to installing and configuring Red Hat JBoss Operations Network.
See Installing JBoss Agent Plug-in Packs in the JON Installation Guide for the procedure to install the agent plug-in pack downloaded earlier.

5.4. Installation Structure and Details

Red Hat JBoss Portal (JBoss Portal) includes a simplified directory structure, compared to previous versions. Following is a listing of the directory structure, and a description of what the directory contains.

Example 5.1. Top Level Directories

The top level directories include the gatein-management and gatein-sso directories that contain gatein war files and gatein sso, saml,josso, opensso and cas related directories. The top level directories also include the jboss-jpp-6.2 directory that consist of directories related to domain mode configuration and standalone mode configuration, other binaries, logging properties files and so on.
jboss-jpp-6.2
├── appclient
│   └── configuration
├── bin
│   ├── add-user.bat
│   ├── add-user.sh
│   ├── appclient.bat
│   ├── appclient.conf
│   ├── appclient.conf.bat
│   ├── appclient.sh
│   ├── client
│   ├── demo-domain-setup.sh
│   ├── domain.bat
│   ├── domain.conf
│   ├── domain.conf.bat
│   ├── domain.sh
│   ├── init.d
│   ├── jboss-cli.bat
│   ├── jboss-cli-logging.properties
│   ├── jboss-cli.sh
│   ├── jboss-cli.xml
│   ├── jconsole.bat
│   ├── jconsole.sh
│   ├── jdr.bat
│   ├── jdr.sh
│   ├── portal-setup.bat
│   ├── portal-setup.sh
│   ├── product.conf
│   ├── run.bat
│   ├── run.sh
│   ├── standalone.bat
│   ├── standalone.conf
│   ├── standalone.conf.bat
│   ├── standalone.sh
│   ├── vault.bat
│   ├── vault.sh
│   ├── wsconsume.bat
│   ├── wsconsume.sh
│   ├── wsprovide.bat
│   └── wsprovide.sh
├── bundles
│   └── system
├── docs
│   ├── examples
│   ├── licenses
│   └── schema
├── domain
│   ├── configuration
│   ├── data
│   └── tmp
├── gatein
│   ├── extensions
│   └── gatein.ear
├── JBossEULA.txt
├── jboss-modules.jar
├── LICENSE.txt
├── modules
│   ├── layers.conf
│   └── system
│       └── layers
│           ├── base
│           └── gatein
├── standalone
│   ├── configuration
│   ├── data
│   ├── deployments
│   ├── lib
│   ├── log
│   └── tmp
├── version.txt
└── welcome-content
    ├── eap.css
    ├── favicon.ico
    ├── images
    ├── index.html
    ├── index_noconsole.html
    ├── jpp.css
    ├── noconsole.html
    └── noredirect.html

gatein-management
└── gatein-management-cli.war

gatein-sso
├── cas
│   └── plugin
├── josso
│   ├── gatein-josso-181
│   ├── gatein-josso-182
│   ├── josso-181
│   └── josso-182
├── opensso
│   └── plugin
├── README
└── saml
    └── idp-sig.war

Example 5.2. Directories within the gatein/ directory

gatein
├── extensions
│   ├── gatein-wsrp-integration.ear
│   │   ├── extension-war.war
│   │   ├── lib
│   │   ├── META-INF
│   │   ├── wsrp-admin-gui.war
│   │   └── wsrp-producer.war
│   ├── jpp-branding-extension.ear
│   └── jpp-mobile-integration.ear
│       ├── gatein-mobile-login.war
│       ├── jpp-information-portlet.war
│       ├── jpp-mobile-configuration.war
│       ├── jpp-responsive-skin.war
│       ├── META-INF
│       ├── redirect-portlet.war
│       ├── responsive-banner-portlet.war
│       ├── responsive-features-portlet.war
│       ├── responsive-footer-portlet.war
│       ├── responsive-header-portlet.war
│       └── responsive-navigation-portlet.war
└── gatein.ear
    ├── dashboard.war
    ├── exoadmin.war
    ├── eXoGadgetServer.war
    ├── eXoGadgets.war
    ├── eXoResources.war
    │   ├── javascript
    │   ├── META-INF
    │   ├── skin
    │   └── WEB-INF
    ├── gwtGadgets.war
    ├── integration.war
    │   └── WEB-INF
    ├── META-INF
    │   ├── application.xml
    │   └── jboss-deployment-structure.xml
    ├── portal.war
    │   ├── device
    │   ├── error
    │   ├── favicon.ico
    │   ├── groovy
    │   ├── login
    │   ├── META-INF
    │   ├── setup
    │   ├── templates
    │   ├── WEB-INF
    │   └── welcome.jsp
    ├── redirect-admin.war
    ├── rest.war
    └── web.war


Example 5.3. Directories within the standalone/ directory

standalone
├── configuration
│   ├── application-roles.properties
│   ├── application-users.properties
│   ├── gatein
│   │   ├── codec
│   │   ├── configuration.properties
│   │   ├── configuration.xml
│   │   ├── controller.xml
│   │   ├── gadgets
│   │   ├── portlet.xml
│   │   └── wsrp
│   ├── logging.properties
│   ├── mgmt-users.properties
│   ├── standalone-full-ha.xml
│   ├── standalone-full.xml
│   ├── standalone-ha.xml
│   ├── standalone-osgi.xml
│   ├── standalone.xml
│   └── standalone_xml_history
│       ├── current
│       ├── snapshot
│       ├── standalone.boot.xml
│       ├── standalone.initial.xml
│       └── standalone.last.xml
├── data
│   ├── content
│   ├── gatein
│   │   ├── jcr
│   │   └── portal
│   ├── timer-service-data
│   ├── tx-object-store
│   │   └── ShadowNoFileLockStore
│   └── wsdl
│       └── gatein-wsrp-integration.ear
├── deployments
│   └── README.txt
├── lib
│   └── ext
├── log
│   ├── server.log
│   └── server.log.2013-09-04
└── tmp
    ├── auth
    ├── vfs
    │   ├── deployment1e5dbb2debad1ef9
    │   ├── deploymentaa52d43feb530be9
    │   ├── deploymentbbd242b840f00e6
    │   ├── temp16524ed851e8e554
    │   ├── temp44c44c4d38f5c74c
    │   └── tempac089482639a2df5
    └── work
        └── jboss.web

5.5. Run as an Operating System Service

Red Hat JBoss Portal is based on Red Hat JBoss Enterprise Application Platform 6. It can be configured to run as a service, allowing the server to start in Standalone configuration at system runtime. The server instance will continue to run after logging out of the local system.

5.5.1. Install as a Service in Red Hat Enterprise Linux

Install Red Hat JBoss Portal as a Red Hat Enterprise Linux Service

Complete this task to configure Red Hat JBoss Portal (JBoss Portal) as a service in Red Hat Enterprise Linux. When completed, JBoss Portal starts automatically when the Red Hat Enterprise Linux system reaches its default run-level, and stops automatically when the operating system executes its shutdown routine.

Prerequisites

You must have administrator access to perform this task.
  1. Copy the startup script to the /etc/jboss-as/ directory

    The startup script, and an associated configuration file, are located in the $JPP_HOME/bin/init.d/ directory. Copy each file to the required location.
    [user@host init.d]$ sudo cp jboss-as.conf /etc/jboss-as
    [user@host init.d]$ sudo cp jboss-as-standalone.sh /etc/init.d/
  2. Add the startup script as a service

    Add the new jboss-as-standalone.sh service to list of automatically started services, using the chkconfig service management command.
    [user@host init.d]$ sudo chkconfig --add jboss-as-standalone.sh
  3. Configure script options and variables

    Edit the jboss-as.conf file to customize startup options for JBoss Portal and the JVM. Use the comments in the file as general guidance.
    Because the start-up script makes default assumptions about the name of the start-up file and the location of the JBoss Portal instance, some customization is required to the script before it can be run as a service. Customize the script, paying special attention to the following variables:
    JBOSS_HOME
    Location where JBoss Portal is extracted.
    It is recommended to set the JBOSS_HOME variable to point to the directory where you extracted JBoss Portal. Some applications require this variable in order to function correctly. Do not add a trailing slash (/) at the end of the directory name.
    JBOSS_USER
    User with the ability to run JBoss Portal as a non-privileged user (superuser privileges are not required to run JBoss Portal).
    JBOSS_CONFIG
    Name of the configuration file used to start JBoss Portal, such as standalone.xml
    JBOSS_SCRIPT
    Script used to start JBoss Portal, such as standalone.sh.
  4. Optional: Start the service.

    If desired, start the new service using the standard syntax for starting Red Hat Enterprise Linux services.
    [user@host bin]$ sudo service jboss-as-standalone start

5.6. Start as a Standalone Server

Red Hat Enterprise Linux.
Run the following command to start the server in standalone mode:
JPP_HOME/bin/standalone.sh
Optional: Specify additional parameters.
To print a list of additional parameters to pass to the start-up scripts, use the -h parameter.

5.7. Test the Installation

  1. Look for error messages in the log file

    After you start the server, view the log file in JPP_HOME/standalone/log/.
    Result:
    If the server started properly, there will be no errors, and you will see output similar to the following:

    Example 5.4. Example of a successful start-up

    14:36:32,632 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Portal Platform 6.0.0.ER04.2 (AS 7.1.3.Final-redhat-4) started in 23519ms - Started 919 of 1041 services (116 services are passive or on-demand)
    
  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.

5.8. Uninstall Red Hat JBoss Portal (Zip Installation)

This section covers the steps required to uninstall a Zip installation of Red Hat JBoss Portal (JBoss Portal) 6.

Prerequisites

Backup any modified configuration files and deployments that may be reused in a later instance.
  1. Navigate to the directory where the JBoss Portal 6 folder from the Zip file is extracted.
  2. JBoss Portal 6 installs in a single directory. Delete the installation directory to uninstall JBoss Portal 6.
  3. Delete any initialization scripts, or other scripts which depended upon JBoss Portal 6 being installed on the server.
JBoss Portal 6 is now uninstalled from the server.