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

Installing On Ubuntu 14.04 (32-bit)

From IHRIS Wiki

Jump to: navigation, search

This document describes the needed installation and configuration of supporting software for iHRIS on Ubuntu 14.04 LTS, Trusty Tahr 32-bit.


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): <source lang="bash"> sudo tasksel install lamp-server </source> 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: <source lang="bash"> sudo apt-get install postfix sudo dpkg-reconfigure postfix </source>

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: <source lang="bash"> sudo gedit /etc/mysql/my.cnf </source> <source lang="ini"> query_cache_limit = 4M query_cache_size = 64M </source> It appears that they were reduced with Karmic.

To configure MySQL so iHRIS can create needed functions: <source lang="bash"> mysql -u root -p </source> 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: <source lang="mysql"> SET GLOBAL log_bin_trust_function_creators = 1; exit </source>

Installing Pear and PECL Packages

We need to install a few Pear packages for PHP by running the command: <source lang="bash"> sudo apt-get install php-pear php-mdb2 php-mdb2-driver-mysql php5-gd php5-tidy php5-intl php-text-password </source>

APC

From Ubuntu 14.04 and PHP 5.5, APC comes packaged in as a core PHP module. So we only need to enable this module and setting some configuration options.

We need to first open the file

<source lang="bash"> sudo gedit /etc/php5/apache2/php.ini </source> In this file we need to uncomment and set the following variables <source lang="ini"> opcache.enable=1 opcache.enable_cli=1 </source>

After this setting you'll need to restart Apache <source lang="bash"> sudo apache2 restart </source>


For a development system you should modify revalidate_freq from 60 to 2: <source lang="ini"> opcache.revalidate_freq=2 </source>

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: <source lang="bash"> sudo a2enmod rewrite </source>

Enable .htaccess Configuration

Now we need to make sure we can use the .htaccess file. <source lang="bash"> sudo gedit /etc/apache2/apache2.conf </source> Change: <source lang="apache"> <Directory /var/www/>

       Options Indexes FollowSymLinks

AllowOverride None Require all granted </Directory> </source> to: <source lang="apache"> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> </source> Save and quit.

Restart Apache

Let us restart the Apache webserver using: <source lang="bash"> sudo service apache2 restart </source>

Install Memcached

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

To install memcached, simply run the following from the terminal <source lang='bash'>

sudo apt-get install php5-memcached memcached

</source>

Note: Memcached is used to cache data from the database. Thus if you are in a situation where you would need to do this, restart the webserver by running <source lang="bash">

sudo service apache2 restart

</source> and then restart memcached by running <source lang="bash">

sudo service apache2 restart && sudo service memcached restart

</source>