16.3.2. Install the Apache HTTPD included with JBoss EAP 6

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 or 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

  1. 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 Product list. Select the version of JBoss EAP to see available downloads for that version.
  2. 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.
  3. 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 httpd directory under a jboss-ews-version-number folder. Copy the httpd 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 in EAP_HOME/httpd/ directory. You can now use this location for HTTPD_HOME, as found in other JBoss EAP 6 documentation.
  4. Run the Post-Installation script and create apache user and group accounts

    On a shell prompt, switch to the root user account, navigate to the EAP_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 the apache 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 the apache 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
  5. Configure the HTTPD.

    Switch to the new user account using the following command
    sudo su apache
    and then configure HTTPD as the apache 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.
  6. Start the HTTPD.

    Start the HTTPD using the following command:
    EAP_HOME/httpd/sbin/apachectl start
  7. Stop the HTTPD.

    To stop the HTTPD, issue the following command:
    EAP_HOME/httpd/sbin/apachectl stop