Linux (Ubuntu) Installation - 4.0.2: Difference between revisions

From IHRIS Wiki
No edit summary
 
(31 intermediate revisions by 3 users not shown)
Line 4: Line 4:


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
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 [http://www.howtoforge.com/perfect-server-ubuntu8.04-lts Server] or a [http://www.howtoforge.com/the-perfect-desktop-ubuntu-8.04-lts-hardy-heron Desktop] system.  
these directions for installing a [http://www.howtoforge.com/perfect-server-ubuntu8.04-lts Server] or a [http://www.howtoforge.com/the-perfect-desktop-ubuntu-8.04-lts-hardy-heron 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 [https://help.ubuntu.com/community/gedit documentation] if you need additional help.


We begin by install a [http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 Lamp] server
We begin by install a [http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 Lamp] server
(You can find more help [https://help.ubuntu.com/community/ApacheMySQLPHP here]):
(You can find more help [https://help.ubuntu.com/community/ApacheMySQLPHP here]):
<pre>
<source lang="bash">
sudo tasksel install lamp-server
sudo tasksel install lamp-server
</pre>
</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.
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:
'''Important''': Make sure your email system is correctly configured.  Under a default Ubuntu installation, you can do this with one of two commands:
<pre>
<source lang="bash">
sudo aptitude install postfix
sudo apt-get install postfix
sudo dpkg-reconfigure postfix
sudo dpkg-reconfigure postfix
</pre>
</source>
Follow the on-screen instructions to set up email on your system.  On Debian systems, the same commands can be used, but <tt>exim4</tt> is the default MTA instead of <tt>postfix</tt>
 
Follow the on-screen instructions to set up email on your system.  For additional help with installing Postfix, look at these [https://help.ubuntu.com/community/PostfixBasicSetupHowto instructions].  On Debian systems, the same commands can be used, but <tt>exim4</tt> is the default MTA instead of <tt>postfix</tt>


If you are using another Linux distribution, make sure your system can send email properly before continuing.
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 ==
== Installing Pear and PECL Packages ==


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


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 and add the following line:
Then add the following lines:


<pre>
<source lang="ini">
apc.shm_size=100
apc.shm_size=100
</pre>
apc.slam_defense = Off
</source>
See [http://pecl.php.net/bugs/bug.php?id=16843 slam defense] and [http://t3.dotgnu.info/blog/php/user-cache-timebomb this].


You'll need to restart Apache after making this change.
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:
There are two optional packages you may wish to install:
<pre>
<source lang="bash">
sudo apt-get install php5-gd php5-tidy
sudo apt-get install php5-gd php5-tidy
</pre>
</source>
which are used to for inserting images into PDF output of reports and for exporting XML files in a nicely formatted manner
which are used to for inserting images into PDF output of reports and for exporting XML files in a nicely formatted manner


===FileInfo===
===FileInfo===
The pecl package ''FileInfo'' is used to verify the validity of file types used for uploading (e.g. for uploaded images or docuemnts)
The pecl package ''FileInfo'' is used to verify the validity of file types used for uploading (e.g. for uploaded images or documents)
sudo apt-get install libmagic-dev php5-dev
<source lang="bash">
sudo pecl install Fileinfo
sudo apt-get install libmagic-dev php5-dev
sudo pecl install Fileinfo
</source>
If this doesn't work, you can also try:
If this doesn't work, you can also try:
sudo pear install pecl/Fileinfo
<source lang="bash">
echo extension=fileinfo.so | sudo tee /etc/php5/apache2/conf.d/fileinfo.ini
sudo pear install pecl/Fileinfo
echo extension=fileinfo.so | sudo tee /etc/php5/apache2/conf.d/fileinfo.ini
</source>


== Database Setup ==
== Database Setup ==


To create the needed database you can do:
To create the needed database you can do:
mysql -u root -p
<source lang="bash">
  mysql> CREATE DATABASE ihris_manage;
mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON ihris_manage.* TO ihris_manage@localhost identified by 'PASS';
</source>
where you substitute PASS with something appropriate.
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 ihris_manage;
GRANT ALL PRIVILEGES ON ihris_manage.* TO ihris_manage@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 want to install iHRIS Qualify (or iHRIS Plan) just replace everywhere you see manage with qualify (or plan).  
If you want to install iHRIS Qualify (or iHRIS Plan) just replace everywhere you see manage with qualify (or plan).  


Line 64: Line 121:


Alternatively, you may choose to install phpmyadmin to administer database through the web
Alternatively, you may choose to install phpmyadmin to administer database through the web
<pre>
<source lang="bash">
sudo apt-get install phpmyadmin
sudo apt-get install phpmyadmin
</pre>
</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:
Now browse to:
<center>
<center>
http://localhost/phpmyadmin
http://localhost/phpmyadmin
</center>
</center>
login with the user 'root' and password XXXX that you set above.  Once logged in you will create a database and user called ihris_manage.  To
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
do this, click on  the 'Privileges' link and select 'Add a new User'. Then fill out the form as follows:
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
[[Image:Phpmyadmin_create_user.gif|center|frame|Creating iHRIS_Manage Database and User]]   
you choose is different than the root password for mysql.  Let us refer to this password as YYYYY.
 
For security, make sure the password you choose is different than the root password for MySQL.  Let us refer to this password as YYYYY.


== Downloading the Software ==
== Downloading the Software ==
To download the software you enter these commands:
To download the software you enter these commands:
<pre>
<source lang="bash">
cd /var/lib
sudo mkdir -p /var/lib/iHRIS/lib/4.0.2
sudo mkdir iHRIS
cd /var/lib/iHRIS/lib
cd /var/lib/iHRIS
sudo ln -s 4.0.2 4.0
sudo mkdir 4.0.0
cd /var/lib/iHRIS/lib/4.0.2
sudo ln -s 4.0.0 4.0
sudo wget http://launchpad.net/ihris-manage/4.0/4.0.2/+download/ihris-manage-full-4_0_2.tar.bz2
sudo ln -s 4.0 current
sudo tar -xjf ihris-manage-full-4_0_2.tar.bz2
cd /var/lib/iHRIS/4.0.0
</source>
sudo wget http://launchpad.net/ihris-manage/4.0/4.0.0/+download/ihris-manage-full-4_0_0.tar.bz2
sudo tar -xjf ihris-manage-full-4_0_0.tar.bz2
</pre>


== Creating a Site Configuration File ==
== Creating a Site Configuration File ==


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:
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:
<pre>
<source lang="bash">
cd /var/lib/iHRIS/
sudo mkdir -p /var/lib/iHRIS/sites
sudo mkdir sites
sudo cp -R /var/lib/iHRIS/lib/4.0/ihris-manage/sites/blank /var/lib/iHRIS/sites/manage
sudo cp -R /var/lib/iHRIS/current/ihris-manage/sites/blank /var/lib/iHRIS/sites/manage
</source>
sudo mv /var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml  /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml
</pre>


We now need to edit the site configuration file:
We now need to edit the site configuration file:
<pre>
<source lang="bash">
sudo gedit /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml
sudo gedit /var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml
</pre>
</source>
by changing:
by changing:
<pre>
<source lang="xml">
    <path name='modules'>
<path name='modules'>
      <value>./modules</value>
  <value>./modules</value>
      <!-- If this site module is not installed under the iHRIS Manage
  <!-- If this site module is not installed under the iHRIS Manage
          file structure, then remember to include a path to the rest of
      file structure, then remember to include a path to the rest of
          the modules here.  
      the modules here. e.g.  
          e.g. <value>..</value>
  -->
        -->
</path>
    </path>
</source>
</pre>
to:  
to:  
<pre>
<source lang="xml">
  <path name='modules'>
<path name='modules'>
      <value>./modules</value>
  <value>./modules</value>
      <value>/var/lib/iHRIS/current</value>
  <value>/var/lib/iHRIS/lib/4.0</value>
    </path>
</path>
</pre>
</source>
You may choose to  change the email address feedback is sent to by changing:
You may choose to  change the email address feedback is sent to by changing:
<pre>
<source lang="xml">
      <configuration name='email' path='to' values='single'>
<configuration name='email' path='to' values='single'>
      <displayName>Email Address</displayName>
  <displayName>Email Address</displayName>
        <value>BLANK</value>
  <value>BLANK</value>
      </configuration>
</configuration>
</pre>
</source>
to:
to:
<pre>
<source lang="xml">
      <configuration name='email' path='to' values='single'>
<configuration name='email' path='to' values='single'>
      <displayName>Email Address</displayName>
  <displayName>Email Address</displayName>
        <value>my_email@somewhere.com</value>
  <value>my_email@somewhere.com</value>
      </configuration>
</configuration>
</pre>
</source>
You may also choose to change ''BLANK'' everywhere with your organization's name.  For best results, please choose one word, possilby with a dash, such as ''Sample'', ''MOH'', or ''MOH-Taifeki.''  To make this change, hit the replace icon, fill in ''blank'' under ''Search for'' and ''MOH-Taifeki'' under ''Replace With,'' then hit replace all.


== 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 will now edit the configuration to let the site know about the database user and options:
<pre>
<source lang="bash">
sudo gedit /var/lib/iHRIS/sites/manage/pages/config.values.php
sudo gedit /var/lib/iHRIS/sites/manage/pages/config.values.php
</pre>
</source>
We now need to uncomment and set the value of a few variables.  They are:
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:
<center>
<center>
<table border='1' padding='2'>
<table border='1' padding='2'>
<tr><th> Variable Name </th><th> Value</th></tr>
<tr><th>Variable Name</th><th>Value</th></tr>
<tr><td> $i2ce_site_i2ce_path </td><td> /var/lib/iHRIS/current/I2CE </td></tr>
<tr><td>$i2ce_site_i2ce_path</td><td>/var/lib/iHRIS/lib/4.0/I2CE</td></tr>
<tr><td> $i2ce_site_database </td><td> ihris_manage </td></tr>
<tr><td>$i2ce_site_database</td><td>ihris_manage</td></tr>
<tr><td> $i2ce_site_database_user </td><td> ihris_manage </td></tr>
<tr><td>$i2ce_site_database_user</td><td>ihris_manage</td></tr>
<tr><td> $i2ce_site_database_password </td><td> YYYYY (the password you set above) </td></tr>
<tr><td>$i2ce_site_database_password</td><td>YYYYY (the password you set above)</td></tr>
<tr><td>$i2ce_site_module_config </td><td> /var/lib/iHRIS/sites/manage/iHRIS-Manage-Site.xml </td></tr>
<tr><td>$i2ce_site_module_config</td><td>/var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml</td></tr>
</table>
</table>
</center>
</center>
Line 158: Line 213:


Finally, we make iHRIS Manage site we just created available via the webserver:
Finally, we make iHRIS Manage site we just created available via the webserver:
<pre>
<source lang="bash">
sudo ln -s /var/lib/iHRIS/sites/manage/pages /var/www/manage
sudo ln -s /var/lib/iHRIS/sites/manage/pages /var/www/manage
sudo cp /var/www/manage/htaccess.TEMPLATE /var/www/manage/.htaccess
sudo cp /var/www/manage/htaccess.TEMPLATE /var/www/manage/.htaccess
sudo gedit /var/www/manage/.htaccess
sudo gedit /var/www/manage/.htaccess
</pre>
</source>
We need to look for the line RewriteBase and change it to the web directory we want to use we are using,  ''/manage''.  You may now save and quit.
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:
<source lang="apache">
    RewriteBase /iHRIS/manage-BLANK
</source>
to:
<source lang="apache">
    RewriteBase /manage
</source>
 
You may now save and quit.
You will see we are using the apache rewrite module.  To enable the module:
You will see we are using the apache rewrite module.  To enable the module:
<pre>
<source lang="bash">
sudo a2enmod rewrite
sudo a2enmod rewrite
</pre>
</source>
Now we need to make sure we can use the ''.htaccess'' file.
Now we need to make sure we can use the ''.htaccess'' file.
<pre>
<source lang="bash">
sudo gedit /etc/apache2/sites-available/default
sudo gedit /etc/apache2/sites-available/default
</pre>
</source>
Change:
Change:
<pre>
<source lang="apache">
        <Directory /var/www/>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
Options Indexes FollowSymLinks MultiViews
AllowOverride None
AllowOverride None
Order allow,deny
Order allow,deny
allow from all
allow from all
        </Directory>
</Directory>
</pre>
</source>
to:
to:
<pre>
<source lang="apache">
        <Directory /var/www/>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
Options Indexes FollowSymLinks MultiViews
AllowOverride All
AllowOverride All
Order allow,deny
Order allow,deny
allow from all
allow from all
        </Directory>
</Directory>
</pre>
</source>
Save and quit.
Save and quit.


== Finishing up ==
== Finishing up ==
Let us restart the Apache webserver using:
Let us restart the Apache webserver using:
<pre>
<source lang="bash">
sudo /etc/init.d/apache2 restart  
sudo /etc/init.d/apache2 restart  
</pre>
</source>
Now we are ready to begin the site installation.  Simply browse to:
Now we are ready to begin the site installation.  Simply browse to:
<center>
<center>
Line 202: Line 268:
</center>
</center>
and wait for the site to initalize itself.  Congratulations!  You may log in as the ''administrator'' with the default password ''administator.''
and wait for the site to initalize itself.  Congratulations!  You may log in as the ''administrator'' with the default password ''administator.''


== Files ==
== Files ==
Line 212: Line 277:
<li> [[Media:Config_values_php.txt | /var/www/manage/config.values.php]] </li>
<li> [[Media:Config_values_php.txt | /var/www/manage/config.values.php]] </li>
</ul>
</ul>
[[Category:Developer Resources]]

Latest revision as of 22:06, 20 August 2019

This page contains installation instructions on installing iHRIS version 4.0 manually.


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

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>

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 ihris_manage; GRANT ALL PRIVILEGES ON ihris_manage.* TO ihris_manage@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 want to install iHRIS Qualify (or iHRIS Plan) just replace everywhere you see manage with qualify (or plan).

In version 4.0.1 of iHRIS we create mysql functions. If you are having trouble creating routines see this.

Alternatively, you may choose to install phpmyadmin to administer database through the web <source lang="bash"> sudo apt-get install phpmyadmin </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:

http://localhost/phpmyadmin

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 do this, click on the 'Privileges' link and select 'Add a new User'. Then fill out the form as follows:

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.

Downloading the Software

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

Creating a Site Configuration File

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: <source lang="bash"> sudo mkdir -p /var/lib/iHRIS/sites sudo cp -R /var/lib/iHRIS/lib/4.0/ihris-manage/sites/blank /var/lib/iHRIS/sites/manage </source>

We now need to edit the site configuration file: <source lang="bash"> sudo gedit /var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml </source> by changing: <source lang="xml"> <path name='modules'>

 <value>./modules</value>

</path> </source> to: <source lang="xml"> <path name='modules'>

 <value>./modules</value>
 <value>/var/lib/iHRIS/lib/4.0</value>

</path> </source> You may 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> to: <source lang="xml"> <configuration name='email' path='to' values='single'>

 <displayName>Email Address</displayName>
 <value>my_email@somewhere.com</value>

</configuration> </source>

Making the Site Available

We will now edit the configuration to let the site know about the database user and options: <source lang="bash"> sudo gedit /var/lib/iHRIS/sites/manage/pages/config.values.php </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:

Variable NameValue
$i2ce_site_i2ce_path/var/lib/iHRIS/lib/4.0/I2CE
$i2ce_site_databaseihris_manage
$i2ce_site_database_userihris_manage
$i2ce_site_database_passwordYYYYY (the password you set above)
$i2ce_site_module_config/var/lib/iHRIS/sites/manage/iHRIS-Manage-BLANK.xml

Save and quit.

Finally, we make iHRIS Manage site we just created available via the webserver: <source lang="bash"> sudo ln -s /var/lib/iHRIS/sites/manage/pages /var/www/manage 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: <source lang="apache">

   RewriteBase /iHRIS/manage-BLANK

</source> to: <source lang="apache">

   RewriteBase /manage

</source>

You may now save and quit. You will see 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.

Finishing up

Let us restart the Apache webserver using: <source lang="bash"> sudo /etc/init.d/apache2 restart </source> Now we are ready to begin the site installation. Simply browse to:

http://localhost/manage

and wait for the site to initalize itself. Congratulations! You may log in as the administrator with the default password administator.

Files

Here are samples of the files we edited above: