Installation Guide Jboss Web Server2
RPM Required
krb5-workstation
mod_auth_kerb
elinks (required for the apachectl functionality)
Install RPM
# yum install krb5-workstation m od_auth_kerb elinks
Check RPM
# rpm -q krb5-workstation m od_auth_kerb elinks
Installing Java
2. On the command line, as the root user run the command to install Java 1.6 or 1.7:
A. On Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6, execute the yum install
command to install Java 1.6:
# yum install java-1.6.0-<VENDOR>-devel
Execute the following variation of the listed command to install Java 1.7:
# yum install java-1.7.0-<VENDOR>-devel
3. Run the following commands as the root user (if switching from another user, make sure to run the
command su -) to make sure the correct JDK is in use:
# alternatives --config java
# alternatives --config javac
T hese commands return lists of available JDK versions with the version in use marked with a plus
(+) sign. If the set JDK is not the desired option, switch to the right JDK as instructed on the
command line.
Download JBoss Operations Network (JON) Plugin
Complete this task to download the JBoss Operations Network (JON) plugin for JBoss Enterprise Web
Server from the Red Hat Customer Portal.
Procedure 2.3. Download Installation Files
1. Open http://access.redhat.com in a web browser.
2. Click Downloads in the menu across the top of the page.
3. Click Downloads in the list under JBoss Enterprise Middleware.
4. Enter your login information.
You are taken to the Software Downloads page.
5. Download the JBoss Operations Network Plugin
If you intend to use the JBoss Operations Network plugin for JBoss Enterprise Web Server, select
JBoss ON for EWS from either the Software Downloads drop-down box, or the menu on the left.
a. Click the JBoss Operations Network VERSION Base Distribution download link.
b. Click the Download link to start the Base Distribution download.
c. Repeat the steps to download the EWS Plugin Pack for JBoss ON VERSION
Installing Enterprise Web Server from a ZIP File
Make sure that you have installed all the required packages before you install JBoss Enterprise Web
Server from a Z IP file
Downloading and Extracting the ZIP File
T o install JBoss Enterprise Web Server, download and extract the installation Z IP file. T he Z IP file is
available on the Red Hat Customer Portal.
Downloading the Enterprise Web Server ZIP File
Download the JBoss Enterprise Web Server Z IP files (jboss-ews-application-servers-2.0.1-
<platform >-<architecture>.zip and jboss-ews-httpd-2.0.1-<platform >-
<architecture>.zip) from the Red Hat Customer Portal site:
1. Open http://access.redhat.com in your web browser.
2. In the upper right corner, click the Log in button.
3. Enter your login information and click Log in.
4. Hover over the Downloads option in the menu bar at the top of the page and under JBoss
Enterprise Middleware in the displayed menu, click Downloads.
5. In the Product drop-down box column, click Web Server.
6. On the Software Downloads page, select the product version in the Version drop-down box and in
the Releases tab below, click the JBoss EWS link with the correct version.
7. On the Software Details page, click the Download button next to the File drop-down box for the
jboss-ews-application-servers-2.0.1-<platform >-<architecture>.zip and
jboss-ews-httpd-2.0.1-<platform >-<architecture>.zip files.
8. Confirm the file downloads have successfully completed.
Unzip the downloaded Z IP files:
1. On the command line, change to the directory with the Z IP files.
2. Run the following unzip command, once for each Z IP file:
unzi p <FILE_NAME> -d <TARGET_DIRECTORY>
Substitute FILE_NAME with the name of each downloaded file and TARGET_DIRECTORY with the
path to the target directory. After the Z IP files are extracted, configure the environment before
running JBoss Enterprise Web Server
Configuring the Environment
Setting JAVA_HOME
1. In the bin directory of your T omcat (either $EWS_HOME/tom cat6/bin or
$EWS_HOME/tom cat7/bin), create the setenv.sh file.
For example, run the command vim tom cat<VERSION>/bin/setenv.sh
2. Add the JAVA_HOME path definition into the file.
For example export JAVA_HOME=/usr/lib/jvm /jre-1.6.0-openjdk.x86_64
Creating tomcat User
Follow this procedure to create the tomcat user and its parent group:
At the shell prompt, become the root user.
2. Run the following command to create the tomcat user group:
# groupadd -g 91 -r tom cat
3. Go to /opt/jboss-ews-2.0.
4. From /opt/jboss-ews-2.0, run the following command to create the tomcat user in the tomcat user
group:
# useradd -c "Tom cat" -u 91 -g tom cat -s /bin/sh -r tom cat
5. From /opt/jboss-ews-2.0, run the following command to assign the ownership of the tomcat
directories to the tom cat user and allow the user to run the tomcat service:
# cho wn -R to mcat:to mcat to mcat<VERSION>
Substitute <VERSION> with the respective tomcat version number (6 or 7).
6. From /opt/jboss-ews-2.0, issue the command ls -l and check if the tomcat user is the owner of
the T omcat directory.
7. Make sure that the tom cat user has the execution permission to all parent directories.
Setting the apache User
Follow this procedure to set up the apache user:
Run the following commands as the root user to create the apache user group:
# groupadd -g 48 -r apache
2. Run the following command to create the apache user in the apache user group:
# useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apache
3. Change to /opt/jboss-ews-2.0 and run the following command to assign the ownership of the
apache directories to the apache user and allow the user to run httpd:
# chown -R apache:apache httpd
4. From /opt/jboss-ews-2.0, issue the command ls -l and check that the apache user has
execution permission to the respective Apache install path. Output is similar to the following:
drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpd
Removing SSL
JBoss Enterprise Web Server supports SSL by default, but it can be removed.
Follow this procedure to remove or re-add SSL:
1. Go to the /opt/jboss-ews-2.0/httpd/conf.d/ directory.
2. Rename the SSL configuration file:
A. T o remove SSL, rename ssl.conf to ssl.conf.disabled.
B. T o re-add SSL, rename ssl.conf.disabled to ssl.conf.
Configuring log4 j
Follow this procedure to add log4 j logging to T omcat:
1. Go to the /opt/jboss-ews-2.0/extras/ directory.
2. Copy the log4 j.jar and log4 j.properties files to the lib directory of the T omcat
directory:
A. If using T omcat 6, run the following commands:
extras]# cp log4j.properties ../tom cat6/lib/
extras]# cp log4j.jar ../tom cat6/lib/
B. If using T omcat 7, run the following commands:
extras]# cp log4j.properties ../tom cat7/lib/
extras]# cp log4j.jar ../tom cat7/lib/
Configuring mod_jk
T o configure the HT T P Server to use mod_jk, define the following:
available workers (JBoss instances) in the workers.properties file
the mod_jk configuration file
Follow this procedure to configure the HT T P Server to use mod_jk as its load balancer:
1. In the /opt/jboss-ews-2.0/httpd/conf/ directory, create workers.properties.
2. In the /opt/jboss-ews-2.0/httpd/conf.d/ directory, create m od_jk.conf.
Configuring mod_cluster
T he mod_cluster configuration can be customized in /opt/jboss-ews-
2.0/httpd/conf.d/m od_cluster.conf.
For further information about customizing mod_cluster, refer to the JBoss HTTP Connector section of
the HTTP Connectors and Load Balancing Guide.
Procedure 2.13. Running the Post-Installation Script
Follow this procedure to run the post-installation script:
1. At the shell prompt, become the root user.
2. Change to the /opt/jboss-ews-2.0/httpd directory.
3. Run the following command:
# ./.postinstall
Starting and Stopping Tomcat
T omcat can be started, stopped, and configured to start automatically at boot time either from the
command line or using a graphical tool.
T he tom cat6 or tom cat7 services can be started and stopped using the service command as root
on a console window (as is typical of a network service):
T o start and stop the tom cat6 service:
# service tom cat6 start
# service tom cat6 stop
T o start and stop the tom cat7 service:
# service tom cat7 start
#service tom cat7 stop
Once the tomcat service has been started, you can verify that it is running by pointing your web browser
to http://localhost:8080.
T he tomcat service runs under a new tomcat system user. Due to file system permissions it may be
necessary to use the su -s /bin/bash tom cat system command to deploy the application under the
webapps directory. Alternatively, a developer can be listed in the tomcat user group by the system
administrator. T he best approach is to use the Web Console (URL above) to deploy the application.
T he behavior at boot can be controlled with the chkconfig command (see the chkconfig man page
for further details).
Configuration can then be altered in the /etc/sysconfig/tom cat6 file for T omcat version 6 and the
/etc/sysconfig/tom cat7 file for T omcat version 7.
Running Tomcat
T he following procedure outlines the steps to run Tomcat.
Running Tomcat on Red Hat Enterprise Linux
1. After extracting the zip file, check to see if a user called tom cat exists on the system by running
the following command:
id tom cat
2. If the user does not exist, use the following command to add it:
groupadd -g 91 -r tom cat
useradd -c "Tom cat" -u 91 -g tom cat -s /bin/sh -r tomcat
3. If the tom cat user will be running T omcat, change the ownership of the tomcat directories.
a. Use the following command for T omcat 6:
chown -R tomcat:tomcat tom cat6
A. Use the following command for T omcat 7:
chown -R tom cat:tom cat tom cat7
4. T est that the tom cat user has execution permission to the tomcat install path.
5. Set the JAVA_HOME variable. Use one of the following approaches to set this variable.
a. Provide the value for JAVA_HOME externally by setting the value prior to starting T omcat.
A. Set the value for JAVA_HOME in the setenv.sh file. In T omcat 6, this file is available at
tom cat6/bin/ and in T omcat 7, this file is available at tom cat7/bin/. T his value is
loaded from catalina.sh and overrides all other set values for JAVA_HOME.
Start Tomcat
T o start T omcat, execute the following script as the user tom cat:
sh startup.sh
Once the T omcat service has been started, you can verify that it is running by pointing your web
browser to http://localhost:8080.
Stop Tomcat
T o stop T omcat, execute the following script as the user tom cat:
sh shutdown.sh
2.5.5. Starting and Stopping the HTTP Server
T he HT T P Server can be started, stopped, and configured to start automatically at boot time either from
the command line or using a graphical tool.
T he following examples of running the HT T P Server will also cover the differences of undertaking this
on Red Hat Enterprise Linux 5 and 6.
You can start and stop the HT T P Server service using the service command as root on a console
terminal (as is typical of a network service):
T o start and stop the HT T P Server service on Red Hat Enterprise Linux 5 and 6:
service httpd start
service httpd stop
Configuration can then be altered in the /etc/sysconfig/httpd file on Red Hat Enterprise Linux 5
and 6.
2.5.6. Running the HTTP Server
After you have extracted the Enterprise Web Server Z IP file, change into the httpd directory and run the
post install script by executing the following:
./.postinstall
Check to see if a user called apache exists on the system by running the following command:
id apache
If the user does not exist then it will need to be added, along with the appropriate usergroup. In order to
achieve this, execute the following:
/usr/sbin/groupadd -g 91 -r apache 2> /dev/null || :
/usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r -d %{contentdir} apache
2> /dev/null || :
Once this is completed, if the apache user will be running the httpd service, then the ownership of the
HT T P directories will need to be changed to reflect this:
chown -R apache:apache httpd
T o test that the above commands have been successful, check that the apache user has execution
permission to the HTTP server install path.
Start the HT T P server by changing to the httpd directory and executing:
su -m -c "./sbin/apachectl start"
Stop the HT T P server by executing:
su -m -c "./sbin/apachectl stop"
No comments:
Post a Comment