Senegal Installation Instructions: Difference between revisions

From IHRIS Wiki
Line 34: Line 34:
==Create Database==
==Create Database==


To create the needed database you can do:
<source lang="bash">
<source lang="bash">
mysql -u root -p -Be 'create database ihris_manage_senegal'
mysql -u root -p
</source>
</source>
When prompted, you will have to type your MySQL password
Enter the password you set when installing 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 ihris_manage_senegal;
GRANT ALL PRIVILEGES ON ihris_manage_senegal.* TO ihris_senegal@localhost identified by 'PASS';
exit
</source>
Substitute PASS with something appropriate.  We'll refer to this password as YYYYY.


==Edit config.values.php==
==Edit config.values.php==

Revision as of 10:21, 14 February 2013

This page contains installation instructions on installing iHRIS Manage Customizations for Senegal Ministry of Health

Getting Ready

First you should install Ubuntu and all the supporting software required by iHRIS by following the Linux (Ubuntu) Installation - Supporting Software instructions.

Note: Installing on ext4 filesystem? see this

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.


Install Additional Supporting Software

Enter these commands on your terminal to install Bazaar (bzr) and PHPMyAdmin

<source lang="bash"> sudo apt-get install bzr bzrtools phpmyadmin </source>

Download Senegal Customizations

You just enter these commands on your terminal:

<source lang="bash"> sudo mkdir -p /var/lib/iHRIS/sites/4.1/ cd /var/lib/iHRIS/sites/4.1 bzr branch lp:~ihris-senegal-team/ihris-senegal/sn-manage </source>

Create Database

To create the needed database you can do: <source lang="bash"> mysql -u root -p </source> Enter the password you set when installing 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 ihris_manage_senegal; GRANT ALL PRIVILEGES ON ihris_manage_senegal.* TO ihris_senegal@localhost identified by 'PASS'; exit </source> Substitute PASS with something appropriate. We'll refer to this password as YYYYY.

Edit config.values.php

Before editing this file, you have to create a directory under pages, where your local site configuration values will be set. And then you will copy both the config.values.php and the htaccess.TEMPLATE files there.

<source lang="bash"> sudo mkdir -p /var/lib/iHRIS/sites/4.1/sn-manage/pages/local cd /var/lib/iHRIS/sites/4.1/sn-manage/pages sudo cp config.values.php local/ sudo cp htaccess.TEMPLATE .htaccess </source> Then you go edit the file in local <source lang="bash"> sudo gedit local/config.values.php </source> When editing this file, you have to make to sure you change the values as they are set on your computer. The $i2ce_site_i2ce_path is the path where we can reach the latest I2CE source codes.

Set the correct database username and password on the line $i2ce_site_dsn, if these are not well set, the site will try to update and fail on the way. Set the $i2ce_site_module_config to /var/lib/iHRIS/sites/4.1/sn-manage/iHRIS-Manage-Senegal.xml.

You save and quit.

Finally, make the Senegal site you just installed available via the webserver: <source lang="bash"> sudo ln -s /var/lib/iHRIS/sites/4.1/sn-manage/pages /var/www/sn-manage </source>

To install the system you simply browse to:

http://localhost/sn-manage

and wait for the site to initialize itself. Congratulations! You may log in as the i2ce_admin with the password you used to connect to the database.