The OpenEMR Virtual Appliance

is a sub-project of OpenEMR. The
home page of OpenEMR can be
found at www.oemr.org .


Upgrade OpenEMR 2.8.1 Appliance To 2.8.2


Page Last modified: 10/04/07 01:50:16 AM


LINK TO MANUAL IN PDF FORMAT

Author: Brady Miller
Email: brady@sparmy.com
Discussion Board: http://www.oemr.org/modules/newbb/

Please, back up all of your data, and use these instructions at your own risk.



      1. First, upgrade OpenEMR:

        1. Download openemr-2.8.2.tar.gz (version 2.8.2) from sourceforge at: http://sourceforge.net/project/showfiles.php?group_id=60081

        2. Enter below bolded instructions on command line as root user:

#log into root
su

#Ensure register globals in php is turned off.
#edit file /etc/php4.ini:
mcedit /etc/php4.ini
#EDIT the following variable:
register_globals = off
TEXT EDITOR SAVE AND EXIT

#restart httpd
service httpd restart

#make backup directories
mkdir /backupopenemrandfreeb
mkdir /backupopenemrandfreeb/2_8_1

#move old OpenEMR 2.8.1 to the backup directory
mv /var/www/html/openemr /backupopenemrandfreeb/2_8_1/openemr

#put the new OpenEMR 2.8.2 program in its place
cd /var/www/html
tar pxzvf /location/to/tar/openemr-2.8.2.tar.gz
mv openemr-2.8.2 /var/www/html/openemr

#secure OpenEMR
chown -Rf root:root openemr

#Need to change some file/folder ownerships
chown apache:apache -R /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
chown apache:apache -R /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
chown apache:apache -R /var/www/html/openemr/library/freeb

#Restore the original scanned documents directory
cp -fr /backupopenemrandfreeb/2_8_1/openemr/documents /var/www/html/openemr/

#Change file-folder permissions of documents directory
chown apache:apache -R /var/www/html/openemr/documents

#Now for the hardest part of the upgrade; editing the new config files. There are five files that need to be compared to your old config files: openemr/interface/globals.php, openemr/library/sqlconf.php, openemr/library/sql-ledger.inc, openemr/includes/config.php, and openemr/library/acl.inc . The below instructions are specific for the openemr 2.8.1 appliance(only the bolded files above require changing or copying). If you have made your own changes to the config files, then I'd recommend comparing them to ensure no other changes are needed. We will replace one file with the previous 2.8.1 config file and will edit three of the new 2.8.2 config files.

#replace new /var/www/html/openemr/library/sqlconf.php file with the old 2.8.1 file
cp /backupopenemrandfreeb/2_8_1/openemr/library/sqlconf.php /var/www/html/openemr/library/sqlconf.php

#edit file /var/www/html/openemr/interface/globals.php:
mcedit /var/www/html/openemr/interface/globals.php
#edit the following bolded variables :
$sl_dbname = 'openemr'; // sql-ledger database name
$sl_dbpass = 'sql-ledger-password'; // sql-ledger database login password (click link for default above password, which is the PostgreSQL database password, and should be 'sqlledger' )
TEXT EDITOR SAVE AND EXIT

#edit file /var/www/html/openemr/includes/config.php:
mcedit /var/www/html/openemr/includes/config.php
#edit the following bolded variables :
$GLOBALS['oer_config']['ws_accounting']['enabled'] = true;
$GLOBALS['oer_config']['ws_accounting']['username'] = "openemr";
$GLOBALS['oer_config']['ws_accounting']['password'] = "openemrpassword"; (click link for default above password, which is sql-ledger 'openemr' user password, and should be “openemr”)
$GLOBALS['oer_config']['ws_accounting']['url_path'] = "https://" .
$_SERVER["SERVER_NAME"] . "/sql-ledger/login.pl";
TEXT EDITOR SAVE AND EXIT

#edit file /var/www/html/openemr/library/acl.inc:
mcedit /var/www/html/openemr/library/acl.inc
#uncomment below line and edit the bolded variable:
$phpgacl_location = "/var/www/html/phpgacl";
TEXT EDITOR SAVE AND EXIT

#Backup the mysql database into backup directory.
mkdir /backupopenemrandfreeb/2_8_1/mysqldatabase
mysqldump --opt --all-databases | gzip > /backupopenemrandfreeb/2_8_1/mysqldatabase/mysql_backup.gz

#Upgrade the mysql database
mysql openemr < /var/www/html/openemr/sql/2_8_1-to-2_8_2_upgrade.sql

#OPTIONAL If you want to change to the new “concurrent frames look”(check out the demos to decide), then you will need to edit the file /var/www/html/openemr/interface/globals.php:
mcedit /var/www/html/openemr/interface/globals.php
#edit the below bolded variable :
$GLOBALS['concurrent_layout'] = true;
TEXT EDITOR SAVE AND EXIT

      1. Second, upgrade FreeB:

        1. Download freeb-0.12.tar.gz (version 0.12) from sourceforge: http://sourceforge.net/project/showfiles.php?group_id=60081

        2. Enter below bolded instructions on command line as root user:

#log into root
su

#move old FreeB 0.11 to the backup directory
mv /usr/share/freeb /backupopenemrandfreeb/2_8_1/freeB

#put the new FreeB 0.12 program in its place
cd /usr/share
tar xzvf /location/to/tar/freeb-0.12.tar.gz
mv freeb-* /usr/share/freeb

#secure FreeB
chown root:root -R /usr/share/freeb

#create a directory that apache can write to
mkdir /usr/share/freeb/public

#restore original billing files(if they exist)
cp -fr /backupopenemrandfreeb/2_8_1/freeb/public /usr/share/freeb/

#Allow apache access to public directory
chown apache:apache -R /usr/share/freeb/public

#restart the freeb service
service freeb stop
service freeb start

YOU ARE DONE