LithiumCorp Pty Ltd
Red Hat 5 Install Guide PDF Print E-mail
Written by James Wilson   
Tuesday, 21 November 2006

Procedure

Red Hat Enterprise Linux Version

LITHIUM|Core has been tested and is supported with Red Hat 5. Other versions may be compatible however support is not available for them at this time. This document was written using a clean installation of Red Hat Enterprise Linux ES 5.

Prerequisites

LITHIUM|Core requires the following list of software to be installed and operational prior to being installed. All dependencies can be satisfied using Red Hat Enterprise Linux's 'yum' package management system. 

Apache 1.3.x or 2.2.x

Note that the default install of Apache on Red Hat has a pre-configured Welcome Page.

Make sure you disable this by commenting out (or deleting) the configuration lines in the /etc/httpd/conf.d/welcome.conf file.

The Document Root of the server, as required later in this document can be configured in the /etc/httpd/conf/httpd.conf file 

PHP (4.x or 5.x) with PostgreSQL Database Support 

Ensure you have installed the php-pgsql package to enable PostgreSQL support or compile your own version of PHP with PostgreSQL database support. 

libart_lgpl Library

Ensure you have installed the libart_lgpl package. This is required for graphing support in Core.

Net-SNMP 5.x

Note in Red Hat you MUST have the full net-snmp package installed, not just the basic/support package installed during a standard installation. If this is not performed, errors are missing MIB entries and software crashes may occur. 

PostgreSQL 7.x or 8.x

PostgreSQL MUST be configure to allow 'password' authentication, not 'ident same user' as is the default when installed via apt (and possibly from source).

Edit the pg_hba.conf file in your PostgreSQL data directory and set the authentication method to either 'trust' or 'password' depending on your required level of security.

Be careful to only change this for connections to 'localhost' and/or '127.0.0.1' not 'local'.  The PostgreSQL database daemon must be restarted for the configuration changes to take affect.

Failure to do this will result in "Can't connect to db." messages.

PostgreSQL MUST also be configured to allow TCP connections. The RPM-package installation of PostgreSQL on Red Hat (via yum) has TCP connections disabled. This can be changed by un-commenting the 'tcpip_socket = false' line in the postgresql.conf file and changing the line to 'tcpip_socket = true'. The postgresql.conf file can PostgreSQL data directory (typically /var/lib/pgsql/data).

 

Installation of Prerequisites via 'yum' Package Management

Installation of required prerequisites can be done using yum with with following command as root:

yum install httpd php php-pgsql db4 libxml2
yum install postgresql-server libart_lgpl net-snmp net-snmp-libs postgresql-libs
The command above must be run as root.

SE-Linux Configuration (Security Enhanced Linux)

SE-Linux MUST be disabled or configured for PERMISSIVE operation

Edit the /etc/selinux/config file and ensure SELINUX is set to 'permissive' or 'disabled'. Either of the following line must be present in the configuration:

SELINUX=permissive

OR

SELINUX=disabled

If SE-Linux is configured for enforcing mode, the installation, configuration and operation of Core will fail!

You MUST reboot your computer to ensure these changes take effect

Core Package Installation

Step 1. Download LITHIUM|Core Red Hat RPM bundle

Download the RPM bundle from the following URL

Run the following commands from the directory where the bundle is stored:

tar zxvf core-rhel5-free-current.tar.gz

This will decompress and unarchive the RPM files required for the install.

Step 2. Install LITHIUM|Core from RPMs 

All RPMs can now be installed by running he following command as root in the directory where the RPM files now reside:

rpm -Uvh lithium*rpm
The command above must be run as root.

RPM will automatically determine dependencies and package installation order. An example output from the RPM command is shown below:

[root@dhcp177 ~]# rpm -Uvh lithium*rpm
Preparing...                ########################################### [100%]
   1:lithium-induction      ########################################### [  6%]
   2:lithium-actuator       ########################################### [ 11%]
   3:lithium-construct      ########################################### [ 17%]
   4:lithium-contrib-rrdtool########################################### [ 22%]
   5:lithium-core           ########################################### [ 28%]
  6:lithium-dm-snmpbasic   ########################################### [ 89%]
  7:lithium-mars           ########################################### [100%] 

 

Database Setup

Step 1. Ensure PostgreSQL database daemon is running and initialized

Run the following command as root in the terminal to ensure the PostgreSQL database is running and initialized

/etc/init.d/postgresql restart
The command above must be run as root.

Before proceeding, ensure PostgreSQL is configured for either 'trust' or 'password' authentication for connections to localhost and 127.0.0.1.

Edit the pg_hba.conf file in your PostgreSQL data directory and set the authentication method to either 'trust' or 'password' depending on your required level of security.

Be careful to only change this for connections to 'localhost' or '127.0.0.1' not NOT 'local'

PostgreSQL MUST also be configured to allow TCP connections. The RPM-package installation of PostgreSQL on Red Hat (via yum) has TCP connections disabled. This can be changed by un-commenting the 'tcpip_socket = false' line in the postgresql.conf file and setting changing the line to 'tcpip_socket = true'.

The pg_hba.conf and postgresql.conf files can PostgreSQL data directory (typically /var/lib/pgsql/data).

The PostgreSQL database daemon must be restarted for the configuration changes to take affect.

Step 2. Change your login to the 'postgres' user

Run the following command as root in the terminal to change users to the 'postgres' user

su - postgres
The command above must be run as root.

Step 3. Create a new PostgreSQL database user

This database user account is used by LITHIUM|Core.

Run the following command in the terminal to create the database user for LITHIUM|Core

createuser -P lithium
The command above must be run as the postgres user.

When prompted, enter a password for the user. The user should not be a super user, can create new databases and can not create new users. When completed, the createuser command should return CREATE USER or CREATE ROLE. An example of the output from the createdb command is shown below:

postgres@db-server$ createuser -P lithium
Enter password for new user:
Enter it again:
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER

Step 4. Create a new PostgreSQL Database

This database will be used by LITHIUM|Core.

Run the following command in the terminal to create the database for LITHIUM|Core.

The database MUST be called 'lithium' and MUST be owned by the user created in the previous step (typically 'lithium')

createdb --owner lithium lithium 
The command above must be run as the postgres user.

When completed, the createdb command should return CREATE DATABASE. An example of the output from the createuser command is shown below:

postgres@db-server$ createdb --owner lithium lithium
CREATE DATABASE

Step 5. Logout as 'postgres' user

You can now logout as the 'postgres' user. This is important as the commands in the following section must be run as your user account, not the 'postgres' user account.

Run the following command in the terminal to logout as 'postgres'

exit

 

Web Installation

The installation of the RPM packages will install the HTML/PHP documents for LITHIUM|Core in /usr/var/lithium_web. This is the 'Document Root' directory for LITHIUM|Web. You can either copy/link these files to your current Apache document root or reconfigure Apache to use /var/lithium_web as the Document Root for your installation of Apache. 

To link the default Document Root location to the LITHIUM|Web documents install by RPM, use the following commands as root. Note this assumes a default installation of Apache:

cd /var/www/html
ln -s /usr/var/lithium_web lithium
The commands above must be run as root.

Alternatively, examine and edit the /etc/httpd/conf/httpd.conf to check/set the Document Root for your installation of Apache.

You MUST install PHP with support for the PostgreSQL database. Make sure you have installed the php-pgsql package before proceeding to the web-based setup

 

Initial Configuration 

Web-based Setup of LITHIUM|Core

Make sure you have copied/moved/linked the LITHIUM|Web files in /usr/var/lithium_web to the Document Root of your Apache installation. 


Ensure the Apache (httpd) daemon is started by running the following command as root:

/etc/init.d/httpd restart
The command above must be run as root.

Open a web browser and enter the URL of the server you have installed LITHIUM|Core on to:

On the local computer: http://127.0.0.1/lithium

From another computer: http://server_ip/lithium

Click here to proceed to the LITHIUM|Core Initial Configuration documentation

Last Updated ( Monday, 04 June 2007 )