in some php versions touch will give an error, error output supressed by @
[openemr.git] / INSTALL
blobf108a7471d33088422eaebc1f70b53edd2ba9842
1 Pennington Firm OpenEMR
2 PennFirm.com
3 San Diego, California
4 888-480-5050
5 619-696-5050
6 Installation Instructions
7 -------------------------------------
9 OSI Certified Open Source Software
11 -------------------------------------
13 I...................Overview of files
14 II..................Unpacking
15 III.................Setup
16 IV..................Upgrading
17 V...................Version History
19 -------------------------------------
21 I. Overview of Files
23 interface       - Contains User Interface scripts and configuration
24 library         - Contains backend library scripts
25 old             - Contains deprecated code and documentation
26 sql             - Contains initial database images
28 II. Unpacking
30 The OpenEMR release archive should be named as follows:
32 openemr-<version>.tar.gz  -or-  openemr-<version>.zip
34 To extract the archive, use either of the following commands from the command line:
36 bash# tar -pxvzf openemr-<version>-release.tar.gz
37 bash# unzip openemr-<version>-release.tar.gz
39 Be sure to use the -p flag when using tar, as certain permissions must be preserved.
41 OpenEMR will be extracted into a directory named openemr.
43 III. Setup
45 To run OpenEMR, MySQL and Apache or another PHP-capable webserver must be configured.
46 To download Apache, visit www.apache.org
47 For information on how to install MySQL, visit www.mysql.com
48 PHP may be downloaded from www.php.net
50 OpenEMR requires a number of webserver and PHP features which may not be enabled on your system.  These include:
52 - PHP Index support (ensure that index.php is in your Index path in httpd.conf)
53 - Session variables
54 - PHP libcurl support (optional for operation, mandatory for billing transmittion and interaction with the Pennington Firm Open Billing Network - visit www.PennFirm.com for more information)
56 Copy the OpenEMR folder into the root folder of the webserver. On Mandrake Linux, for example, use the command:
58 bash# mv openemr /var/www/html/
60 Make sure the webserver is running, and point a web-browser to setup.php located within the openemr web folder.  If you installed OpenEMR in the root web directory, the URL would read: http://localhost/openemr/setup.php.  The setup script will step you through the configuration of the database.
62 In step 1, you need to tell setup whether it needs to create the databases on its own, or if they you have already created them.  MySQL root priveleges will be required to create a database.  
64 In step 2, you will be presented with a number of fields which specify the MySQL server details.  The "Server Host" field is the hostname of the MySQL server.  If you use the mysql command line client, this is the string you would type after the -h flag.  If this is on the same machine as the webserver, leave this as "localhost".  The "Server Port" field specifies the port to use when connecting to the MySQL server over TCP/IP.  This should be left as 3306 unless you changed it in your MySQL configuration.  The "Database Name" field is the database where OpenEMR will reside.  If you selected to have the database created for you, this database will be created, along with the user specified in "Login Name".  If this database exists, setup will not be able to create it, and will return an error.  If you selected that you have already created the database, then setup will use the information you provide to connect to the MySQL server.  Note that setup will not accept a password that is not at least one (1) character in length.  The "User Hostname" field accompanies the Login Name field.  It is the hostname from which the user is permitted to connect to the database.  This will only appear if setup is creating the database.  The "Root Pass" field will likewise only appear when setup is creating the database.  It is the password of your existing root user, and is used to acquire the privileges to create the new database and user.  The rest of the fields are specific to your practice.  The "Initial User" is the username of the first user, which is what they will use to login.  Their default password will always be "pass", without the quotes.  The "Initial User's Name" is the value to be used as their last name.  This information may be changed in the user administration page.  The "Initial Group" is the first group that will be created.  A user may belong to multiple groups, which again, can be altered on the user administration page.  It is suggested that no more than one group per office be used.
66 Step 3 is where setup will install the database and connect to it to create the initial tables.  If no errors occur, you will see a "Continue" button at the bottom.  Before clicking this, you need to ensure that the webserver user (often "nobody", "apache", or "www-data") has write privileges on the library/sqlconf.php file.  The command "chmod a+w library/sqlconf.php" will grant global write permissions to the file.  Be sure to set them back to something more secure (such as chmod 644) before actively using OpenEMR.  Should anything fail during step 3, you may have to remove the existing database or tables before you can try again.
68 Step 4 is very much like step 3, except the only thing taking place is the writing of SQL configuration to disk.  Should it fail due to permissions or any other reason, you may click the reload button to try again.  
70 Once setup is completed, one last thing must be done before OpenEMR can be used.  The file openemr/interface/globals.php must be edited by hand to reflect the path and address of your webserver. The values for $webserver_root and $web_root must be set accordingly. Also, to change the appearance of OpenEMR, uncomment or comment theme-description lines at the bottom of config.php.
72 Once the system has been configured properly, you may login.  Connect to the webserver where the files are stored with your web browser.  Login to the system using the username that you picked (default 'admin' without quotes), and the password 'pass', without the quotes.  From there, select the "Administration" option, and customize the system to your needs.  Add users and groups as is needed. For information on using OpenEMR, consult the User Documentation located in the Documentation folder.
74 To create custom encounter forms, go to the openemr/Documentation/3rd Party Form API.txt and openemr/interface/forms/OpenEMR_form_example-rev2.tar.gz files and read the included documentation. A few forms are provided initially as examples.
76 IV. Upgrading
77 Upgrading OpenEMR is currently done by replacing the old openemr directory with a newer version. Before replacing the old openemr directory, copy the following two files out, and replace them into the new openemr folder afterwards:
79 openemr/interface/globals.php
80 openemr/library/sqlconf.php