16.3.2. Install the Apache HTTPD included with JBoss EAP 6 (ZIP)
Prerequisites
- 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-devel
orapr-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 theProduct
list. 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 thehttpd
directory under a jboss-ews-version-number folder. Copy thehttpd
folder 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 inEAP_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 accounts
On a shell prompt, switch to the root user account, navigate to theEAP_HOME/httpd
directory and execute the following command../.postinstall
Next, 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 apache 2> /dev/null || :
Once this is completed, if theapache
user 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 httpd
To test that the above commands have been successful, check that theapache
user has execution permission to the HTTP server install path.ls -l
The 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 commandsudo su apache
and then configure HTTPD as theapache
user 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:EAP_HOME/httpd/sbin/apachectl start
Stop the HTTPD.
To stop the HTTPD, issue the following command:EAP_HOME/httpd/sbin/apachectl stop