Linux (Ubuntu) Installation - 4.0.12
From IHRIS Wiki
This page contains installation instructions on installing iHRIS version 4.0.12 manually.
You may wish to see instructions on how to install debian packages for a simpler installation process.
Warning: See Installing iHRIS on Ubuntu 10.4 or 10.10 after completing these instructions to get iHRIS working on the latest release of Ubuntu.
- 1 Getting Ready
- 2 Configuring MYSQL
- 3 Configuring PHP
- 4 Installing Pear and PECL Packages
- 5 Configuring Apache Web Server
- 6 Downloading the Software
- 7 Database Setup
- 8 Creating a Site Configuration File
- 9 Making the Site Available
- 10 Finishing Up
- 11 Files
Here are instructions for installing the iHRIS Suite on an Linux (Ubuntu) system. If you need help installing Ubuntu you may want to take a look at these directions for installing a Server or a Desktop system.
Note: Unless specifically mentioned, all the commands below are run using a terminal. You can start this in Ubuntu by going to Applications -> Accessories -> Terminal. Any time a command begins with sudo it will prompt for your password because this will be run with administrative privileges. When you run sudo multiple times, only the first time will ask for your password.
Note: Some installation commands will prompt for inputs in the terminal window, usually with a blue background. The mouse doesn't work to click on options here. You can use Tab to move between options and the space bar to check or uncheck selections.
Note: Some commands will launch the gedit file editor. Look at the documentation if you need additional help.
sudo tasksel install lamp-server
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.
Important: Make sure your email system is correctly configured. Under a default Ubuntu installation, you can do this with one of two commands:
sudo apt-get install postfix sudo dpkg-reconfigure postfix
Follow the on-screen instructions to set up email on your system. For additional help with installing Postfix, look at these instructions. On Debian systems, the same commands can be used, but exim4 is the default MTA instead of postfix
If you are using another Linux distribution, make sure your system can send email properly before continuing.
Make sure you have in /etc/mysql/my.cnf the following values set:
sudo gedit /etc/mysql/my.cnf
query_cache_limit = 4M query_cache_size = 64M
It appears that they were reduced with Karmic
Next, you'll need to increase the memory limit for PHP. You can do this by editing the /etc/php5/apache2/php.ini.
sudo gedit /etc/php5/apache2/php.ini
Change the following line:
memory_limit = 32M
memory_limit = 128M
Installing Pear and PECL Packages
We need to install a few Pear and PECL packages for PHP. For the Pear packages you can do:
sudo apt-get install php-pear php-mdb2 php-mdb2-driver-mysql sudo pear install text_password console_getopt
We need to install the APC module for PHP.
APC in Ubuntu Lucid (10.04) and Meerkat (10.10)
In Lucid and Meerkat, the default version is not behaving well.
sudo add-apt-repository ppa:chris-lea/php-pecl-extras sudo apt-get update sudo apt-get install php5-apc
APC in Earlier Versions of Ubuntu
sudo apt-get install php-apc
APC all version of Ubuntu
During certain activities like installation and upgrades you may need more memory than APC uses by default. We also want to turn of the slam defense. We need to edit the configuration file file for apc:
sudo gedit /etc/php5/conf.d/apc.ini
It should look like this:
extension=apc.so apc.write_lock=1 apc.shm_size=100M apc.slam_defense=0
You'll need to restart Apache after making this change.
sudo /etc/init.d/apache2 restart
Tidy and GD
There are two optional packages you may wish to install:
sudo apt-get install php5-gd php5-tidy
which are used to for inserting images into PDF output of reports and for exporting XML files in a nicely formatted manner
Note: If you're running Ubuntu 10.4 (Lucid Lynx) or later then you do not need to install Fileinfo.
The pecl package FileInfo is used to verify the validity of file types used for uploading (e.g. for uploaded images or documents)
cd /tmp wget http://pecl.php.net/get/Fileinfo sudo pecl install Fileinfo* echo extension=fileinfo.so | sudo tee /etc/php5/apache2/conf.d/fileinfo.ini
Configuring Apache Web Server
You will see later we are using the apache rewrite module. To enable the module:
sudo a2enmod rewrite
Now we need to make sure we can use the .htaccess file.
sudo gedit /etc/apache2/sites-available/default
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory>
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
Save and quit.
Let us restart the Apache webserver using:
sudo /etc/init.d/apache2 restart
Downloading the Software
To download the software you enter these commands:
sudo mkdir -p /var/lib/iHRIS/lib/4.0.12 cd /var/lib/iHRIS/lib/4.0.12 sudo wget http://launchpad.net/ihris-manage/4.0/4.0.12/+download/ihris-manage-full-4.0.12.tar.bz2 sudo tar -xjf ihris-manage-full-4.0.12.tar.bz2
To create the needed database you can do:
mysql -u root -p
Enter the password you set above (XXXXX) for MySQL. You will now be able to send commands to MySQL and the prompt should always begin with 'mysql> '. Type these commands:
CREATE DATABASE ihris_manage; GRANT ALL PRIVILEGES ON ihris_manage.* TO ihris_manage@localhost identified by 'PASS'; SET GLOBAL log_bin_trust_function_creators = 1; exit
Substitute PASS with something appropriate. We'll refer to this password as YYYYY.
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
sudo apt-get install phpmyadmin
A screen will come up asking if you want to install for apache2 or lighttpd. Highlight apache2 and press the spacebar to select it. It will ask for the root password (XXXXX) and you may also opt to create a phpmyadmin user to extra features. Select a password for this user as well.
Now browse to:
login with the user 'root' and password XXXXX 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:
For security, make sure the password you choose is different than the root password for MySQL. Let us refer to this password as YYYYY.
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:
sudo mkdir -p /var/lib/iHRIS/sites sudo cp -R /var/lib/iHRIS/lib/4.0.12/ihris-manage/sites/blank /var/lib/iHRIS/sites/manage
Set Email Address (Optional)
You may optionally choose to change the email address feedback is sent to by editting the site configuration file:
sudo gedit /var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml
<configuration name='email' path='to' values='single'> <displayName>Email Address</displayName> <value>BLANK</value> </configuration>
<configuration name='email' path='to' values='single'> <displayName>Email Address</displayName> <value>firstname.lastname@example.org</value> </configuration>
Making the Site Available
We will now edit the configuration to let the site know about the database user and options:
sudo gedit /var/lib/iHRIS/sites/manage/pages/config.values.php
We now need to uncomment and set the value of a few variables. Commented lines will begin with two slashes (//) that you'll need to remove.
In $i2ce_site_dsn, YYYYY is the password you set above.
Save and quit.
Finally, we make iHRIS Manage site we just created available via the webserver:
sudo ln -s /var/lib/iHRIS/sites/manage/pages /var/www/manage
This is an optional step to make URLs cleaner by removing the index.php.
sudo cp /var/www/manage/htaccess.TEMPLATE /var/www/manage/.htaccess sudo gedit /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.
Change the line that looks like:
You may now save and quit.
Now we are ready to begin the site installation. Simply browse to:
and wait for the site to initalize itself. Congratulations! You may log in as the i2ce_admin with the password you used to connect to the database (YYYYY that you set above).
Here are samples of the files we edited above. WARNING THESE ARE OUT OF DATE AND REFER TO AN OLD VERSION OF THE SOFTWARE