Development Installation Instructions
You can run the current in development version of iHRIS as well for testing or to add new features. You will need to check out the latest version from launchpad using bazaar (bzr).
Install Bazaar (bzr)
First you need to install the bzr package it if isn't already installed. Run the following in a terminal to install bazaar.
<source lang="bash"> sudo apt-get install bzr bzrtools </source>
Download Source Packages (4.2)
Now you need to download all the source packages for iHRIS. Some will be required and some will depend on what you want to run. First create a directory in /var/lib/iHRIS/lib for the development packages. For example, for 4.2 we can call it 4.2-dev. If you don't already have a /var/lib/iHRIS/lib directory you will need to create it and make sure you have permissions to modify files there.
<source lang="bash"> cd /var/lib/iHRIS/lib mkdir 4.2-dev </source>
To download any of the application packages you will want to be sure to be in the development directory you just created. <source lang="bash"> cd /var/lib/iHRIS/lib/4.2-dev </source>
Download Base Packages
First you download the base packages. This includes I2CE, textlayout and iHRIS Common.
<source lang="bash"> bzr branch lp:i2ce/4.2 I2CE bzr branch lp:textlayout/4.2 textlayout bzr branch lp:ihris-common/4.2 ihris-common </source>
Download Application Packages
<source lang="bash"> bzr branch lp:ihris-manage/4.2 ihris-manage </source>
<source lang="bash"> bzr branch lp:ihris-qualify/4.2 ihris-qualify </source>
<source lang="bash"> bzr branch lp:ihris-train/4.2 ihris-train </source>
Unganisha (Graduate Tracker)
<source lang="bash"> bzr branch lp:ihris-graduate/4.2 ihris-graduate </source>
When updates are made, you can change into any of the previously created directories and pull down those updates with bzr pull. For example, for I2CE you can do this:
<source lang="bash"> cd /var/lib/iHRIS/lib/4.2-dev/I2CE bzr pull </source>
Configuring a Site
Once you've downloaded the packages for your application, you will need to configure a site. You can use a site you've created or a demo site which you can find in the particular application you're working on in sites/Demo.
Create a Database
First you'll need to create a database and user for your site. Run this command from the terminal and then enter the password for the root database user you created when installing MySQL. <source lang="bash"> mysql -u root -p </source> Then at the mysql> prompt type these commands replacing DATABASE with your database and PASSWORD with the password you'd like to use for this connection. <source lang="mysql"> create database DATABASE; grant all privileges on DATABASE.* to ihris@localhost identified by 'PASSWORD'; exit </source>
Next you'll need to configure the config.values.php file for your site. Run these commands after you've changed into the site pages directory. For example if you're working with the iHRIS Manage Demo site you would run: cd /var/lib/iHRIS/lib/4.2-dev/ihris-manage/sites/Demo/pages.
<source lang="bash"> mkdir local/ cp config.values.php local/ cp htaccess.TEMPLATE .htaccess gedit local/config.values.php </source>
Now find the configuration variables in the file that opens and change to the appropriate values. Again for this example using iHRIS Manage, but replace with appropriate values for the application and site you're using.
Now edit the .htaccess file to set the RewriteBase: <source lang="bash"> gedit .htaccess </source>
Change the RewriteBase line to be the path in the web server for your site. <source lang="apache">
Set Up the Site in the Web Server
The last step is to create a symbolic link in the web root directory for your site. For our example we'll use /manage-demo. For Ubuntu 14.04 and later the web root is /var/www/html. Prior to 14.04 it is just /var/www. Be sure to use the correct directory in the following steps.
<source lang="bash"> cd /var/www/html sudo ln -s /var/lib/iHRIS/lib/4.2-dev/ihris-manage/sites/Demo/pages manage-demo </source>