Alternative way to show unauthorized login attempt at terminal.
[openemr.git] / INSTALL
blobe4390bb31cdace0ee10862d3a87f39a1647110c4
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
26 II. Unpacking
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.
45 III. Setup
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)
56 - Session variables
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
68 and embedded php-GACL databases.
70 In step 1, you need to tell setup whether it needs to create the databases on
71 its own, or if they you have already created them.  MySQL root priveleges will
72 be required to create a database.
74 In step 2, you will be presented with a number of fields which specify the MySQL
75 server details.
77 The "Server Host" field is the hostname of the MySQL server.  If you use the
78 mysql command line client, this is the string you would type after the -h flag.
79 If this is on the same machine as the webserver, leave this as "localhost".
81 The "Server Port" field specifies the port to use when connecting to the MySQL
82 server over TCP/IP.  This should be left as 3306 unless you changed it in your
83 MySQL configuration.
85 The "Database Name" field is the database where OpenEMR will reside.  If you
86 selected to have the database created for you, this database will be created,
87 along with the user specified in "Login Name".  If this database exists, setup
88 will not be able to create it, and will return an error.  If you selected that
89 you have already created the database, then setup will use the information you
90 provide to connect to the MySQL server.  Note that setup will not accept a
91 password that is not at least one (1) character in length.
93 The "User Hostname" field accompanies the Login Name field.  It is the hostname
94 from which the user is permitted to connect to the database.  This will only
95 appear if setup is creating the database.
97 The "Root Pass" field will likewise only appear when setup is creating the
98 database.  It is the password of your existing root user, and is used to acquire
99 the privileges to create the new database and user.  The rest of the fields are
100 specific to your practice.
102 The "Initial User" is the username of the first user, which is what they will
103 use to login.  Their default password will always be "pass", without the quotes.
104 The "Initial User's Name" is the value to be used as their last name.  This
105 information may be changed in the user administration page.
107 The "Initial Group" is the first group that will be created.  A user may belong
108 to multiple groups, which again, can be altered on the user administration page.
109 It is suggested that no more than one group per office be used.
111 Step 3 is where setup will install the OpenEMR database and connect to it to
112 create the initial tables.  Should anything fail during step 3, you may have
113 to remove the existing database or tables before you can try again. If no errors
114 occur, you will see a "Continue" button at the bottom.  Before clicking this,
115 you need to ensure that the webserver user (often "nobody", "apache", or
116 "www-data") has write privileges on the openemr/library/sqlconf.php,
117 openemr/gacl/gacl.ini.php and openemr/gacl/gacl.class.php files and the
118 openemr/gacl/admin/templates_c directory.  The command
119 "chmod a+w library/sqlconf.php" will grant global write permissions
120 to the file.  Be sure to set them back to something more secure (such as
121 chmod 644) before actively using OpenEMR.
123 Step 4 will initially check to ensure the proper writing priviledges in the
124 files and directory mentioned above in step 3.  Should it display
125 errors related to file writing priviledges you may click the 'Check Again'
126 button to try again (after fixing file permission).  After the file
127 priviledges are confirmed, it will then write setting to the SQL
128 configuration file, and then install and configure the embedded phpGACL
129 access controls.
131 Once setup is completed, one last thing must be done before OpenEMR can be used.
132 The file openemr/interface/globals.php must be edited by hand to reflect the
133 path and address of your webserver. The values for $webserver_root and $web_root
134 must be set accordingly. Also, to change the appearance of OpenEMR, uncomment or
135 comment theme-description lines at the bottom of config.php.
137 Once the system has been configured properly, you may login.  Connect to the
138 webserver where the files are stored with your web browser.  Login to the system
139 using the username that you picked (default 'admin' without quotes), and the
140 password 'pass', without the quotes.  From there, select the "Administration"
141 option, and customize the system to your needs.  Add users and groups as is
142 needed. For information on using OpenEMR, consult the User Documentation located
143 in the Documentation folder.
145 To create custom encounter forms, see the files
147   openemr/Documentation/3rd Party Form API.txt
148   openemr/interface/forms/OpenEMR_form_example-rev2.tar.gz
150 and read the included documentation. Many forms exist in contrib/forms as well
151 as in interface/forms and may be used as examples.
153 Other configuration settings are stored under includes/config.php.
154 Everything should work out of the installation without touching those, but if 
155 you want fax, sql-ledger, and/or Freeb integration you will need to adjust some
156 parameters in that file.
158 General-purpose fax support requires customization of interface/globals.php
159 and custom/faxcover.txt; it also requires the following utilities:
161 * faxstat and sendfax from the HylaFAX client package
162 * mogrify from the ImageMagick package
163 * tiff2pdf, tiffcp and tiffsplit from the libtiff-tools package
164 * enscript
167 IV. Setting Up Access Control
169 Since OpenEMR version 2.9.0.3, phpGACL access control software has been
170 embedded in OpenEMR, and these access controls are installed and
171 configured automatically during OpenEMR setup.  It can be administered
172 within OpenEMR in the admin->acl menu.  This is very powerful
173 access control software.  To learn more about phpGACL
174 (see http://phpgacl.sourceforge.net/), recommend reading the phpGACL manual,
175 the /openemr/Documentation/README.phpgacl file, and the online wiki at
176 www.oemr.org. Also recommend reading the comments in /openemr/library/acl.inc.
178 V. Upgrading
180 Be sure to back up your OpenEMR installation and database before upgrading!
182 Upgrading OpenEMR is currently done by replacing the old openemr directory with
183 a newer version. Before replacing the old openemr directory, copy the following
184 files out, and replace them into the new openemr folder afterwards:
186   openemr/interface/globals.php
187   openemr/library/sqlconf.php
188   openemr/includes/config.php (if you have modified it)
190 But before replacing them, compare the old and new files in case there are
191 new parameters that need to be included.  If there are other files that you
192 have customized, then you will also need to treat those carefully.
194 To upgrade the database, run the sql_upgrade.php script from your web
195 browser (for example http://openemr.location/sql_upgrade.php).  It will
196 prompt you to select the old release number, and will display the SQL
197 commands issued as the upgrade occurs.
199 Next, if you are converting from SQL-Ledger to OpenEMR's internal A/R
200 management (normally you should), run the sl_convert.php script
201 (e.g. http://openemr.location/sl_convert.php).  Note this script may
202 run for several minutes or longer.
204 If phpGACL is installed (automatically installed since OpenEMR version 2.9.0.3),
205 then you should upgrade your Access Controls by running the acl_upgrade.php
206 program using your web browser (e.g. http://openemr.location/acl_upgrade.php).