Installation Steps

From PANACeA THIRRA

(Difference between revisions)
Jump to: navigation, search
Line 16: Line 16:
   - make sure that the database user and password is correct.
   - make sure that the database user and password is correct.
-
- Create and restore database (available separately from Sourceforge or PCDOM) inside PostgreSQL, using either pgsql or PgAdmin3. Ensure that the database schema matches the correct version of THIRRA. There are 2 possible database backups - new clinics and sample database. For instance, thirra-samp-185-01.psql means it cannot be used for source codes earlier than Build 185. It is usable for newer version to the extent of the newer sample database version.
+
- Create and restore database (available separately from [https://sourceforge.net/projects/thirra/files/ Sourceforge] or PCDOM) inside PostgreSQL, using either pgsql or PgAdmin3. Ensure that the database schema matches the correct version of THIRRA. There are 2 possible database backups - new clinics and sample database. For instance, thirra-samp-185-01.psql means it cannot be used for source codes earlier than Build 185. It is usable for newer version to the extent of the newer sample database version.
- To use PostgreSQL at the command line, i.e. pgsql, assuming backup file is located as below:
- To use PostgreSQL at the command line, i.e. pgsql, assuming backup file is located as below:
Line 24: Line 24:
- Create the required directories (look inside the thirra/docs/directories_required.txt for the latest info.
- Create the required directories (look inside the thirra/docs/directories_required.txt for the latest info.
-
   - /var/www/thirra-uploads/patient_pics
+
   - cp -r /var/www/thirra/uploads /var/www/thirra-uploads
-
  - /var/www/thirra-uploads/case_pics
+
-
  - /var/www/thirra-uploads/exports_consult
+
-
  - /var/www/thirra-uploads/exports_history
+
-
  - /var/www/thirra-uploads/exports_patient
+
-
  - /var/www/thirra-uploads/exports_refer
+
-
  - /var/www/thirra-uploads/imports_consult
+
-
  - /var/www/thirra-uploads/imports_history
+
-
  - /var/www/thirra-uploads/imports_patient
+
-
  - /var/www/thirra-uploads/imports_refer
+
- For pdf documents output, download mpdf from http://mpdf.bpm1.com/
- For pdf documents output, download mpdf from http://mpdf.bpm1.com/
Line 45: Line 36:
   if (!defined('_MPDF_PATH')) define('_MPDF_PATH', 'mpdf/'); // To adapt to CodeIgniter
   if (!defined('_MPDF_PATH')) define('_MPDF_PATH', 'mpdf/'); // To adapt to CodeIgniter
-
- Change ownership of the whole "thirra" directory to web server user
+
- Change ownership of the whole "thirra" and "thirra-uploads" directories to web server user
- To launch THIRRA use the following URL in browser that supports XHTML:
- To launch THIRRA use the following URL in browser that supports XHTML:
Line 67: Line 58:
- Create the required directories (look inside the thirra/docs/directories_required.txt for the latest info.
- Create the required directories (look inside the thirra/docs/directories_required.txt for the latest info.
-
   - /var/www/train-uploads/patient_pics
+
   - cp -r /var/www/train/uploads /var/www/train-uploads
-
  - /var/www/train-uploads/case_pics
+
-
  - /var/www/train-uploads/exports_consult
+
-
  - /var/www/train-uploads/exports_history
+
-
  - /var/www/train-uploads/exports_patient
+
-
  - /var/www/train-uploads/exports_refer
+
-
  - /var/www/train-uploads/imports_consult
+
-
  - /var/www/train-uploads/imports_history
+
-
  - /var/www/train-uploads/imports_patient
+
-
  - /var/www/train-uploads/imports_refer
+
-
- Change ownership of the whole "train" directory to web server user
+
- Change ownership of the whole "train" directory and train-uploads to web server user
- To access the application point the browser to:
- To access the application point the browser to:

Revision as of 08:20, 20 May 2011

INSTALLATION STEPS

Standard installation

- Ensure that the system has the Apache webserver is running properly with PHP activated. The postgresql extension for PHP must be installed to allow Apache to access the database server. These components must be working first, before trying to install THIRRA, so that any installation error can be identified more easily.

- Obtain tar ball, e.g. svnthirra-150.tgz, or pull down via Subversion from Sourceforge

  svn co https://thirra.svn.sourceforge.net/svnroot/thirra thirra 

- Place "thirra" directory from thirra/trunk/ into web server document root

  e.g. /var/www/thirra

- Edit the following database configuration file:

 thirra/app_thirra/config/database.php
 - change $db['default']['database'] = "thirra-samp"; to the correct database.
 - make sure that the database user and password is correct.

- Create and restore database (available separately from Sourceforge or PCDOM) inside PostgreSQL, using either pgsql or PgAdmin3. Ensure that the database schema matches the correct version of THIRRA. There are 2 possible database backups - new clinics and sample database. For instance, thirra-samp-185-01.psql means it cannot be used for source codes earlier than Build 185. It is usable for newer version to the extent of the newer sample database version.

- To use PostgreSQL at the command line, i.e. pgsql, assuming backup file is located as below:

 - cd /home/postgres
 - createdb -U thirra -E UNICODE thirra-samp
 - pg_restore --disable-triggers -d thirra-samp thirra-samp-185-01.psql

- Create the required directories (look inside the thirra/docs/directories_required.txt for the latest info.

 - cp -r /var/www/thirra/uploads /var/www/thirra-uploads

- For pdf documents output, download mpdf from http://mpdf.bpm1.com/

- Unzip and move, renaming the whole mpdf directory to /var/www/mpdf so that all THIRRA installations can use this single copy. - Make a symbolic to the directory of mpdf

 ln -s /var/www/mpdf /var/www/thirra/mpdf

- Copy /var/www/mpdf/mpdf.php to /var/www/thirra/codeigniter/system/libraries - Edit this file changing

 if (!defined('_MPDF_PATH')) define('_MPDF_PATH', dirname(preg_replace('/\\\\/','/',__FILE__)) . '/');
 if (!defined('_MPDF_PATH')) define('_MPDF_PATH', 'mpdf/'); // To adapt to CodeIgniter

- Change ownership of the whole "thirra" and "thirra-uploads" directories to web server user

- To launch THIRRA use the following URL in browser that supports XHTML:

 http://www.example.com/thirra/


Installing in different directory

- You can run more than one instance of THIRRA on a server by running the other instances using a directory name other than the default thirra. For example,

 - /var/www/train

- Edit the following application configuration file:

 thirra/app_thirra/config/config.php
 - $config['base_url']	= "http://" . $_SERVER['HTTP_HOST'] . "/train/";

- Edit the following database configuration file:

 thirra/app_thirra/config/database.php
 - change $db['default']['database'] = "thirra-train"; to the correct database.
 - make sure that the database user and password is correct.

- Create the required directories (look inside the thirra/docs/directories_required.txt for the latest info.

 - cp -r /var/www/train/uploads /var/www/train-uploads

- Change ownership of the whole "train" directory and train-uploads to web server user

- To access the application point the browser to:

 http://www.example.com/train/
Personal tools