forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
179 lines (133 loc) · 8.09 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Installation Instructions
-------------------------------------
OSI Certified Open Source Software
-------------------------------------
I...................Overview of files
II..................Unpacking
III.................Setup
IV..................Upgrading
V...................Version History
-------------------------------------
I. Overview of Directories
accounting - Contains information and scripts to support SQL-Ledger
contrib - Contains many user-contributed encounter forms and utilities
custom - Contains scripts and other text files commonly customized
Documentation - Contains useful documentation
interface - Contains User Interface scripts and configuration
library - Contains scripts commonly included in other scripts
sql - Contains initial database images
II. Unpacking
The OpenEMR release archive should be named as follows:
openemr-<version>.tar.gz -or- openemr-<version>.zip
To extract the archive, use either of the following commands from the command line:
bash# tar -pxvzf openemr-<version>-release.tar.gz
bash# unzip openemr-<version>-release.tar.gz
Be sure to use the -p flag when using tar, as certain permissions must be preserved.
OpenEMR will be extracted into a directory named openemr.
III. Setup
To run OpenEMR, MySQL and Apache or another PHP-capable webserver must be configured.
To download Apache, visit www.apache.org
For information on how to install MySQL, visit www.mysql.com
PHP may be downloaded from www.php.net
OpenEMR requires a number of webserver and PHP features which may not be
enabled on your system. These include:
- PHP Index support (ensure that index.php is in your Index path in httpd.conf)
- Session variables
- PHP libcurl support (optional for operation, mandatory for billing
Copy the OpenEMR folder into the root folder of the webserver. On Mandrake
Linux, for example, use the command:
bash# mv openemr /var/www/html/
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: https://localhost/openemr/setup.php.
The setup script will step you through the configuration of the database.
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.
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.
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.
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.
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.
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.
To create custom encounter forms, see the files
openemr/Documentation/3rd Party Form API.txt
openemr/interface/forms/OpenEMR_form_example-rev2.tar.gz
and read the included documentation. Many forms exist in contrib/forms as well
as in interface/forms and may be used as examples.
Other configuration settings are stored under includes/config.php.
Everything should work out of the installation without touching those, but if
you want fax, sql-ledger, and/or Freeb integration you will need to adjust some
parameters in that file.
IV. Setting Up Access Control
As of this writing the option of adding phpGACL to your OpenEMR installation is
a work in progress. You can choose to do nothing about this, in which case
OpenEMR's traditional and very limited access controls will be used, or you can
choose to install phpGACL (see https://phpgacl.sourceforge.net/), in which case
you should read the phpGACL manual and the comments in library/acl.inc and also
modify that file to point to your phpGACL installation directory. See
Documentation/README.phpgacl for more information.
It is reasonable to first get a basic OpenEMR installation working and then add
these extended access controls later.
V. Upgrading
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:
openemr/interface/globals.php
openemr/library/sqlconf.php
openemr/library/sql-ledger.inc
openemr/includes/config.php (if you have modified it)
But before replacing them, compare the old and new files in case there are
new parameters that need to be included. If there are other files that you
have customized, then you will also need to treat those carefully.
When upgrading, check the directory openemr/sql/ for files named *upgrade.sql
Those files have sql statements to modify tables in your database so they will
match the layout of the current version.
Be sure to backup the content of your database before doing so.