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) Copiar enlaceEnlace copiado en el portapapeles!
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>
# pkg install jdk-<version>
Where <version> is the version of the JDK to install, such as jdk-8
Alternative: Download and Install a Java Development Kit on Solaris
- 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.
- Run the JDK installation file.
Open
/usrat a shell prompt, and run the following command to display the current Java symbolic link:ls -lad java
ls -lad javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the link:
rm java
rm javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new Java symbolic link to the newly installed JDK:
ln -sf /usr/jdk/<JDK>
ln -sf /usr/jdk/<JDK>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Downloading and Extracting JBoss Web Server Copiar enlaceEnlace copiado en el portapapeles!
To install JBoss Web Server, download and extract the installation ZIP files.
- Open a browser and log in to the Red Hat Customer Portal.
- Click Downloads.
- Click Red Hat JBoss Web Server in the Product Downloads list.
- Select the correct JBoss Web Server version from the Version drop-down menu.
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).
-
The Red Hat JBoss Web Server 5.0 Application Server (
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/
# 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 Copied! Toggle word wrap Toggle overflow
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 Copiar enlaceEnlace copiado en el portapapeles!
Some configuration is required before running JBoss Web Server. This section includes the following configuration procedures:
Running the Post-Installation Scripts
-
Open a shell prompt, and change directory to
JWS_HOME/tomcat/. As the root user, run the post-installation scripts:
sh .postinstall.tomcat
# sh .postinstall.tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow The post-installation script:
-
Sets the
JAVA_HOMEenvironment variable. -
Creates the
tomcatuser. -
Creates the
tomcatuser group.
-
Sets the
4.4. Managing JBoss Web Server on Solaris using a system daemon Copiar enlaceEnlace copiado en el portapapeles!
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:
- To add JBoss Web Server 5.0 to SysV, see: Enabling JBoss Web Server 5.0 management using SysV on Solaris
- To review basic management commands for JBoss Web Server on SysV, see: Managing the JBoss Web Server using SysV
For SMF users:
- To add JBoss Web Server 5.0 to the SMF, see: Enabling JBoss Web Server 5.0 management using the Solaris Service Management Facility (SMF)
- To review basic management commands for JBoss Web Server on SysV, see: Managing the JBoss Web Server using the Service Management Facility (SMF)
4.4.1. Enabling JBoss Web Server 5.0 management using SysV on Solaris Copiar enlaceEnlace copiado en el portapapeles!
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
-
On a command line, change to the
JWS_HOME/tomcat/directory. Copy the control script from the
JWS_HOME/tomcat/servicesdirectory to/etc/init.d/:cp services/jws5-tomcat.init /etc/init.d/jws5-tomcat
# cp services/jws5-tomcat.init /etc/init.d/jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow Issue the following command to set the control script as executable:
chmod +x /etc/init.d/jws5-tomcat
# chmod +x /etc/init.d/jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Results
The JBoss Web Server 5.0 instance of tomcat should now be present in SysV. For example:
service jws5-tomcat status
$ service jws5-tomcat status
jws5-tomcat is stopped
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 Copiar enlaceEnlace copiado en el portapapeles!
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
# chkconfig jws5-tomcat onCopy to Clipboard Copied! Toggle word wrap Toggle overflow To start the JBoss Web Server using SysV:
service jws5-tomcat start
# service jws5-tomcat startCopy to Clipboard Copied! Toggle word wrap Toggle overflow To stop the JBoss Web Server using SysV:
service jws5-tomcat stop
# service jws5-tomcat stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow To verify the status of the JBoss Web Server using SysV (the
statusoperation can be executed by any user):service jws5-tomcat status
$ service jws5-tomcat statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow
For information on using SysV, see: Red Hat Enterprise Linux 6 Deployment Guide: Running Services
4.4.3. Enabling JBoss Web Server 5.0 management using the Solaris Service Management Facility (SMF) Copiar enlaceEnlace copiado en el portapapeles!
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.
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
-
On a command line, change to the
JWS_HOME/tomcat/directory. As the root user, import the control script into the SMF using the
svcbundlecommand:svcbundle -i -s rc-script=JWS_HOME/tomcat/services/jws5-tomcat.init:3 -s service-name=jws5-tomcat
# svcbundle -i -s rc-script=JWS_HOME/tomcat/services/jws5-tomcat.init:3 -s service-name=jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Results
The JBoss Web Server 5.0 instance of tomcat should now be present in the SMF. For example:
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
- For information on the Oracle Solaris Service Management Facility (SMF), see: Oracle: Introducing the Basics of Service Management Facility (SMF) on Oracle Solaris 11.
- For information on the basic usage of the SMF, see: Oracle Solaris Administration: Common Tasks - Managing SMF Services.
-
For information on using the
svcbundlecommand to migrate control scripts to the SMF, see: Oracle: Developing System Services in Oracle® Solaris 11.3 - Converting a Run Control Script to an SMF Service.
4.4.4. Managing the JBoss Web Server using the Service Management Facility (SMF) Copiar enlaceEnlace copiado en el portapapeles!
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
# svcadm enable jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow To start the JBoss Web Server using the SMF:
svcadm enable -t jws5-tomcat
# svcadm enable -t jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow To stop the JBoss Web Server using the SMF:
svcadm disable -t jws5-tomcat
# svcadm disable -t jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow To verify the status of the JBoss Web Server using the SMF:
svcs -l jws5-tomcat
$ svcs -l jws5-tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional Resources
- For information on the Oracle Solaris Service Management Facility (SMF), see: Oracle: Introducing the Basics of Service Management Facility (SMF) on Oracle Solaris 11.
- For information on the basic usage of the SMF, see: Oracle Solaris Administration: Common Tasks - Managing SMF Services.
4.5. Manually managing JBoss Web Server on Solaris Copiar enlaceEnlace copiado en el portapapeles!
To manually start or stop JBoss Web Server on Solaris using JSVC:
4.5.1. Starting JBoss Web Server Copiar enlaceEnlace copiado en el portapapeles!
To start JBoss Web Server: as the root user, run the following command:
sh JWS_HOME/tomcat/bin/daemon.sh start
# sh JWS_HOME/tomcat/bin/daemon.sh start
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 Copiar enlaceEnlace copiado en el portapapeles!
To stop JBoss Web Server: as the root user, run the following command:
sh JWS_HOME/tomcat/bin/daemon.sh stop
# sh JWS_HOME/tomcat/bin/daemon.sh stop