Installation 2nd Generation Deployment 2.1

Normal manual installation for PostgreSQL

(For advanced users, click here)
(For automatic installation, click here)
(For manual installation for mySQL, click here)

NOTE: The following installation procedure is valid ONLY for the 2nd Generation Deployment 2.1

NOTE: The following procedures are only intended for PostgreSQL running on Linux

If your system has a built-in Apache-PHP-postgreSQL configuration you can skip the first 2 steps.

1. Download and install Apache, PHP, and PostgreSQL in your system.

2. Configure PostgreSQL's access permissions properly. Please refer to the documention of PostgreSQL.

3. Make sure that the following extensions and external php modules are loaded in your php installation.

PGSQL = the postgreSQL module
GD = the graphic module
IMAP = if you use the internet webmailer
Calendar
TTF = if available

4. Uncompress the CARE2X 2nd Generation Deployment 2.1 scripts into the active directory of Apache web server.

5. Make sure that the server can write in the following directories and files. NOTE: In most servers, file access permission is highly restrictive. Make sure that the following directories and files are system writeable. The easiest way to do this is to CHMOD 777 the following directories: ( A safer way to change the file permissions is to use the CHOWN command. )

/cache/barcodes/
/counter/hits/
/counter/hitcount.txt
/fotos/encounter/
/fotos/news/
/fotos/registration/
/logs/ (and all its subdirectories)
/med_depot/img/
/pharma/img/
/radiology/dicom_img/
/gui/img/logos_dept/
/gui/smarty_template/templates_c/

6. Use an editor and open the file "inc_init_main.php" inside the directory "/include" .

  • Enter the proper host, username, and password information for your PostgreSQL database. If your postgreSQL resides on the same machine and uses the same IP address as the Apache web server you might use the default settings.

    The defaults are:

    $dbhost = 'localhost'
    $dbusername = 'postgres'
    $dbpassword = 'postgres'

  • Enter the database name. You must remember this name since you need it in creating the database in later steps.

    For example: $dbname = "carepg";

  • Change the following three secret keys with unique keys of your choice.

    $key : The secret key for the first level script lock.
    $key_2level : The secret key for the second level script lock.
    $ley_login : The secret key for the third level script lock.

  • Enter the domain or ip addresses and hosts information.
    For the main domain, enter the domain or host name without the http:// or https:// part and without a trailing slash as value of the $main_domain variable:

    For example: $main_domain = www.st-john-hospital.org ;

    Note: If the web server is within a network, enter specifically the IP adresses for the hosts. Never use "localhost".

    If you are running Care2x in an SSL server, make sure that the $httprotocol variable in this script is set to "https".

    For example: $httprotocol='https';

  • Set the database type variable to 'postgres7':

    Like this: $dbtype='postgres7';

  • 7. Open the file "inc_remoteservers_conf.php" inside the directory "/global_conf".

    If necessary, you can set the webcam source urls here.

    8. Open a terminal and change to a username that has access permission to the PostgreSQL database

      For example type: su postgres

    9. Create a database using the name that you chose in the step #6

      For example type: createdb -T template0 carepg
    10. Load the Care2x database structure from the dump file. Go to Care2x's /install/postgres7/manual/ directory...

      And type: psql carepg < ./care_db_structure_d21_manual_pg.sql
    11. Now load the other dump files according to your needs. Note: In loading these dumps, you must follow the order of the files as stated here.
  • ICD10 coding system in german language: Go to Care2x's /install/sql/icd10_de directory and type:

    psql carepg < ./a2g-insert.sql
    psql carepg < ./h2n-insert.sql
    psql carepg < ./o2s-insert.sql
    psql carepg < ./t2z-insert.sql

  • ICD10 coding system in english language: Go to /install/sql/icd10_en directory and type:

    psql carepg < ./insert-data-a2l.sql
    psql carepg < ./insert-data-m2y.sql

  • ICD10 coding system in brazilian language: Go to /install/sql/icd10_br directory and type:

    psql carepg < ./insert-data-a2l.sql
    psql carepg < ./insert-data-m2z.sql

  • ICD10 coding system in spanish language: Go to /install/sql/icd10_es directory and type:

    psql carepg < ./insert-data-a2o.sql
    psql carepg < ./insert-data-p2z.sql

  • OPS301 coding system in german language: Go to /install/sql/ops301_de directory and type:

    psql carepg < ./insert-data-1-5-499.sql
    psql carepg < ./insert-data-55-57.sql
    psql carepg < ./insert-data-58-94.sql

  • OPS301 coding system in spanish language: Go to /install/sql/ops301_es directory and type:

    psql carepg < ./insert-data-1.sql
  • 12. Create a new system admin permission.

    You need to use the supplied create_admin.php script. Type http://your_host/create_admin.php in your browser. Enter the necessary information and hit the button. Important: After creating the new system admin, remove this script from your active server directory. Leaving it in the active server directory will cause Care2x to block and refuse to run.

    13. REMOVE THE FOLLOWING FILES FROM THE CARE2X DIRECTORY!

  • /create_admin.php
  • /install/install.php
  • /install/encode_pw_md5.php

    Tip: you can move them to other places outside the web server directory.

  • 14. The installation is finished. Enter the following address in the browser:

    http://your_host/

    (where your_host is the actual host address of your Apache web server). The first page of CARE 2X should appear. Congratulations!

    Now you can start creating user access permissions.

    To do this:

    Select the EDP link on the left menu and then select "Access rights". Enter your admin username and your admin password. When the interface appears, you can start creating user access rights and permissions.

    Note: You cannot create additional Admin permission using this interface. You have to follow the step #12 to create additional admin permissions.

    15. Configure Care2x => go here


    ©2002, 2003, 2004 Elpidio Latorilla, CARE2X, CARE 2002, www.intellin.org, www.care2x.org, www.care2x.com , www.care2x.net