Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Difference between revisions of "Linux (Ubuntu) Installation - Supporting Software for iHRIS 4.3+ - 14.04"

From IHRIS Wiki

Jump to: navigation, search
(Created page with "This document describes the needed installation and configuration of supporting software for iHRIS on Ubuntu 14.04 LTS, Trusty Tahr for iHRIS versions 4.3 and later. {{otherve...")
(No difference)

Revision as of 16:42, 21 September 2017

This document describes the needed installation and configuration of supporting software for iHRIS on Ubuntu 14.04 LTS, Trusty Tahr for iHRIS versions 4.3 and later.

Getting Ready

Here are instructions for installing the supporting software for iHRIS on a 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. For a server setup, we recommend using a LTS (long term support) version of Ubuntu.

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.

We begin by install a Lamp server (You can find more help here). You will also need to install the PHP5 MySQL Native Driver to replace the default PHP5 MySQL driver.

sudo tasksel install lamp-server
sudo apt-get install php5-mysqlnd

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.

Configuring MYSQL

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.

To configure MySQL so iHRIS can create needed functions:

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:

SET GLOBAL log_bin_trust_function_creators = 1;

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 php5-gd php5-tidy php5-intl
sudo pear install text_password

If the command for installing text_password, does not work for you
Download and Install the package manually as follows:

cd /tmp

Installed the deb

sudo dpkg -i php-text-password_1.1.1-1_all.deb


We need to install the UUID module for PHP. We need to install from PECL. This can be done by first installing the php5-dev pageckage and the uuid packges.

Now install UUID from PECL:

sudo pecl install uuid

It will ask a few questions and you can just press enter to take the default answers.

We'll also need to create the ini file to load UUID into PHP.

sudo gedit /etc/php5/mods-available/uuid.ini

It should look like this:

We'll also need to enable this for Apache and CLI by creating 2 symlinks for the uuid file:

sudo ln -s /etc/php5/mods-available/uuid.ini /etc/php5/apache2/conf.d/30-uuid.ini
sudo ln -s /etc/php5/mods-available/uuid.ini /etc/php5/cli/conf.d/30-uuid.ini


We need to install the APCu module for PHP. There are unfortunately some issues with php5-apcu, so we need to install from PECL.

sudo pecl install apcu-4.0.11

It will ask a few questions and you can just press enter to take the default answers.

If pecl install apcu-4.0.11 does not work for you
Remove any existing php5-apcu

sudo apt-get remove php5-apcu

Download and install appropriate php5-apcu package manually as follows

cd /tmp

Install the package as follows

sudo dpkg -i php5-apcu_4.0.6-1_i386.deb

During certain activities like installation and upgrades you may need more memory than APC uses by default. We also want to turn off the slam defense. We need to edit the configuration file file for apcu:

sudo gedit /etc/php5/mods-available/apcu.ini

It should look like this:

See slam defense and this.

We'll also need to enable this for Apache and CLI by creating 2 symlinks for the apcu file:

sudo ln -s /etc/php5/mods-available/apcu.ini /etc/php5/apache2/conf.d/20-apcu.ini
sudo ln -s /etc/php5/mods-available/apcu.ini /etc/php5/cli/conf.d/20-apcu.ini

You'll need to restart Apache after making this change.

sudo /etc/init.d/apache2 restart

Debian Squeeze

If you are using Debian Squeeze, then the value of apc.shm_size should be:


Set ZendOpcache options

Edit the opcache config file with this command:

sudo gedit /etc/php5/mods-available/opcache.ini

It should look like this for a production system:

; configuration for php ZendOpcache module
; priority=05

For a development system you should modify revalidate_freq from 60 to 2:


Configuring Apache Web Server

Changed Document Root

In Ubuntu 14.04, the default document root has changed from /var/www to /var/www/html so when installing any iHRIS applications you will need to use the new directory to place the symlinks. If you are upgrading you may or may not need to update these depending on if you replaced the Apache configuration files during the upgrade.

Enable Rewrite Module

You will see later we are using the apache rewrite module. To enable the module:

sudo a2enmod rewrite

Enable .htaccess Configuration

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

sudo gedit /etc/apache2/apache2.conf


<Directory /var/www/>
        Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted


<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride All
	Require all granted

Save and quit.

Restart Apache

Let us restart the Apache webserver using:

sudo service apache2 restart

Install Memcached

With version 4.0.4 and greater of iHRIS you can use memcached to improve performance

Note: Memcached is used to cache data from the database. Thus if you are an a sitaution where you would need to restart the webserver by

sudo service apache2 restart

you should now do

sudo service apache2 restart && sudo service memcached restart

To install, simply do

 sudo apt-get install php5-memcached memcached