16.3.2. Install the Apache HTTPD included with JBoss EAP 6
- You need root or administrator access to complete this task.
- The Apache Portability Runtime (APR) must be installed. In Red Hat Enterprise Linux, install one of the following packages:
apr-util-devel. If you use a different operating system, refer to the Apache Portability Runtime website at http://apr.apache.org/ to fulfill this requirement.
Procedure 16.2. Install the Apache HTTPD
Navigate to the JBoss EAP downloads list for your platform, on the Red Hat Customer Service Portal.Log in to the Red Hat Customer Service Portal at https://access.redhat.com. Using the menus at the top, choose Downloads, JBoss Enterprise Middleware, Downloads. Select Application Platform from the
Productlist. Select the version of JBoss EAP to see available downloads for that version.
Choose the HTTPD binary from the list.Find the HTTPD binary for your operating system and architecture. Click the Download link. A ZIP file containing the HTTPD distribution downloads to your computer.
Extract the ZIP to the system where the HTTPD binary will run.Extract the ZIP file on your preferred server, to a temporary location. The ZIP file will contain the
httpddirectory under a jboss-ews-version-number folder. Copy the
httpdfolder and place it inside the directory where you installed the JBoss EAP 6, commonly referred to as EAP_HOME.Your HTTPD would now be located in
EAP_HOME/httpd/directory. You can now use this location for HTTPD_HOME, as found in other JBoss EAP 6 documentation.
Run the Post-Installation script and create apache user and group accountsOn a shell prompt, switch to the root user account, navigate to the
EAP_HOME/httpddirectory and execute the following command.
./.postinstallNext, check to see if a user called apache exists on the system by running the following command:
id apacheIf 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 apache 2> /dev/null || :Once this is completed, if the
apacheuser will be running the httpd service, then the ownership of the HTTP directories will need to be changed to reflect this:
chown -R apache:apache httpdTo test that the above commands have been successful, check that the
apacheuser has execution permission to the HTTP server install path.
ls -lThe output should be similar to:
drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpd
Configure the HTTPD.Switch to the new user account using the following command
sudo su apacheand then configure HTTPD as the
apacheuser to meet the needs of your organization. You can use the documentation available from the Apache Foundation at http://httpd.apache.org/ for general guidance.
Start the HTTPD.Start the HTTPD using the following command:
Stop the HTTPD.To stop the HTTPD, issue the following command: