Lesotho MOHSW Installation: Difference between revisions

From IHRIS Wiki
No edit summary
 
(29 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page contains installation instructions on installing iHRIS version 4.0.4 manually.
This page contains installation instructions on installing iHRIS Lesotho Customizations
{{otherversions|Linux (Ubuntu) Installation}}
{{otherversions|Linux (Ubuntu) Installation}}  


''Warning:'' See [[Installing iHRIS on Ubuntu 10.4 (Lucid)]] after completing these instructions to get iHRIS working on the latest release of Ubuntu.
''Warning:'' See [[Installing iHRIS on Ubuntu 10.4 (Lucid)]] after completing these instructions to get iHRIS working on the latest release of Ubuntu.
Line 145: Line 145:
==Ubunutu 10.4 Lucid==
==Ubunutu 10.4 Lucid==


If you are using Lucid 10.4 Ubuntu, make sure that you following these [[Installing iHRIS on Ubuntu 10.4 (Lucid) | '''important instructions''']]]
If you are using Lucid 10.4 Ubuntu, make sure that you following these [[Installing iHRIS on Ubuntu 10.4 (Lucid) | '''important instructions''']]


== Downloading the Software ==
== Downloading the Main iHRIS Manage Software ==
To download the software you enter these commands:
To download the software you enter these commands:
<source lang="bash">
<source lang="bash">
sudo mkdir -p /var/lib/iHRIS/lib/4.0.4
sudo mkdir -p /var/lib/iHRIS/lib/4.0.7
cd /var/lib/iHRIS/lib
cd /var/lib/iHRIS/lib/4.0.7
sudo ln -s 4.0.4 4.0
sudo wget http://launchpad.net/ihris-manage/4.0/4.0.6/+download/ihris-manage-full-4_0_7.tar.bz2
cd /var/lib/iHRIS/lib/4.0.4
sudo tar -xjf ihris-manage-full-4_0_7.tar.bz2
sudo wget http://launchpad.net/ihris-manage/4.0/4.0.4/+download/ihris-manage-full-4_0_4.tar.bz2
sudo tar -xjf ihris-manage-full-4_0_4.tar.bz2
</source>
</source>


== Database Setup ==
== Downloading the Lesotho Customizations of iHRIS Manage ==
To download the software you enter these commands:
<source lang="bash">
sudo apt-get install bzr
sudo mkdir -p /var/lib/iHRIS/lesotho
sudo chown `whoami`:`whoami` /var/lib/iHRIS/lesotho
cd /var/lib/iHRIS/lesotho
bzr branch lp:ihris-manage-lesotho 4.0
cd /var/lib/iHRIS/lesotho/4.0
bzr bind lp:ihris-manage-lesotho
</source>
 
==MOHSW Site==
=== Database Setup ===


To create the needed database you can do:
To create the needed database you can do:
Line 166: Line 177:
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:
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">
<source lang="mysql">
CREATE DATABASE ihris_manage;
CREATE DATABASE manage_lesotho_mohsw_4_0;
GRANT ALL PRIVILEGES ON ihris_manage.* TO ihris_manage@localhost identified by 'PASS';
GRANT ALL PRIVILEGES ON manage_lesotho_mohsw_4_0.* TO ihris@localhost identified by 'PASS';
SET GLOBAL log_bin_trust_function_creators = 1;
SET GLOBAL log_bin_trust_function_creators = 1;
exit
exit
Line 173: Line 184:
Substitute PASS with something appropriate.  We'll refer to this password as YYYYY.
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).  
If you are having trouble creating routines see [http://www.ispirer.com/wiki/sqlways/troubleshooting-guide/mysql/import/binary-logging this].
For security, make sure the password you choose is different than the root password for MySQL.  Let us refer to this password as YYYYY.


In version 4.0.1 of iHRIS we create mysql functionsIf you are having trouble creating routines see [http://www.ispirer.com/wiki/sqlways/troubleshooting-guide/mysql/import/binary-logging this].
=== Setting the Password ===
 
Now we need to set the password '''PASS''' in the main configuration file.  Run the commands:
<source lang="bash">
mkdir -p /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/local/
cp /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/config.values.php /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/local/config.values.php
gedit /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/local/config.values.php
</source>
and change:
<source lang="php">
/**
* the dsn to connect to your databse
  */
$i2ce_site_dsn = 'mysql://ihris:MYSQLPASSWORD@localhost/manage_lesotho_mohsw_4_0' ;
</source>
to:
<source lang="php">
/**
* the dsn to connect to your databse
*/
$i2ce_site_dsn = 'mysql://ihris:PASS@localhost/manage_lesotho_mohsw_4_0' ;
</source>
Save and Quit.  Here PASS is what you chose above.
 
=== Making the Site Available ===


Alternatively, you may choose to install phpmyadmin to administer database through the web
We make iHRIS Manage site available via the webserver:
<source lang="bash">
<source lang="bash">
sudo apt-get install phpmyadmin
sudo ln -s /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages /var/www/ihris-MOHSW
</source>
</source>
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:
===Finishing Up===
Now we are ready to begin the site installation.  Simply browse to:
<center>
<center>
http://localhost/phpmyadmin
http://localhost/ihris-MOHSW
</center>
</center>
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
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 ('''YYYY''' that you set above).
do this, click on  the 'Privileges' link and select 'Add a new User'. Then fill out the form as follows:
[[Image:Phpmyadmin_create_user.gif|center|frame|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.


== Creating a Site Configuration File ==
==CHAL Site==
=== Database Setup ===


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:
To create the needed database you can do:
<source lang="bash">
<source lang="bash">
sudo mkdir -p /var/lib/iHRIS/sites
mysql -u root -p
sudo cp -R /var/lib/iHRIS/lib/4.0/ihris-manage/sites/blank /var/lib/iHRIS/sites/manage
</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">
CREATE DATABASE manage_lesotho_chal_4_0;
GRANT ALL PRIVILEGES ON manage_lesotho_chal_4_0.* TO ihris@localhost identified by 'PASS';
SET GLOBAL log_bin_trust_function_creators = 1;
exit
</source>
</source>
Substitute PASS with something appropriate.  We'll refer to this password as YYYYY.
In version 4.0.1 of iHRIS we create mysql functions.  If you are having trouble creating routines see [http://www.ispirer.com/wiki/sqlways/troubleshooting-guide/mysql/import/binary-logging this].
For security, make sure the password you choose is different than the root password for MySQL.  Let us refer to this password as YYYYY.
=== Setting the Password ===


We now need to edit the site configuration file:
Now we need to set the password '''PASS''' in the main configuration file.  Run the commands:
<source lang="bash">
<source lang="bash">
sudo gedit /var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml
mkdir -p /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/local/
</source>
cp /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/config.values.php /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/local/config.values.php
by changing:
gedit /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/local/config.values.php
<source lang="xml">
<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.  
  -->
</path>
</source>
</source>
to:  
and change:
<source lang="xml">
<source lang="php">
<path name='modules'>
/**
  <value>./modules</value>
  * the dsn to connect to your databse
  <value>/var/lib/iHRIS/lib/4.0</value>
*/
</path>
$i2ce_site_dsn = 'mysql://ihris:MYSQLPASSWORD@localhost/manage_lesotho_chal_4_0' ;
</source>
===Set Email Address===
You may optionally choose to change the email address feedback is sent to by changing:
<source lang="xml">
<configuration name='email' path='to' values='single'>
  <displayName>Email Address</displayName>
  <value>BLANK</value>
</configuration>
</source>
</source>
to:
to:
<source lang="xml">
<source lang="php">
<configuration name='email' path='to' values='single'>
/**
  <displayName>Email Address</displayName>
* the dsn to connect to your databse
  <value>my_email@somewhere.com</value>
*/
</configuration>
$i2ce_site_dsn = 'mysql://ihris:PASS@localhost/manage_lesotho_chal_4_0' ;
</source>
</source>
Save and Quit.  Here PASS is what you chose above.


== Making the Site Available ==  
=== Making the Site Available ===


We will now edit the configuration to let the site know about the database user and options:
We make iHRIS Manage site available via the webserver:
<source lang="bash">
<source lang="bash">
sudo gedit /var/lib/iHRIS/sites/manage/pages/config.values.php
sudo ln -s /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages /var/www/ihris-CHAL
</source>
</source>
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.


They are:
===Finishing Up===
Now we are ready to begin the site installation.  Simply browse to:
<center>
<center>
<table border='1' padding='2'>
http://localhost/ihris-CHAL
<tr><th>Variable Name</th><th>Value</th></tr>
<tr><td>$i2ce_site_i2ce_path</td><td>/var/lib/iHRIS/lib/4.0/I2CE</td></tr>
<tr><td>$i2ce_site_dsn</td><td rowpan='2'>mysql://ihris_manage:YYYYY@localhost/ihris_manage</td></tr>
<tr><td>$i2ce_site_module_config</td><td>/var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml</td></tr>
</table>
In $i2ce_site_dsn,  YYYYY is the password you set above.
</center>
</center>
Save and quit.
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 ('''YYYY''' that you set above).
 
==Updating Customizations==
To update the customizations from launchpad, ensure that port 22 is open on the server and do:
cd /var/lib/iHRIS/lesotho/4.0
bzr update
 
==Importing Data==
===Importing Data for MoHSW===
First thing we will do is to make sure the Lesotho customizations are up to date.  You can do this (as indicated above) by:
cd /var/lib/iHRIS/lesotho/4.0
bzr update
Once you are done you can enter
bzr revno
to check the revision number of the customizations.  It should be (at least) ''34''.
 
You need to save the cleaned data from Rosaline for the MOHSW on the desktop under the filename '''lesotho_cleaned.csv'''
 
To import the data:
cd /var/lib/iHRIS/lesotho/4.0/tools
php import_clean.php
*It will ask you if you want to run in test mode. You can answer '''N'''. 
*It will ask you if the first column of the '''lesotho_cleaned.csv''' file is a comment.  You can answer '''N'''
*You can expect the script to take about an hour to run.  You need to keep an eye on it as it will ask you occasionally if you wish to create some missing standardized data such as sub-programme.
 
'''VERY IMPORTANT:''' Once the data has been imported you need to clear the webserver's cache.  To do so browse to:
http://localhost/ihris-MOHSW/clear_cache.php
 
Once the data has been imported, it will create a new file on the desktop '''lesotho_cleaned.bad.''DATE_TIME''.csv''' which will contain a list of all the records it had problems with.
===Importing Data for CHAL===
First thing we will do is to make sure the Lesotho customizations are up to date.  You can do this (as indicated above) by:
cd /var/lib/iHRIS/lesotho/4.0
bzr update
Once you are done you can enter
bzr revno
to check the revision number of the customizations.  It should be (at least) '''38'''. Since you have updated the code, you will need to browse to:
http://localhost/ihris-CHAL
in order to do a site update.
 
You need to save the cleaned data from Rosaline for the MOHSW on the desktop under the filename '''lesotho_cleaned_CHAL.csv'''


Finally, we make iHRIS Manage site we just created available via the webserver:
To import the data:
<source lang="bash">
cd /var/lib/iHRIS/lesotho/4.0/tools
sudo ln -s /var/lib/iHRIS/sites/manage/pages /var/www/manage
php import_CHAL.php
</source>
*It will ask you if you want to run in test mode. You can answer '''N'''.
===Pretty URLs===
*It will ask you if the first column of the '''lesotho_cleaned_CHAL.csv''' file is a comment. You can answer '''N'''
This is an optional step to make URLs cleaner by removing the index.php.
*You can expect the script to take about an hour to runYou need to keep an eye on it as it will ask you occasionally if you wish to create some missing standardized data such as sub-programme.
<source lang="bash">
sudo cp /var/www/manage/htaccess.TEMPLATE /var/www/manage/.htaccess
sudo gedit /var/www/manage/.htaccess
</source>
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:
'''VERY IMPORTANT:''' Once the data has been imported you need to clear the webserver's cache.  To do so browse to:
<source lang="apache">
http://localhost/ihris-CHAL/clear_cache.php
    RewriteBase /iHRIS/manage-BLANK
</source>
to:
<source lang="apache">
    RewriteBase /manage
</source>
You may now save and quit.


==Finishing Up==
Once the data has been imported, it will create a new file on the desktop '''lesotho_cleaned_CHAL.bad.''DATE_TIME''.csv''' which will contain a list of all the records it had problems with.
Now we are ready to begin the site installation. Simply browse to:
<center>
http://localhost/manage
</center>
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).


== Files ==
[[Category:Lesotho]]
Here are samples of the files we edited above. '''WARNING THESE ARE OUT OF DATE AND REFER TO AN OLD VERSION OF THE SOFTWARE'''
<ul>
<li> [[Media:default.txt | /etc/apache2/sites-available/default]] </li>
<li> [[Media:IHRIS-Manage-Site_xml.txt | /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml]] </li>
<li> [[Media:htaccess.txt | /var/www/manage/.htaccess ]] </li>
<li> [[Media:Config_values_php.txt | /var/www/manage/config.values.php]] </li>
</ul>

Latest revision as of 10:54, 17 July 2013

This page contains installation instructions on installing iHRIS Lesotho Customizations


Warning: See Installing iHRIS on Ubuntu 10.4 (Lucid) after completing these instructions to get iHRIS working on the latest release of Ubuntu.


Need help? Try our Project Communication

Getting Ready

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.

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

Configuring PHP

Next, you'll need to increase the memory limit for PHP. You can do this by editing the /etc/php5/apache2/php.ini. <source lang="bash"> sudo gedit /etc/php5/apache2/php.ini </source>

Change the following line: <source lang="ini"> memory_limit = 32M </source> to: <source lang="ini"> memory_limit = 128M </source>

Installing Pear and PECL Packages

We need to install a few Pear and PECL packages for PHP. For the Pear packages you can do: <source lang="bash"> sudo apt-get install php-pear php-apc php-mdb2 php-mdb2-driver-mysql sudo pear install text_password console_getopt </source>

During certain activities like installation and upgrades you may need more memory than APC uses by default. The php-apc package should have installed a file in /etc/php5/conf.d/apc.ini. Edit this file:

<source lang="bash"> sudo gedit /etc/php5/conf.d/apc.ini </source>

Then add the following lines:

<source lang="ini"> apc.shm_size=100 apc.slam_defense = Off </source> See slam defense and this.

You'll need to restart Apache after making this change. <source lang="bash"> sudo /etc/init.d/apache2 restart </source>

There are two optional packages you may wish to install: <source lang="bash"> sudo apt-get install php5-gd php5-tidy </source> which are used to for inserting images into PDF output of reports and for exporting XML files in a nicely formatted manner

FileInfo

Note: If you're running Ubuntu 10.4 (Lucid Lynx) 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) <source lang="bash"> sudo apt-get install libmagic-dev php5-dev sudo pecl install Fileinfo </source> If this doesn't work, you can also try: <source lang="bash"> sudo pear install pecl/Fileinfo echo extension=fileinfo.so | sudo tee /etc/php5/apache2/conf.d/fileinfo.ini </source>

Configuring Apache Web Server

You will see later we are using the apache rewrite module. To enable the module: <source lang="bash"> sudo a2enmod rewrite </source> Now we need to make sure we can use the .htaccess file. <source lang="bash"> sudo gedit /etc/apache2/sites-available/default </source> Change: <source lang="apache"> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </source> to: <source lang="apache"> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </source> Save and quit.

Let us restart the Apache webserver using: <source lang="bash"> sudo /etc/init.d/apache2 restart </source>

Ubunutu 10.4 Lucid

If you are using Lucid 10.4 Ubuntu, make sure that you following these important instructions

Downloading the Main iHRIS Manage Software

To download the software you enter these commands: <source lang="bash"> sudo mkdir -p /var/lib/iHRIS/lib/4.0.7 cd /var/lib/iHRIS/lib/4.0.7 sudo wget http://launchpad.net/ihris-manage/4.0/4.0.6/+download/ihris-manage-full-4_0_7.tar.bz2 sudo tar -xjf ihris-manage-full-4_0_7.tar.bz2 </source>

Downloading the Lesotho Customizations of iHRIS Manage

To download the software you enter these commands: <source lang="bash"> sudo apt-get install bzr sudo mkdir -p /var/lib/iHRIS/lesotho sudo chown `whoami`:`whoami` /var/lib/iHRIS/lesotho cd /var/lib/iHRIS/lesotho bzr branch lp:ihris-manage-lesotho 4.0 cd /var/lib/iHRIS/lesotho/4.0 bzr bind lp:ihris-manage-lesotho </source>

MOHSW Site

Database Setup

To create the needed database you can do: <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"> CREATE DATABASE manage_lesotho_mohsw_4_0; GRANT ALL PRIVILEGES ON manage_lesotho_mohsw_4_0.* TO ihris@localhost identified by 'PASS'; SET GLOBAL log_bin_trust_function_creators = 1; exit </source> Substitute PASS with something appropriate. We'll refer to this password as YYYYY.

If you are having trouble creating routines see this. For security, make sure the password you choose is different than the root password for MySQL. Let us refer to this password as YYYYY.

Setting the Password

Now we need to set the password PASS in the main configuration file. Run the commands: <source lang="bash"> mkdir -p /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/local/ cp /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/config.values.php /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/local/config.values.php gedit /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages/local/config.values.php </source> and change: <source lang="php"> /**

* the dsn to connect to your databse
*/

$i2ce_site_dsn = 'mysql://ihris:MYSQLPASSWORD@localhost/manage_lesotho_mohsw_4_0' ; </source> to: <source lang="php"> /**

* the dsn to connect to your databse
*/

$i2ce_site_dsn = 'mysql://ihris:PASS@localhost/manage_lesotho_mohsw_4_0' ; </source> Save and Quit. Here PASS is what you chose above.

Making the Site Available

We make iHRIS Manage site available via the webserver: <source lang="bash"> sudo ln -s /var/lib/iHRIS/lesotho/4.0/sites/MOHSW/pages /var/www/ihris-MOHSW </source>

Finishing Up

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

http://localhost/ihris-MOHSW

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 (YYYY that you set above).


CHAL Site

Database Setup

To create the needed database you can do: <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"> CREATE DATABASE manage_lesotho_chal_4_0; GRANT ALL PRIVILEGES ON manage_lesotho_chal_4_0.* TO ihris@localhost identified by 'PASS'; SET GLOBAL log_bin_trust_function_creators = 1; exit </source> Substitute PASS with something appropriate. We'll refer to this password as YYYYY.

In version 4.0.1 of iHRIS we create mysql functions. If you are having trouble creating routines see this. For security, make sure the password you choose is different than the root password for MySQL. Let us refer to this password as YYYYY.

Setting the Password

Now we need to set the password PASS in the main configuration file. Run the commands: <source lang="bash"> mkdir -p /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/local/ cp /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/config.values.php /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/local/config.values.php gedit /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages/local/config.values.php </source> and change: <source lang="php"> /**

* the dsn to connect to your databse
*/

$i2ce_site_dsn = 'mysql://ihris:MYSQLPASSWORD@localhost/manage_lesotho_chal_4_0' ; </source> to: <source lang="php"> /**

* the dsn to connect to your databse
*/

$i2ce_site_dsn = 'mysql://ihris:PASS@localhost/manage_lesotho_chal_4_0' ; </source> Save and Quit. Here PASS is what you chose above.

Making the Site Available

We make iHRIS Manage site available via the webserver: <source lang="bash"> sudo ln -s /var/lib/iHRIS/lesotho/4.0/sites/CHAL/pages /var/www/ihris-CHAL </source>

Finishing Up

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

http://localhost/ihris-CHAL

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 (YYYY that you set above).

Updating Customizations

To update the customizations from launchpad, ensure that port 22 is open on the server and do:

cd /var/lib/iHRIS/lesotho/4.0
bzr update

Importing Data

Importing Data for MoHSW

First thing we will do is to make sure the Lesotho customizations are up to date. You can do this (as indicated above) by:

cd /var/lib/iHRIS/lesotho/4.0
bzr update

Once you are done you can enter

bzr revno

to check the revision number of the customizations. It should be (at least) 34.

You need to save the cleaned data from Rosaline for the MOHSW on the desktop under the filename lesotho_cleaned.csv

To import the data:

cd /var/lib/iHRIS/lesotho/4.0/tools
php import_clean.php
  • It will ask you if you want to run in test mode. You can answer N.
  • It will ask you if the first column of the lesotho_cleaned.csv file is a comment. You can answer N
  • You can expect the script to take about an hour to run. You need to keep an eye on it as it will ask you occasionally if you wish to create some missing standardized data such as sub-programme.

VERY IMPORTANT: Once the data has been imported you need to clear the webserver's cache. To do so browse to:

http://localhost/ihris-MOHSW/clear_cache.php

Once the data has been imported, it will create a new file on the desktop lesotho_cleaned.bad.DATE_TIME.csv which will contain a list of all the records it had problems with.

Importing Data for CHAL

First thing we will do is to make sure the Lesotho customizations are up to date. You can do this (as indicated above) by:

cd /var/lib/iHRIS/lesotho/4.0
bzr update

Once you are done you can enter

bzr revno

to check the revision number of the customizations. It should be (at least) 38. Since you have updated the code, you will need to browse to:

http://localhost/ihris-CHAL

in order to do a site update.

You need to save the cleaned data from Rosaline for the MOHSW on the desktop under the filename lesotho_cleaned_CHAL.csv

To import the data:

cd /var/lib/iHRIS/lesotho/4.0/tools
php import_CHAL.php
  • It will ask you if you want to run in test mode. You can answer N.
  • It will ask you if the first column of the lesotho_cleaned_CHAL.csv file is a comment. You can answer N
  • You can expect the script to take about an hour to run. You need to keep an eye on it as it will ask you occasionally if you wish to create some missing standardized data such as sub-programme.

VERY IMPORTANT: Once the data has been imported you need to clear the webserver's cache. To do so browse to:

http://localhost/ihris-CHAL/clear_cache.php

Once the data has been imported, it will create a new file on the desktop lesotho_cleaned_CHAL.bad.DATE_TIME.csv which will contain a list of all the records it had problems with.