(estimated time 30 minutes to 1 hour)
This is a description of what I did to upgrade from 2.7.1 to 2.8.1
Get the latest code.
$> cd /usr/src
$> cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openemr login
(blank enter when prompted for password)
$> cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openemr co -P openemr
Copy to a temp directory.
Please note that /var/www/ has to match your web server root path and that I am prepending a 2 to the word openemr to work it as a temp working directory.
$> sudo cp -R openemr /var/www/2openemr
Match configuration files
Edit the following files from your new 2openemr directory and change the configuration values to what you already have in the same files under your former openemr installation.
interface/globals.php
includes/config.php
Get the documents.
Copy (or move) all the documents you have uploaded before, remember to match your real web server path, and to replace www-data with your current web server user name and group name
$> cd /var/www/2openemr/
$> sudo chown www-data:www-data documents
$> cd documents
$> cp -Rp /var/www/openemr/documetns/* ./
Get the forms from the old installation
$> sudo cp -Rp /var/www/openemr/interface/forms/* /var/www/2openemr/interface/forms/
Import your existant data
Here you have to know your DB credentials.
Create a new database and create a new user with rights to it.
(you can use phpmyadmin to do so).
modify library/sqlconf.inc to match your new database and user credentials, and put a 1 in the config variable.
Import your data, there's many different ways to do this, I just do what I am more familiar with.
First we dump the old database out,
$>cd /home/user
$> mysqldump -u userName -pPassWord –databases YourOldDatabase > olddatafile.sql
Then we dump the old data in the new database, but first edit the olddatafile.sql file and delete the first lane where it creates a database you already have, and modify the USE line to match the name of the new database you just created.
$> mysql -u NewUser -pNewPassWord
$> source olddatafile.sql
Update the database with the release updates. (include all files from the version you are updating from until the version you are updating to, in cronological order)
$> source /var/www/2openemr/sql/2_7_3-to-2_8_0_upgrade.sql
$> source /var/www/2openemr/sql/2_8_0-to-2_8_1_upgrade.sql
$> exit
delete the old data file
$> rm olddtafile.sql
Make sure you have the right right settings on the following directories.
Please make sure that the two folders underneath 'openemrwebroot/interface/main/calendar/modules/PostCalendar/pntemplates exist and are writable by the web server. The two subdirectories are 'compiled' and 'cache'.
Try "chown apache:apache -R openemrwebroot/interface/main/calendar/modul es/PostCalendar/pntemplates/compiled" and
"chown apache:apache -R openemrwebroot/interface/main/calendar/modules/P ostCalendar/pntemplates/cache". (If either subdirectory doesn't exist, create it first then do the chown above).
The user name and group of apache may differ depending on your distro, i.e. for Debian is www-data and www-data.
Test it
go to http://your_ip_here/2openemr
When everything is fine and tested rename your old install to openemrOLD, rename your new to openemr, and re-edit interface/globals.php to change the path name from 2openemr to openemr.
Alternatively you can delete the old installation and wipe the old database too.
Modify your backup script to match the new database configuration.
