install openemr feb2010

Upload: bikash-shrestha

Post on 07-Apr-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 Install Openemr Feb2010

    1/17

    Page 1 of 17

    OpenEMR

    NEW INSTALLATION AND UPGRADE

    Quick guide

    September 2nd

    , 2009Updated February 1st , 2010

    Preliminary documentation

  • 8/4/2019 Install Openemr Feb2010

    2/17

    Page 2 of 17

    Preliminary notes

    1. This guideline has been designed assuming you have some basic knowledge about linux operatingsystem

    2. It also assumes that a reasonably Debian or Ubuntu Linux distribution has been previously installed asOS

    3. The process followed by the package, in any case, New Installation or Upgrade an existing one, assumethat OpenEMR system will be/is installed on the /var/www/openemr directory.

    4. Because the reason above, for multiple installations in one single computer these instructions do notapply. Please contact the system consultants to guide you through, if this is the case

  • 8/4/2019 Install Openemr Feb2010

    3/17

    Page 3 of 17

    Installation of IPPF OpenEMR 3.1.1.x

    (New installation)

    .

    1. Make sure you have the latest .deb package for openemr-ippf. You can find it athttp://190.86.204.11/download/. As of this writing the current release is openemr-ippf-3.1.1.x.deb

    where .x is the latest one. Please download the file with the higher release number.

    Then make sure the following dependent packages are installed. You can use the Synaptic package

    manager to check this:

    a p a c h e 2 - mp m- p r e f o r k

    c u p s y s

    c u p s y s - b s d

    c u p s y s - c l i e n t

    c u p s - p d f

    i ma g e ma g i c k

    l i b a p a c h e 2 - mo d - p h p 5

    l i b d a t e - c a l c - p e r ll i b d b d - my s q l - p e r l

    l i b d b i - p e r l

    l i b h t ml - p a r s e r - p e r l

    l i b t i f f - t o o l s

    l i b www- me c h a n i z e - p e r l

    l i b x ml - p a r s e r - p e r l

    my s q l - s e r v e r

    p h p 5 - c l i

    p h p 5 - my s q l

    p h p - p e a r N E W! !

    All the dependencies above must be installed first, even if you are only upgrading the OpenEMR

  • 8/4/2019 Install Openemr Feb2010

    4/17

    Page 4 of 17

    2. Now, once the previous step has been completed, you can proceed installing the OpenEMR package. Todo this, open a terminal window and type the following command as the root user:

    d p k g - i < f i l e n a me >

    where is the full /path/name of the package file.

    Or if you have any Ubuntu distributon, please add the sudo command at the beginning, as showed

    below:

    s u d o d p k g i < f i l e n a me >

    N O T E : s u d o mu s t b e t y p e d a n y t i me a c o mma n d l i n e i s e n t e r e d , wh e n u b u n t u i s t h e l i n u x

    d i s t r i b u t i o n i n u s e a n d t h e c o mma n d mu s t b e r u n a s r o o t .

    After the install you will have a new directory /var/www/openemr.

    3. You will probably need to fix the PHP configuration a bit. Enter this command to edit/modify thefollowing file:

    n a n o / e t c / p h p 5 / a p a c h e 2 / p h p . i n i

    and change the following variables to the values indicated (remove the ";" from the start of the"error_log" line to uncomment it):

    ma x _ e x e c u t i o n _ t i me = 6 0

    ma x _ i n p u t _ t i me = 9 0

    me mo r y _ l i mi t = 6 0 M

    d i s p l a y _ e r r o r s = Of f

    l o g _ e r r o r s = On

    e r r o r _ l o g = s y s l o g

    u p l o a d _ ma x _ f i l e s i z e = 8 Ms e s s i o n . g c _ ma x l i f e t i me = 1 4 4 0 0

    And as before: Ctrl-X, Y, and hit Enter.

    4. Now, restart the web server with this command as root:/ e t c / i n i t . d / a p a c h e 2 / r e s t a r t

    5. We will also customize the OpenEMR globals.php file. Enter this command:n a n o / v a r / www/ o p e n e mr / i n t e r f a c e / g l o b a l s . p h p

    and, if desired, change the following variable (the value can be whatever you like):

    $ o p e n e mr _ n a me = ' I P P F CMS ' ; T h i s t i t l e wi l l b e r e f l e c t e d i n t h e l o g i n s c r e e n o f O p e n E MR

    Save these changes as before.

  • 8/4/2019 Install Openemr Feb2010

    5/17

    Page 5 of 17

    6. Creating the OpenEMR database

    Now, we are ready to create the OpenEMR database. Browse to http://localhost/openemr/setup.php

    Follow the instructions given in the next screens:

    Step No. 6.1.

    Browse to http://localhost/openemr/setup.php . Click on the continue button at the bottom of thescreen.

    Step No. 6.2. OpenEMR expects the following information. Please take note of all the parametersprovided since they might be used later for maintenance or upgrade tasks

  • 8/4/2019 Install Openemr Feb2010

    6/17

    Page 6 of 17

    In the SERVER section leave the default values as they are shown; only need to add the Passwordparameter.

    Follow the recommended type of password the screen shows. Again take note of the password, since it

    can be required later for maintenance or upgrades.

    Fill in the SERVER, CLIENT and USER sections as shown above. Click Continue.

    Assuming everything works as shown, click Continue as illustrated.

    Again, follow the instructions provided in the screen above to set the CLIENT and USER section. Then

    click on the continue button

  • 8/4/2019 Install Openemr Feb2010

    7/17

    Page 7 of 17

    Step No. 6.3. If the previous information is OK, this step will run automatically, and the continue

    button should be showed, as in the following screen

    Step No. 6.4 It will also run automatically if the setup does not find any previous error. The screen willlook like the next one

    When click on the continue button, other scripts will be showed indicating that OpenEMR database

    has been properly created and it will be ready to test log into it browsing as follows:

    http://localhost/openemr/

    Note that the initial login name is "admin" with a password of "pass". It is recommended to change theAdministrator password as soon as possible.

    And of course you and others can access it via the network IP address, with something like

    http://192.168.8.95/openemr/ (the IP in this case in only an example, you should use the appropriate IPaddress)

  • 8/4/2019 Install Openemr Feb2010

    8/17

    Page 8 of 17

    At this point, OpenEMR system has been properly installed.

  • 8/4/2019 Install Openemr Feb2010

    9/17

    Page 9 of 17

    Upgrading an Existing IPPF OpenEMR Installation

    Before upgrading, you should know if the existing installation is a package or not. If you are not sure,

    enter this command from the Terminal

    d p k g l | g r e p o p e n e mr

    If the result is a line of information something like this:

    i i o p e n e mr - i p p f 3 . 0 . 1 . 1 Op e n E MR me d i c a l p r a c t i c e ma n a g e me n t s y s t e m.

    ... then you know that it is installed as a .deb package. If there is no output, then it is not. Proceedaccordingly with the following Case A or Case B as explained in the next pages

  • 8/4/2019 Install Openemr Feb2010

    10/17

    Page 10 of 17

    Case A: If the existing installation is a .deb package.

    Step No. A.1: Back up the old installation using the Backup option in the Administration section in

    OpenEMR

    Step No. A.2: Make sure you have the latest .deb package for openemr-ippf. You can find it athttp://190.86.204.11/download/. As of this writing the current release is openemr-ippf-3.1.1.x.deb.

    Where .x is the latest system release number.

    Step No. A.3: As root, make a copy of the old web directory for possible later reference, like this:

    c d / v a r / www

    c p - a o p e n e mr o p e n e mr . o l d

    Step No. A.4: To install the new package, open a terminal window and type

    d p k g - i < f i l e n a me >

    where is the full /path/name of the package file.

    After the install you will have an updated directory /var/www/openemr. No database changes have

    been applied yet.

    Step No. A.5: Examine the old globals.php file and take note of some parameters value, in order to use

    the same in the new installations. Use a command as follows:

    l e s s / v a r / www/ o p e n e mr . o l d / i n t e r f a c e / g l o b a l s . p h p

    and make a note of any custom settings. These are likely to include the following, but there may be

    others, take note all of the relevant:

    $ GL OB A L S [ ' s c h e d u l e _ s t a r t ' ]

    $ GL OB A L S [ ' s c h e d u l e _ e n d ' ]

    If needed, modify the new globals.php accordingly as root:

    n a n o / v a r / www/ o p e n e mr / i n t e r f a c e / g l o b a l s . p h p

    Step No. A.6: Because this is an upgrade, donot run setup.php. Instead, you need to run three upgradescripts using the web browser:

    h t t p : / / l o c a l h o s t / o p e n e mr / s q l _ u p g r a d e . p h p

    This script will ask you for the previous version installed. This information is showed usually at the left

    top corner in the system login page, as showed in the example below

  • 8/4/2019 Install Openemr Feb2010

    11/17

    Page 11 of 17

    In this example the version number is 3.1.1. The remaining number, 6 in this case indicates theinstallation package consecutive

    You can select from the drop-down list that the script will show, an older version that the one iscurrently installed, but never a later version.

    Once this script has been executed, please proceed to run the following scripts, IN THE ORDER

    THEY ARE MENTIONED

    h t t p : / / l o c a l h o s t / o p e n e mr / a c l _ u p g r a d e . p h p

    h t t p : / / l o c a l h o s t / o p e n e mr / i p p f _ u p g r a d e . p h p

    Running these three scripts we are assuring the database is being upgraded accordingly. Warning

    messages will be produced when runs those files. Please save them as a txt file for later reference,especially if some troubles arise during the process

    Step No. A.7: If the previous installation used SQL-Ledger (probably not if you are upgrading from

    3.0.1.x), then you must convert the SQL-Ledger data to OpenEMR's internal A/R management. To dothat, browse to:

    h t t p : / / l o c a l h o s t / o p e n e mr / s l _ c o n v e r t . p h p

    This conversion may take some time to run and as in the previous script (step A.6) a list of warningcould come up. Please save them as a txt file for later references.

  • 8/4/2019 Install Openemr Feb2010

    12/17

    Page 12 of 17

    Case B: If the existing installation is not a .deb package.

    Step No.B.1: Back up the old installation, using the Administration option on OpenEMR

    Step No. 2: Make sure you have the latest .deb package for openemr-ippf. You can find it athttp://190.86.204.11/download/. As of this writing the current release is openemr-ippf-3.1.1.x.deb.

    where .x is the latest system release.

    Step No. B.3: Move your /var/www/openemr directory out of the way so it will not interfere with the

    new installation, for example:

    c d / v a r / www

    mv o p e n e mr o p e n e mr . o l d

    Step No. B.4: To install the new package, open a terminal window and type

    d p k g - i < f i l e n a me >

    where is the full /path/name of the package file. After the install you will have a newdirectory /var/www/openemr.

    Step No. B.5: Examine old openemr/library/sqlconf.php, in order to take note of some parameters value

    relevant for next steps. Use the following command (in the Terminal window)

    c a t / v a r / www/ o p e n e mr . o l d / l i b r a r y / s q l c o n f . p h p

    Make a note of the database name, user and password in that file, and then edit

    /var/www/openemr/library/sqlconf.php to contain those same values:

    n a n o / v a r / www/ o p e n e mr / l i b r a r y / s q l c o n f . p h p

    Step No. B.6: Modify globals.php. First, examine the old globals.php like this:

    l e s s / v a r / www/ o p e n e mr . o l d / i n t e r f a c e / g l o b a l s . p h p

    and make a note of any custom settings. These are likely to include the following, but there may beothers:

    $ o p e n e m r _ n a m e

    $ GL OB A L S [ ' s c h e d u l e _ s t a r t ' ]

    $ GL OB A L S [ ' s c h e d u l e _ e n d ' ]

    Then modify the new globals.php accordingly:

    n a n o / v a r / www/ o p e n e mr / g l o b a l s . p h p

    Step No. B.7: Because this is an upgrade, donot run setup.php. Instead you need to run three upgrade

    scripts using the web browser:

  • 8/4/2019 Install Openemr Feb2010

    13/17

    Page 13 of 17

    h t t p : / / l o c a l h o s t / o p e n e mr / s q l _ u p g r a d e . p h p

    This script will ask you for the previous version installed. This information is showed usually at the lefttop corner in the system login page, as showed in the example below

    In this example the version number is 3.1.1. The remaining number, 6 in this case indicates the

    installation package consecutive

    You can select from the drop-down list that the script will show, an older version that the one is

    currently installed, but never a later version.

    Once this script has been executed, please proceed to run the following scripts, IN THE ORDER

    THEY ARE MENTIONED

    h t t p : / / l o c a l h o s t / o p e n e mr / a c l _ u p g r a d e . p h p

    h t t p : / / l o c a l h o s t / o p e n e mr / i p p f _ u p g r a d e . p h p

    Step No B.8: If the previous installation used SQL-Ledger (probably not if you are upgrading from3.0.1.x), then you must convert the SQL-Ledger data to OpenEMR's internal A/R management. To do

    that, browse to:

    h t t p : / / l o c a l h o s t / o p e n e mr / s l _ c o n v e r t . p h p

    This conversion may take some time to run.

  • 8/4/2019 Install Openemr Feb2010

    14/17

    Page 14 of 17

    Installing a Virtual Printer

    The remainder of these instructions is for creating a virtual printer. This is optional, and most sites willprobably not need it.

    Next we'll create a "virtual" PDF printer. This is possible because we installed the cups-pdf package. SelectDesktop/Administration/Printing and then double-click the "New Printer" icon.

    Select "PDF Printer" and click Forward. Select "Generic" as the manufacturer, and "postscript color printerrev4" as the model. Click Apply.

  • 8/4/2019 Install Openemr Feb2010

    15/17

    Page 15 of 17

    The new printer appears.

    We want the virtual printer's PDF output to go to a place that is easily accessed by users. A web serverdirectory is a good place for that. So, back in the terminal window, enter these commands:

    mk d i r / v a r / www/ p r i n t

    c h mo d u g o + r w x / v a r / www/ p r i n t

    n a n o / e t c / c u p s / c u p s - p d f . c o n f

    Uncomment and change the following values in cups-pdf.conf as indicated:

    Ou t / v a r / www/ p r i n t

    A n o n D i r N a me / v a r / www/ p r i n tT i t l e Pr e f 1

    U s e r U M a s k 0 0 0 0

    The TitlePref setting will give us more meaningful PDF file names. The UserUMask setting relaxespermissions of the generated files for more flexibility.

  • 8/4/2019 Install Openemr Feb2010

    16/17

    Page 16 of 17

    Edit /var/www/openemr/custom/statement.inc.php so that it references the new printer name (postscript-color-printer-rev4) as indicated above. This will allow us to use the PDF printer for printing patient statements.

    Select Desktop/Administration/Printing again to bring up the Printers window. Right-click on the new printerand select "Make Default". Then right-click again and select Properties.

  • 8/4/2019 Install Openemr Feb2010

    17/17

    Let's test it! Click "Print a Test Page".

    Browse to http://localhost/print/. If everything worked, you'll see the generated file and can click on it to viewits contents.