Installing and Setting Up httpd on RHEL OS

Apache HTTP server on RedHat-based distribution files is named httpd service and the httpd 2.2 version is delivered by default. It is recommended to set up virtual display xvfb before installation.

To install and set up httpd services to work with BI server, execute the following operations:

  1. To install httpd, execute the following command in the terminal:

sudo yum install httpd

If the installation failed and the message "conflicts with file from package httpd-2.2.15-9.el6.x86_64" appears, remove the pack httpd-2.2.15-9.el6.x86_64 by executing the following command:

sudo yum remove httpd

NOTE. The httpd version number that will be contained in the message depends on the installed httpd version and can differ from the specified in the example.

After that reinstall httpd:

sudo yum install httpd

  1. Determine httpd start parameters, for that open the httpd file by executing the following command in the terminal:

sudo nano /etc/sysconfig/httpd

Add the following strings at the end of the file:

export LD_LIBRARY_PATH=:/opt/foresight/9.2/bin:/opt/Qt-4.8.7/lib:$LD_LIBRARY_PATH

export WSFCPP_HOME=/opt/foresight/9.2/bin

export TNS_ADMIN=/opt/foresight/9.2/bin

export HTTPD_LANG=en_US.UTF-8

export DISPLAY=:987

export LD_PRELOAD=/opt/Qt-4.8.7/lib/libQtGui.so.4

#Uncomment line below to export extended log

#export PP_LOG=1

NOTE. The specified example uses the Qt 4.8.7 version. If OS contains another version, correct the specified strings by specifying corresponding version of Qt. For example, if Qt is installed from QtSdk-offline-linux-x86_64-v1.2.1.run package, replace the path /opt/Qt-4.8.7/lib to /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib. Specify the number of the display server, on which graphics is rendered, in the DISPLAY environment variable. It is recommended to use the virtual display xvfb No. 987, but if the physical X server is used, specify its number DISPLAY=:0.0.

  1. Enable httpd service, selecting the main menu item System > Administrator > Services. In the dialog box that opens, in the services list select httpd and click the Enable button:

  1. Change settings in the configuration file. Open the httpd.conf file by executing the following command in the terminal:

sudo nano /etc/httpd/conf/httpd.conf

Remove the <IfModule prefork.c> and <IfModule worker.c> tags with their contents from the file. Add to the end of the file:

<IfModule prefork.c>

    StartServers    1

    MinSpareServers    1

    MaxSpareServers    1

    ServerLimit    1

    MaxClients    1

    MaxRequestsPerChild      10000

</IfModule>

<IfModule worker.c>

ServerLimit 1

StartServers 1

MaxClients 64

MinSpareThreads 32

MaxSpareThreads 64

ThreadsPerChild 64

MaxRequestsPerChild 0

</IfModule>

CoreDumpDirectory /tmp

 

# Foresight Analytics Platform

LoadModule axis2_module "/opt/foresight/9.2/bin/libmod_axis2_[version].so"

Axis2RepoPath "/opt/foresight/9.2/bin"

Axis2LogFile "/opt/foresight/9.2/bin/logs/axis2.log"

Axis2LogLevel information

Axis2ServiceURLPrefix services

Axis2MaxLogFileSize 100

<Location /axis2>

    SetHandler axis2_module

</Location>

NOTE. Specify the installed Apache version instead of the [version] value. Supported versions are 2.2 and 2.4, file name contains the values 2_2 or 2_4, respectively. By default, if the version is not specified, the libmod_axis2.so path will refer to libmod_axis2_2_2.so.

  1. Make Apache user the owner of the /opt/foresight/9.2 directory by executing the command in the terminal:

sudo chown -R apache:apache /opt/foresight/9.2

  1. Disable the SELinux access control system. To do this, open the selinux file by executing the command in the terminal:

sudo nano /etc/sysconfig/selinux

In the window that opens set SELINUX to disabled. Restart the computer.

  1. Enable the MPR worker module in the httpd file. To do this, open the file by executing the command in the terminal:

sudo nano /etc/sysconfig/httpd

Uncomment the string HTTPD=/usr/sbin/httpd.worker

NOTE. If the virtual display xvfb was set up before, continue the setup from the 10 item.

  1. Grant access to DISPLAY 0.0. To do this, open the X0.hosts file by executing the command in the terminal:

sudo nano /etc/X0.hosts

Add the string in the file that opens:

localhost

NOTE. If the physical display is set up to another number, specify the corresponding number after X.

  1. Allow local net connection to X server. To do this, open the custom.conf file by executing the command in the terminal:

sudo nano /etc/gdm/custom.conf

Add the strings in the file that opens:

[security]

DisallowTCP=false

If the KDE graphical environment is used, open the file /etc/kde/kdm/kdmrc by executing the command in the terminal:

sudo nano /etc/kde/kdm/kdmrc

In the file that opens find the ServerArgsLocal= parameter in the [X-:*-Core] section and delete the -nolisten tcp arguments from its value.

Execute the command:

sudo ln -s /home/foresight/.Xauthority /opt/foresight/9.2/bin/.Xauthority

  1. Run httpd services by executing the command in the terminal:

sudo chkconfig httpd on

sudo service httpd restart

If after executing the command the error message "Syntax error on line 1 of /etc/httpd/conf.d/mod_dnssd.conf" appears, execute in the terminal:

sudo rm -f /etc/httpd/conf.d/mod_dnssd.conf

sudo service httpd restart

  1. Check performance of the BI server installed in httpd by following the URL in the browser: http://localhost:80/axis2/services/. A page with the list of BI server operations should open (see the Testing BI Server Work section).