Este contenido no está disponible en el idioma seleccionado.

Chapter 4. Installing JBoss Web Server on Solaris


4.1. Installing a Java Development Kit (JDK)

Before installing JBoss Web Server on Solaris, you must first install a supported Java Development Kit (JDK).

For a list of supported configurations, see the Red Hat Customer Portal article: JBoss Web Server 5 Supported Configurations.

Installing a Java Development Kit (JDK)

Install the Oracle JDK on a command line as the root user:

# pkg install jdk-<version>
Copy to Clipboard Toggle word wrap

Where <version> is the version of the JDK to install, such as jdk-8

Alternative: Download and Install a Java Development Kit on Solaris

  1. Download the Oracle JDK for your operating system and architecture. You can download the JDK installation file from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
  2. Run the JDK installation file.
  3. Open /usr at a shell prompt, and run the following command to display the current Java symbolic link:

    ls -lad java
    Copy to Clipboard Toggle word wrap
  4. Remove the link:

    rm java
    Copy to Clipboard Toggle word wrap
  5. Create a new Java symbolic link to the newly installed JDK:

    ln -sf /usr/jdk/<JDK>
    Copy to Clipboard Toggle word wrap

4.2. Downloading and Extracting JBoss Web Server

To install JBoss Web Server, download and extract the installation ZIP files.

  1. Open a browser and log in to the Red Hat Customer Portal.
  2. Click Downloads.
  3. Click Red Hat JBoss Web Server in the Product Downloads list.
  4. Select the correct JBoss Web Server version from the Version drop-down menu.
  5. Click Download for each of the following files, ensuring that you select the correct platform and architecture for your system:

    • The Red Hat JBoss Web Server 5.0 Application Server (jws-application-servers-5.0.0.zip).
    • The Red Hat JBoss Web Server 5.0 Native Components for Solaris (jws-application-servers-5.0.0-<platform>-<architecture>.zip).
  6. Unzip the downloaded ZIP files to your installation directory.

    For example:

    # unzip jws-application-server-5.0.0.zip -d /opt/
    # unzip -o jws-application-server-5.0.0-<platform>-<architecture>.zip -d /opt/
    Copy to Clipboard Toggle word wrap

The directory created by extracting the ZIP archives is the top-level directory for JBoss Web Server. This is referred to as JWS_HOME.

4.3. Configuring the JBoss Web Server Installation

Some configuration is required before running JBoss Web Server. This section includes the following configuration procedures:

Running the Post-Installation Scripts

  1. Open a shell prompt, and change directory to JWS_HOME/tomcat/.
  2. As the root user, run the post-installation scripts:

    # sh .postinstall.tomcat
    Copy to Clipboard Toggle word wrap

    The post-installation script:

    • Sets the JAVA_HOME environment variable.
    • Creates the tomcat user.
    • Creates the tomcat user group.

4.4. Managing JBoss Web Server on Solaris using a system daemon

Managing a JBoss Web Server with a system daemon allows the web server to restart automatically after a reboot or power outage without user intervention. The system daemon also ensures that the JBoss Web Server is running as the tomcat user and provides some basic logging.

SysV and the Service Management Facility (SMF) are the two system daemons found on Solaris.

For SysV users:

For SMF users:

4.4.1. Enabling JBoss Web Server 5.0 management using SysV on Solaris

Using the JBoss Web Server with SysV provides start, stop and status check functions for the tomcat service. This procedure shows how to add JBoss Web Server 5.0 to SysV.

Prerequisites
  • Root user access.
  • The Red Hat JBoss Web Server 5.0 installed on Oracle Solaris.
  • SysV is the default system daemon.
  • The postinstall script (.postinstall.tomcat) has been executed as the root user.
Procedure
  1. On a command line, change to the JWS_HOME/tomcat/ directory.
  2. Copy the control script from the JWS_HOME/tomcat/services directory to /etc/init.d/:

    # cp services/jws5-tomcat.init /etc/init.d/jws5-tomcat
    Copy to Clipboard Toggle word wrap
  3. Issue the following command to set the control script as executable:

    # chmod +x /etc/init.d/jws5-tomcat
    Copy to Clipboard Toggle word wrap
Results

The JBoss Web Server 5.0 instance of tomcat should now be present in SysV. For example:

$ service jws5-tomcat status

jws5-tomcat is stopped
Copy to Clipboard Toggle word wrap
Next Steps

For information on the basic commands for controlling JBoss Web Server 5.0 using SysV, see: Section 4.4.2, “Managing the JBoss Web Server using SysV”.

Additional Resources

For information on using SysV, see: Red Hat Enterprise Linux 6 Deployment Guide: Running Services

4.4.2. Managing the JBoss Web Server using SysV

SysV commands can only be issued by the root user.

  • To enable the JBoss Web Server services to start at boot using SysV:

    # chkconfig jws5-tomcat on
    Copy to Clipboard Toggle word wrap
  • To start the JBoss Web Server using SysV:

    # service jws5-tomcat start
    Copy to Clipboard Toggle word wrap
  • To stop the JBoss Web Server using SysV:

    # service jws5-tomcat stop
    Copy to Clipboard Toggle word wrap
  • To verify the status of the JBoss Web Server using SysV (the status operation can be executed by any user):

    $ service jws5-tomcat status
    Copy to Clipboard Toggle word wrap

For information on using SysV, see: Red Hat Enterprise Linux 6 Deployment Guide: Running Services

Using the JBoss Web Server with Service Management Facility (SMF) provides start, stop and status check functions for the tomcat service. This procedure shows how to add JBoss Web Server 5.0 to the SMF.

Note

The service runlevel of 3 in the following procedure is a recommended value. For more information on Solaris runlevels, see: Oracle Solaris Administration: Common Tasks - Run Levels

Prerequisites
  • Root user access.
  • The Red Hat JBoss Web Server 5.0 installed on Oracle Solaris 10 or newer.
  • The Oracle Solaris Service Management Facility (SMF) is the default system daemon.
  • The postinstall script (.postinstall.tomcat) has been executed as the root user.
Procedure
  1. On a command line, change to the JWS_HOME/tomcat/ directory.
  2. As the root user, import the control script into the SMF using the svcbundle command:

    # svcbundle -i -s rc-script=JWS_HOME/tomcat/services/jws5-tomcat.init:3 -s service-name=jws5-tomcat
    Copy to Clipboard Toggle word wrap
Results

The JBoss Web Server 5.0 instance of tomcat should now be present in the SMF. For example:

# svcs -l jws5-tomcat

fmri         svc:/jws5-tomcat:default
enabled      true
state        online
next_state   none
state_time   July 25, 2018 01:59:29 AM AEST
logfile      /var/svc/log/jws5-tomcat:default.log
restarter    svc:/system/svc/restarter:default
manifest     /lib/svc/manifest/site/jws5-tomcat.xml
dependency   require_all/none svc:/milestone/multi-user (online)
Copy to Clipboard Toggle word wrap
Next Steps

For information on the basic commands for controlling JBoss Web Server 5.0 using the SMF, see: Section 4.4.4, “Managing the JBoss Web Server using the Service Management Facility (SMF)”.

Additional Resources

The Service Management Facility (SMF) is the default system daemon for Oracle Solaris 10 or higher.

SMF commands can only be issued by the root user.

  • To enable the JBoss Web Server services to start at boot using the SMF:

    # svcadm enable jws5-tomcat
    Copy to Clipboard Toggle word wrap
  • To start the JBoss Web Server using the SMF:

    # svcadm enable -t jws5-tomcat
    Copy to Clipboard Toggle word wrap
  • To stop the JBoss Web Server using the SMF:

    # svcadm disable -t jws5-tomcat
    Copy to Clipboard Toggle word wrap
  • To verify the status of the JBoss Web Server using the SMF:

    $ svcs -l jws5-tomcat
    Copy to Clipboard Toggle word wrap
Additional Resources

4.5. Manually managing JBoss Web Server on Solaris

To manually start or stop JBoss Web Server on Solaris using JSVC:

4.5.1. Starting JBoss Web Server

To start JBoss Web Server: as the root user, run the following command:

# sh JWS_HOME/tomcat/bin/daemon.sh start
Copy to Clipboard Toggle word wrap
Important

Although there are multiple methods of starting Tomcat, it is recommended that you use the daemon.sh script. To start Tomcat as a service using Jsvc, see the Jsvc chapter.

4.5.2. Stopping JBoss Web Server

To stop JBoss Web Server: as the root user, run the following command:

# sh JWS_HOME/tomcat/bin/daemon.sh stop
Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat