Linux (RedHat-Fedora) Installation

From IHRIS Wiki
Revision as of 12:31, 13 October 2009 by Jstrope (talk | contribs) (Created page with '== Getting Ready == Here are instructions for installing the iHRIS Suite on an Linux (RedHat or Fedora) system. If you need help installing a RedHat distribution, visit: * [ht…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Getting Ready

Here are instructions for installing the iHRIS Suite on an Linux (RedHat or Fedora) system. If you need help installing a RedHat distribution, visit:

The following steps assume you have root-level access to your Linux machine. Root-level access is achieved by any of the following steps

1. Login to your server directly as the root user. 2. Use "su" at the command prompt to switch to the root user. 3. Prepend the "sudo" command to each command listed here to execute as root.

First, if your Linux installation includes SELinux, disable it using by modifying /etc/sysconfig/selinux to read:

SELINUX=disabled

Now, install a Lamp server.

yum install httpd
yum install mysql-server
yum install php php-devel php-mysql

If you have never used mysql on your system, you will be asked to set the 'root' password for mysql. We will refer to this password as XXXXX below.

Please ensure your system can send email properly before continuing. RedHat and Fedora typically will have a configured version of sendmail installed by default.

Installing Pear and PECL Packages

We need to install a few Pear and PECL packages for PHP. For the Pear packages you can do:

yum install php-pear php-pecl-apc
pear install MDB2 MDB2#mysql text_password console_getopt

During certain activities like installation and upgrades you may need more memory than APC uses by default. To increase the memory limit, edit /etc/php.ini and add the following line:

apc.shm_size=100

There are two optional packages you may wish to install:

yum install php-gd php-tidy

These packages are used to for inserting images into PDF output of reports and for exporting XML files in a nicely formatted manner.

The pecl package FileInfo is used to verify the validity of file types used for uploading (e.g. for uploaded images or docuemnts). You can install this with the following commands:

pecl install Fileinfo
echo extension=fileinfo.so >> /etc/php.ini

After installing these supplemental packages, be sure to restart apache with the following command:

apache2ctl restart

Database Setup

To create the needed database you can do:

mysql -u root -p
mysql> CREATE DATABASE ihris_manage;
mysql> GRANT ALL PRIVILEGES ON ihris_manage.* TO ihris_manage@localhost identified by 'PASS';

where you substitute PASS with something appropriate. If you want to install iHRIS Qualify (or iHRIS Plan) just replace everywhere you see manage with qualify (or plan).

In version 4.0.1 of iHRIS we create mysql functions. If you are having trouble creating routines see this.

Alternatively, you may choose to install phpmyadmin to administer database through the web

yum install phpMyAdmin

Now browse to:

http://localhost/phpmyadmin

login with the user 'root' and password XXXX that you set above. Once logged in you will create a database and user called ihris_manage. To do this, click on the 'Privileges' link and select 'Add a new User'. Then fill out the form as follows:

Creating iHRIS_Manage Database and User

. For security, make sure the password

you choose is different than the root password for mysql. Let us refer to this password as YYYYY.

Downloading the Software

To download the software you enter these commands:

cd /var/lib
mkdir iHRIS
cd /var/lib/iHRIS
mkdir 4.0.0
ln -s 4.0.0 4.0
ln -s 4.0 current
cd /var/lib/iHRIS/4.0.0
wget http://launchpad.net/ihris-manage/4.0/4.0.0/+download/ihris-manage-full-4_0_0.tar.bz2
tar -xjf ihris-manage-full-4_0_0.tar.bz2

Creating a Site Configuration File

We are going to start by modifying the BLANK site for iHRIS Manage. If you wish to install iHRIS Qualify or iHRIS Plan, you can follow the same instructions below but change manage to qualify or plan. To copy the BLANK site:

cd /var/lib/iHRIS/
mkdir sites
cp -R /var/lib/iHRIS/current/ihris-manage/sites/blank /var/lib/iHRIS/sites/manage
mv /var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml  /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml

We now need to edit the site configuration file:

vim /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml

by changing:

    <path name='modules'>
      <value>./modules</value>
      <!-- If this site module is not installed under the iHRIS Manage
           file structure, then remember to include a path to the rest of
           the modules here. 
           e.g. <value>..</value>
        -->
    </path>

to:

   <path name='modules'>
      <value>./modules</value>
      <value>/var/lib/iHRIS/current</value>
    </path>

You may choose to change the email address feedback is sent to by changing:

      <configuration name='email' path='to' values='single'>
      <displayName>Email Address</displayName>
        <value>BLANK</value>
      </configuration>

to:

      <configuration name='email' path='to' values='single'>
      <displayName>Email Address</displayName>
        <value>my_email@somewhere.com</value>
      </configuration>

You may also choose to change BLANK everywhere with your organization's name. For best results, please choose one word, possilby with a dash, such as Sample, MOH, or MOH-Taifeki. To make this change, hit the replace icon, fill in blank under Search for and MOH-Taifeki under Replace With, then hit replace all.

Making the Site Available

We will now edit the configuration to let the site know about the database user and options:

vim /var/lib/iHRIS/sites/manage/pages/config.values.php

We now need to uncomment and set the value of a few variables. They are:

Variable Name Value
$i2ce_site_i2ce_path /var/lib/iHRIS/current/I2CE
$i2ce_site_database ihris_manage
$i2ce_site_database_user ihris_manage
$i2ce_site_database_password YYYYY (the password you set above)
$i2ce_site_module_config /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml

Save and quit.

Finally, we make iHRIS Manage site we just created available via the webserver:

ln -s /var/lib/iHRIS/sites/manage/pages /var/www/manage
cp /var/www/manage/htaccess.TEMPLATE /var/www/manage/.htaccess
vim  /var/www/manage/.htaccess

We need to look for the line RewriteBase and change it to the web directory we want to use we are using, /manage. You may now save and quit. You will see we are using the apache rewrite module. To enable the module:

a2enmod rewrite

Now we need to make sure we can use the .htaccess file.

vim /etc/apache2/sites-available/default

Change:

        <Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
        </Directory>

to:

        <Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
        </Directory>

Save and quit.

Finishing up

Let us restart the Apache webserver using:

/etc/init.d/apache2 restart 

Now we are ready to begin the site installation. Simply browse to:

http://localhost/manage

and wait for the site to initalize itself. Congratulations! You may log in as the administrator with the default password administator.


Files

Here are samples of the files we edited above: