1 Installation Instructions
2 -------------------------------------
4 OSI Certified Open Source Software
6 -------------------------------------
8 I...................Overview of files
9 II..................Unpacking
10 III.................Setup
11 IV..................Upgrading
12 V...................Version History
14 -------------------------------------
16 I. Overview of Directories
18 accounting - Contains information and scripts to support SQL-Ledger
19 contrib - Contains many user-contributed encounter forms and utilities
20 custom - Contains scripts and other text files commonly customized
21 Documentation - Contains useful documentation
22 interface - Contains User Interface scripts and configuration
23 library - Contains scripts commonly included in other scripts
24 sql - Contains initial database images
28 The OpenEMR release archive should be named as follows:
30 openemr-<version>.tar.gz -or- openemr-<version>.zip
32 To extract the archive, use either of the following commands from the command line:
34 bash# tar -pxvzf openemr-<version>-release.tar.gz
35 bash# unzip openemr-<version>-release.tar.gz
37 Be sure to use the -p flag when using tar, as certain permissions must be preserved.
39 OpenEMR will be extracted into a directory named openemr.
41 Alternatively a Debian package may be available as a file named
42 openemr-<version>.deb. This may work with some other Debian-like
43 Linux distributions such as Ubuntu.
47 To run OpenEMR, MySQL and Apache or another PHP-capable webserver must be configured.
48 To download Apache, visit www.apache.org
49 For information on how to install MySQL, visit www.mysql.com
50 PHP may be downloaded from www.php.net
52 OpenEMR requires a number of webserver and PHP features which may not be
53 enabled on your system. These include:
55 - PHP Index support (ensure that index.php is in your Index path in httpd.conf)
57 - PHP libcurl support (optional for operation, mandatory for billing)
59 Copy the OpenEMR folder into the root folder of the webserver. On Mandrake
60 Linux, for example, use the command:
62 bash# mv openemr /var/www/html/
64 Make sure the webserver is running, and point a web-browser to setup.php located
65 within the openemr web folder. If you installed OpenEMR in the root web
66 directory, the URL would read: http://localhost/openemr/setup.php.
67 The setup script will step you through the configuration of the OpenEMR.
69 The first screen of the setup script will ensure that several files/directories
70 exist and ensure that the webserver user (often "nobody", "apache", or
71 "www-data") has write privileges on these files/directories. The files
72 include openemr/interface/globals.php, openemr/library/sqlconf.php,
73 openemr/gacl/gacl.ini.php and openemr/gacl/gacl.class.php. In linux, these
74 can be set by "chmod a+w filename" command to grant global write permissions
75 to the file, but be sure to set them back to something more secure (such as
76 chmod 644) before actively using OpenEMR. The directories include
77 openemr/gacl/admin/templates_c, openemr/edi, openemr/documents,
78 openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled and
79 openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache. The command
80 "chown apache:apache -R directory_name" will grant global write permissions
81 to the directories, and we recommend making these changes permanent.
82 Should it display errors related to file/directory writing priviledges you
83 may click the 'Check Again' button to try again (after fixing permissions).
85 In step 1, you need to tell setup whether it needs to create the database on
86 its own, or if you have already created the database. MySQL root priveleges will
87 be required to create a database.
89 In step 2, you will be presented with a number of fields which specify the MySQL
90 server details and the openemr directory paths.
92 The "Server Host" field is the hostname of the MySQL server. If you use the
93 mysql command line client, this is the string you would type after the -h flag.
94 If this is on the same machine as the webserver, leave this as "localhost".
96 The "Server Port" field specifies the port to use when connecting to the MySQL
97 server over TCP/IP. This should be left as 3306 unless you changed it in your
100 The "Database Name" field is the database where OpenEMR will reside. If you
101 selected to have the database created for you, this database will be created,
102 along with the user specified in "Login Name". If this database exists, setup
103 will not be able to create it, and will return an error. If you selected that
104 you have already created the database, then setup will use the information you
105 provide to connect to the MySQL server. Note that setup will not accept a
106 password that is not at least one (1) character in length.
108 The "Login Name" field is the MySQL user that will access the OpenEMR database.
109 If you selected to have the database created for you, this user will be
110 created. If you selected that you have already created the database,
111 then setup will use the information you provide to connect to the MySQL server.
113 The "Password" field is the password of the user entered into the above
114 "Login Name" field. If you selected to have the database created for you,
115 this user and password will be created. If you selected that you have already
116 created the database, then setup will use the information you provide to connect
119 The "Name for Root Account" field will only appear if setup is creating the
120 database. It is the name of the MySQL root account. For localhost, it is
121 usually ok to leave it 'root'.
123 The "Root Pass" field will likewise only appear if setup is creating the
124 database. It is the password of your existing root user, and is used to acquire
125 the privileges to create the new database and user.
127 The "User Hostname" field will also only appear if setup is creating the
128 database. It is the hostname of the Apache/PHP server from which the user
129 ("Login Name") is permitted to connect to the MySQL database. If you are setting
130 up MySQL and Apache/PHP on the same computer, then you can use 'localhost'.
132 The "Initial User" is the username of the first user, which is what they will
133 use to login. Limit this to one word only. Their default password will
134 always be "pass", without the quotes.
136 The "Initial User's Name" is the value to be used as their last name. This
137 information may be changed in the user administration page.
139 The "Initial Group" is the first group, basically name of the practice, that
140 will be created. A user may belong to multiple groups, which again, can be
141 altered on the user administration page. It is suggested that no more than
142 one group per office be used.
144 The "Absolute Path" is the full absolute directory path to openemr. The
145 default value is automatically created, so this should not need to be
146 modified. Note that it needs to end without a trailing slash. To avoid
147 confusion, either forward or backward slashes can be used.
149 The "Relative HTML Path" is the relative html path to openemr, ie. what you
150 would type into the web browser after the server address to get to OpenEMR.
151 For example, if you type "http://127.0.0.1/clinic/openemr/" to load OpenEMR,
152 set this to "/clinic/openemr" without the trailing slash. To avoid
153 confusion, either forward or backward slashes can be used.
155 Step 3 is where setup will configure OpenEMR. It will first create the database
156 and connect to it to create the initial tables. It will then write the mysql
157 database configuration to a file. It will then write the webserver root
158 directory to the /openemr/interface/globals.php file. Should anything fail
159 during step 3, you may have to remove the existing database or tables before
160 you can try again. If no errors occur, you will see a "Continue" button at the bottom.
162 Step 4 will install and configure the embedded phpGACL access controls. It
163 will first write configutation settings to files. It will then configure the
164 database. It will then give the "Initial User" administrator access.
165 Should anything fail during step 4, you may have to remove the existing database
166 or tables before you can try again. If no errors occur, you will see a
167 "Continue" button at the bottom.
169 It would be a good idea to restore secure permissions on the four
170 configuration files: interface/globals.php, library/sqlconf.php,
171 gacl/gacl.ini.php, and gacl/gacl.class.php files. In linux, recommend changing
172 these file permissions with the 'chmod 644 filename' command.
174 Once the system has been configured properly, you may login. Connect to the
175 webserver where the files are stored with your web browser. Login to the system
176 using the username that you picked (default 'admin' without quotes), and the
177 password 'pass', without the quotes. From there, select the "Administration"
178 option, and customize the system to your needs. Add users and groups as is
179 needed. For information on using OpenEMR, consult the User Documentation located
180 in the Documentation folder.
182 To ensure proper functioning of OpenEMR you must make sure your PHP
183 installation (normally set in your php.ini file) has "display_errors = Off",
184 "register_globals = Off", and "magic_quotes_gpc = Off".
186 In order to take full advantage of the patient documents capability, you must
187 make sure your PHP installation (normally set in your php.ini file) has
188 "file_uploads enabled", that "upload_max_filesize" is appropriate for your
189 use and that "upload_tmp_dir" is set to a correct value if the default of
190 "/tmp" won't work on your system. Also, The "openemrwebroot/documents"
191 and "openemrwebroot/edi" contain patient information, and it is important
192 to secure these directories. This can be done by placing pertinent
193 .htaccess files in these directories or by pasting the below in your
194 apache configuration file:
195 <Directory "openemrwebroot/documents">
199 <Directory "openemrwebroot/openemr/edi">
204 Reading openemr/includes/config.php and openemr/interface/globals.php is a
205 good idea. These files contain many options to choose from including themes.
207 To create custom encounter forms, see the files
209 openemr/Documentation/3rd Party Form API.txt
210 openemr/interface/forms/OpenEMR_form_example-rev2.tar.gz
212 and read the included documentation. Many forms exist in contrib/forms as well
213 as in interface/forms and may be used as examples.
215 Other configuration settings are stored under includes/config.php.
216 Everything should work out of the installation without touching those, but if
217 you want fax, sql-ledger, and/or Freeb integration you will need to adjust some
218 parameters in that file.
220 General-purpose fax support requires customization of interface/globals.php
221 and custom/faxcover.txt; it also requires the following utilities:
223 * faxstat and sendfax from the HylaFAX client package
224 * mogrify from the ImageMagick package
225 * tiff2pdf, tiffcp and tiffsplit from the libtiff-tools package
229 IV. Setting Up Access Control
231 Since OpenEMR version 2.9.0.3, phpGACL access controls are installed and
232 configured automatically during OpenEMR setup. It can be administered
233 within OpenEMR in the admin->acl menu. This is very powerful
234 access control software. To learn more about phpGACL
235 (see http://phpgacl.sourceforge.net/), recommend reading the phpGACL manual,
236 the /openemr/Documentation/README.phpgacl file, and the online wiki at
237 www.oemr.org. Also recommend reading the comments in /openemr/library/acl.inc.
241 Be sure to back up your OpenEMR installation and database before upgrading!
243 Upgrading OpenEMR is currently done by replacing the old openemr directory with
244 a newer version. Before replacing the old openemr directory, copy the following
245 files out, and replace them into the new openemr folder afterwards:
247 openemr/interface/globals.php
248 openemr/library/sqlconf.php
249 openemr/includes/config.php (if you have modified it)
251 But before replacing them, compare the old and new files in case there are
252 new parameters that need to be included. If there are other files that you
253 have customized, then you will also need to treat those carefully.
255 To upgrade the database, run the sql_upgrade.php script from your web
256 browser (for example http://openemr.location/sql_upgrade.php). It will
257 prompt you to select the old release number, and will display the SQL
258 commands issued as the upgrade occurs.
260 Next, if you are converting from SQL-Ledger to OpenEMR's internal A/R
261 management (normally you should), run the sl_convert.php script
262 (e.g. http://openemr.location/sl_convert.php). Note this script may
263 run for several minutes or longer.
265 If phpGACL is installed (automatically installed since OpenEMR version 2.9.0.3),
266 then you should upgrade your Access Controls by running the acl_upgrade.php
267 program using your web browser (e.g. http://openemr.location/acl_upgrade.php).