Difference between revisions of "OpenEMR 4.0 Linux Installation"

From OpenEMR Project Wiki
 
(22 intermediate revisions by 2 users not shown)
Line 2: Line 2:


First install and configure MySQL, Apache (or another PHP-capable webserver), and PHP5.  We recommend referring to your specific operating system (OS) documentation for installation of these software packages.
First install and configure MySQL, Apache (or another PHP-capable webserver), and PHP5.  We recommend referring to your specific operating system (OS) documentation for installation of these software packages.
:'''(Ensure PHP is configured with [[FAQ#What_are_the_correct_PHP_settings_.28can_be_found_in_the_php.ini_file.29_.3F|these settings]])'''


=== Debian Lenny ===
=== Debian Lenny ===
Line 15: Line 17:
== Extracting the Tarball ==
== Extracting the Tarball ==
'''1.''' First, Download OpenEMR from sourceforge:
'''1.''' First, Download OpenEMR from sourceforge:
:http://downloads.sourceforge.net/openemr/openemr-4.0.0.tar.gz <small>(MD5 sum: PENDING RELEASE)</small>
:http://downloads.sourceforge.net/openemr/openemr-4.0.0.tar.gz <small>(MD5 sum: 80bc4c76566d7d385ef47f90c096e098)</small>




Line 22: Line 24:




'''3.''' Move the extracted openemr-3.2.0 directory to your webserver root directory, and then go to this directory.  Refer to your OS and webserver documentation to obtain you webserver root directory. For example, Mandriva's webserver root directory is '''/var/www/html''', so in mandriva you would use the following commands:
'''3.''' Move the extracted openemr-4.0.0 directory to your webserver root directory, and then go to this directory.  Refer to your OS and webserver documentation to obtain you webserver root directory. For example, Ubuntu's webserver root directory is '''/var/www''', so in Ubuntu you would use the following commands:
:'''mv openemr-4.0.0 /var/www/html/openemr'''
:'''mv openemr-4.0.0 /var/www/openemr'''
:'''cd /var/www/html'''
:'''cd /var/www/html'''


Some other common webserver root directories are:
Some other common webserver root directories are:


* Debian: /var/www/
* Mandriva: /var/www/html/
* The FHS: /srv/www/
* The FHS: /srv/www/
== Cleaning up FileSystem Permissions ==
'''1.''' Modify file permissions (this should be done as root user):
:'''chmod 666 openemr/library/sqlconf.php'''
'''2.''' Modify directory permissions.  We need to make the following directories writable by the webserver username.  The webserver username is dependent on your OS; "apache", "www-data", and "nobody" are some common examples.  Mandriva's webserver username is "apache", so in mandriva you would use the following commands (this should be done as root user):
:'''chown -R apache:apache openemr/sites/default/documents'''
:'''chown -R apache:apache openemr/sites/default/edi'''
:'''chown -R apache:apache openemr/sites/default/era'''
:'''chown -R apache:apache openemr/sites/default/letter_templates'''
:'''chown -R apache:apache openemr/library/freeb'''
:'''chown -R apache:apache openemr/gacl/admin/templates_c'''
:'''chown -R apache:apache openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache'''
:'''chown -R apache:apache openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled'''




Line 52: Line 38:
'''1.''' Open up web-browser and point it to the installation script at http://localhost/openemr/setup.php .
'''1.''' Open up web-browser and point it to the installation script at http://localhost/openemr/setup.php .
:The first screen gives some general instructions and ensures file and directory permissions are set up correctly. It should tell you all your file system permissions are good, and have a 'Continue' button on the bottom of the form. If it does, Click the 'Continue' button. Otherwise, If there are errors on this screen, then follow instructions to fix. (screenshot below)
:The first screen gives some general instructions and ensures file and directory permissions are set up correctly. It should tell you all your file system permissions are good, and have a 'Continue' button on the bottom of the form. If it does, Click the 'Continue' button. Otherwise, If there are errors on this screen, then follow instructions to fix. (screenshot below)
 
[[File:Install-V4_0-1.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-1.jpg|link=]]




'''2.''' The next page is 'OpenEMR Setup' 'Step 1', which asks whether setup should create the database.
'''2.''' The next page is 'OpenEMR Setup' 'Step 1', which asks whether setup should create the database.
:Leave the setting set to 'Have setup create the database', and click the 'Continue' button.  (screenshot below)
:Leave the setting set to 'Have setup create the database', and click the 'Continue' button.  (screenshot below)
[[File:Linux-Install-V3_1-2.jpg|link=]]
[[File:Install-V4_0-2.png|link=]]




'''3.''' The next page is 'OpenEMR Setup' 'Step 2'. It has a list of options used to setup the database, along with OpenEMR user and OpenEMR path information.
'''3.''' The next page is 'OpenEMR Setup' 'Step 2'. It has a list of options used to setup the database, along with OpenEMR user and OpenEMR path information.
:Most users will just need to enter a Password for the OpenEMR user(GO OVER REQUIRED FIELDS). Some users may have to enter the password of the 'root' user in the mysql server. (screenshot below)
:Most users will just need to enter a 'Initial User Password' for the OpenEMR User and a 'Password' for the sql user(these fields are in red rectangles in below screenshot). Some users may also have to enter the password of the 'root' user in the mysql server. (screenshot below)
 
[[File:V4.0 5.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-3.jpg|link=]]




'''4.''' The next page is 'OpenEMR Setup' 'Step 3'. On this page you should see logs of OpenEMR connecting and creating the database.
'''4.''' The next page is 'OpenEMR Setup' 'Step 3'. On this page you should see logs of OpenEMR connecting and creating the database.
:At the bottom of the page, it should read 'Next step will install and configure access controls (php-GACL).' Click the 'Continue' button. (screenshot below)
:At the bottom of the page, it should read 'Next step will install and configure access controls (php-GACL).' Click the 'Continue' button. (screenshot below)
 
[[File:Install-V4_0-4.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-4.jpg|link=]]




'''5.''' The next page is 'OpenEMR Setup' 'Step 4'. On this page, OpenEMR configures access controls (php-GACL).
'''5.''' The next page is 'OpenEMR Setup' 'Step 4'. On this page, OpenEMR configures access controls (php-GACL).
:You should see logs of OpenEMR installing and configuring php-GACL. you should see 'Success!' in green lettering four times. At the bottom of the page, it should read 'Next step will configure PHP.'. Click the 'Continue' button. (screenshot below)
:You should see logs of OpenEMR installing and configuring php-GACL. you should see 'Success!' in green lettering four times. At the bottom of the page, it should read 'Next step will configure PHP.'. Click the 'Continue' button. (screenshot below)
[[File:Linux-Install-V3_1-5.jpg|link=]]
[[File:Install-V4_0-5.png|link=]]




'''6.''' The next page is 'OpenEMR Setup' 'Step 5'. On this page is displayed recommendations of how to configure your php.ini config file.
'''6.''' The next page is 'OpenEMR Setup' 'Step 5'. On this page is displayed recommendations of how to configure your php.ini config file.
:Read and follow the instructions carefully. At the bottom of the page, it should read "Next step will configure Apache web server.". We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)
:Read and follow the instructions carefully. At the bottom of the page, it should read "Next step will configure Apache web server.". We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)
 
[[File:Install-V4_0-6.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-6.jpg|link=]]




'''7.''' The next page is 'OpenEMR Setup' 'Step 6'. On this page is displayed recommendations and warnings regarding directories Apache should NOT allow the outside world to see, as these directories contain Protected Health Information.
'''7.''' The next page is 'OpenEMR Setup' 'Step 6'. On this page is displayed recommendations and warnings regarding directories Apache should NOT allow the outside world to see, as these directories contain Protected Health Information.
:Read and follow the instructions carefully. We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)
:Read and follow the instructions carefully. We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)
 
[[File:Install-V4_0-7.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-7.jpg|link=]]




'''8.''' The next page is 'OpenEMR Setup'. This is the final configuration page.
'''8.''' The next page is 'OpenEMR Setup'. This is the final configuration page.
:This final installation screen gives additional instructions.  This information is personalized for your setup, so we suggest you print this screen for future reference.  At the bottom of the page is your OpenEMR username and password, along with a link to OpenEMR. (screenshot below)
:This final installation screen gives additional instructions.  This information is personalized for your setup, so we suggest you print this screen for future reference.  At the bottom of the page is your OpenEMR username and password, along with a link to OpenEMR. (screenshot below)
 
[[File:Install-V4_0-8.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-8.jpg|link=]]




:OpenEMR after installation: (screenshot below)
:OpenEMR after installation: (screenshot below)
 
[[File:Login-V4_0-1.png|link=]]
REDO SCREENSHOT
 
[[File:Linux-Install-V3_1-9.jpg|link=]]
 


== Post-install FileSystem Permission Cleanups ==
== Post-install FileSystem Permission Cleanups ==
Line 128: Line 92:
:'''chmod 600 openemr/ippf_upgrade.php'''
:'''chmod 600 openemr/ippf_upgrade.php'''
:'''chmod 600 openemr/admin.php'''
:'''chmod 600 openemr/admin.php'''
== Download and install most recent patch ==
Instruction to do this can be found on the [[OpenEMR_Patches|OpenEMR Patches]] page.
[[Category:Installation]][[Category:Linux Package]]

Latest revision as of 22:21, 11 January 2015

Required Software Installation (distribution specific)

First install and configure MySQL, Apache (or another PHP-capable webserver), and PHP5. We recommend referring to your specific operating system (OS) documentation for installation of these software packages.

(Ensure PHP is configured with these settings)

Debian Lenny

To install the prerequisite software on debian, use the APT system as the system administrator:

apt-get install mysql-server apache2-mpm-prefork libapache2-mod-php5 php5-mysql

Centos Or RedHat

If using CentOS or Redhat, then ensure when configuring MySQL for OpenEMR, STRICT_MODE must be disabled. This can be done in the MySQL configuration (my.cnf) file. You can check the setting in an existing MySQL instance by executing SHOW VARIABLES; in the MySQL Command Line Client and checking the value of SQL_MODE. For more details see: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html)

Installing OpenEMR

Extracting the Tarball

1. First, Download OpenEMR from sourceforge:

http://downloads.sourceforge.net/openemr/openemr-4.0.0.tar.gz (MD5 sum: 80bc4c76566d7d385ef47f90c096e098)


2. Next, Extract the downloaded archive:

tar -pxvzf openemr-4.0.0.tar.gz


3. Move the extracted openemr-4.0.0 directory to your webserver root directory, and then go to this directory. Refer to your OS and webserver documentation to obtain you webserver root directory. For example, Ubuntu's webserver root directory is /var/www, so in Ubuntu you would use the following commands:

mv openemr-4.0.0 /var/www/openemr
cd /var/www/html

Some other common webserver root directories are:

  • Mandriva: /var/www/html/
  • The FHS: /srv/www/


Configuring the Install through the WEB GUI

1. Open up web-browser and point it to the installation script at http://localhost/openemr/setup.php .

The first screen gives some general instructions and ensures file and directory permissions are set up correctly. It should tell you all your file system permissions are good, and have a 'Continue' button on the bottom of the form. If it does, Click the 'Continue' button. Otherwise, If there are errors on this screen, then follow instructions to fix. (screenshot below)

Install-V4 0-1.png


2. The next page is 'OpenEMR Setup' 'Step 1', which asks whether setup should create the database.

Leave the setting set to 'Have setup create the database', and click the 'Continue' button. (screenshot below)

Install-V4 0-2.png


3. The next page is 'OpenEMR Setup' 'Step 2'. It has a list of options used to setup the database, along with OpenEMR user and OpenEMR path information.

Most users will just need to enter a 'Initial User Password' for the OpenEMR User and a 'Password' for the sql user(these fields are in red rectangles in below screenshot). Some users may also have to enter the password of the 'root' user in the mysql server. (screenshot below)

V4.0 5.png


4. The next page is 'OpenEMR Setup' 'Step 3'. On this page you should see logs of OpenEMR connecting and creating the database.

At the bottom of the page, it should read 'Next step will install and configure access controls (php-GACL).' Click the 'Continue' button. (screenshot below)

Install-V4 0-4.png


5. The next page is 'OpenEMR Setup' 'Step 4'. On this page, OpenEMR configures access controls (php-GACL).

You should see logs of OpenEMR installing and configuring php-GACL. you should see 'Success!' in green lettering four times. At the bottom of the page, it should read 'Next step will configure PHP.'. Click the 'Continue' button. (screenshot below)

Install-V4 0-5.png


6. The next page is 'OpenEMR Setup' 'Step 5'. On this page is displayed recommendations of how to configure your php.ini config file.

Read and follow the instructions carefully. At the bottom of the page, it should read "Next step will configure Apache web server.". We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)

Install-V4 0-6.png


7. The next page is 'OpenEMR Setup' 'Step 6'. On this page is displayed recommendations and warnings regarding directories Apache should NOT allow the outside world to see, as these directories contain Protected Health Information.

Read and follow the instructions carefully. We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)

Install-V4 0-7.png


8. The next page is 'OpenEMR Setup'. This is the final configuration page.

This final installation screen gives additional instructions. This information is personalized for your setup, so we suggest you print this screen for future reference. At the bottom of the page is your OpenEMR username and password, along with a link to OpenEMR. (screenshot below)

Install-V4 0-8.png


OpenEMR after installation: (screenshot below)

Login-V4 0-1.png

Post-install FileSystem Permission Cleanups

1. After installation is finished, then secure files (this should be done as root user):

chmod 644 openemr/library/sqlconf.php
chmod 600 openemr/acl_setup.php
chmod 600 openemr/acl_upgrade.php
chmod 600 openemr/sl_convert.php
chmod 600 openemr/setup.php
chmod 600 openemr/sql_upgrade.php
chmod 600 openemr/gacl/setup.php
chmod 600 openemr/ippf_upgrade.php
chmod 600 openemr/admin.php


Download and install most recent patch

Instruction to do this can be found on the OpenEMR Patches page.