OpenEMR 3.1 OS X Macintosh Installation

From OpenEMR Project Wiki

Required Software Installation

OSX has a WebServer (apache2) as part of the default installation but does not include MYSQL If you are not familiar with using "Terminal" on the Macintosh (or bash on Linux), you may wish to have someone assist with the installation.

MySQL Instalation

Download mysql-5.1.48-osx10.6-x86_64.dmg from :http://dev.mysql.com/downloads/mysql/

Open mysql-5.1.48-osx10.6-x86_64.pkg

Use the default settings

Open MYSQL.prefPane

Use the default setting.

Open MYSQL in "System Preferences" and start the MYSQL server. If you would like it to automatically start each time you boot the system, choose "start on boot" option.


Configure WebServer (apache2)

Set up PHP

Open the Terminal application in the Utilities folder


sudo vi /etc/apache2/httpd.conf Find the line "LoadModule php5_module libexec/apache2/libphp5.so"

remove the "#" from the beginning of the line

s/^#//

Save the file

ZZ


Add the following to apache setup

sudo vi /etc/apache2/other/openemr.conf

i

<Directory /Library/WebServer/Documents/openemr/documents>

order deny,allow

Deny from all

</Directory>

<Directory /Library/WebServer/Documents/openemr/openemr/edi>

order deny,allow

Deny from all

</Directory>

<Directory /Library/WebServer/Documents/openemr/era>

order deny,allow

Deny from all

</Directory>

ZZ


Turn on Apache2 (Webserver)

In the System Preferences panel click Sharing and then turn on the checkbox for Web Sharing

Verify Apache2 (web sharing) is running by clicking on the IP address shown for your personal website and the computer's website.


Installing OpenEMR

Extracting the Tarball

1. First, Download OpenEMR from sourceforge:

http://downloads.sourceforge.net/openemr/openemr-3.1.0.tar.gz (MD5 sum: cd0131762e3e2cee4a7eb04689267467)

Start a Terminal Session and change directory (cd) the the Download folder.

2. Next, Extract the downloaded archive:

tar -pxvzf openemr-3.1.0.tar.gz


3. Move the extracted openemr-3.1.0 directory to your webserver root directory, and then go to this directory.

sudo mv openemr-3.1.0 /Library/WebServer/Documents/openemr
cd /Library/WebServer/Documents

Cleaning up FileSystem Permissions

1. Modify file permissions (this should be done as root user):

sudo chmod 666 openemr/library/sqlconf.php
sudo chmod 666 openemr/interface/globals.php


2. Modify directory permissions. We need to make the following directories writable by the webserver username.

sudo chown -R _www:_www openemr/documents
sudo chown -R _www:_www openemr/edi
sudo chown -R _www:_www openemr/era
sudo chown -R _www:_www openemr/custom/letter_templates
sudo chown -R _www:_www openemr/library/freeb
sudo chown -R _www:_www openemr/gacl/admin/templates_c
sudo chown -R _www:_www openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
sudo chown -R _www:_www openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled

Configuring the Install through the WEB GUI

1. Open up web-browser and point it to the installation script at http://localhost/openemr/setup.php .

The first screen gives some general instructions and ensures file and directory permissions are set up correctly. It should tell you all your file system permissions are good, and have a 'Continue' button on the bottom of the form. If it does, Click the 'Continue' button. Otherwise, If there are errors on this screen, then follow instructions to fix. (screenshot below)

Linux-Install-V3 1-1.jpg


2. The next page is 'OpenEMR Setup' 'Step 1', which asks whether setup should create the database.

Leave the setting set to 'Have setup create the database', and click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-2.jpg


3. The next page is 'OpenEMR Setup' 'Step 2'. It has a list of options used to setup the database, along with OpenEMR user and OpenEMR path information.

Most users will just need to enter a Password for the OpenEMR user. Some users may have to enter the password of the 'root' user in the mysql server. (screenshot below)

Linux-Install-V3 1-3.jpg


4. The next page is 'OpenEMR Setup' 'Step 3'. On this page you should see logs of OpenEMR connecting and creating the database.

At the bottom of the page, it should read 'Next step will install and configure access controls (php-GACL).' Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-4.jpg


5. The next page is 'OpenEMR Setup' 'Step 4'. On this page, OpenEMR configures access controls (php-GACL).

You should see logs of OpenEMR installing and configuring php-GACL. you should see 'Success!' in green lettering four times. At the bottom of the page, it should read 'Next step will configure PHP.'. Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-5.jpg


6. The next page is 'OpenEMR Setup' 'Step 5'. On this page is displayed recommendations of how to configure your php.ini config file.

Read and follow the instructions carefully. At the bottom of the page, it should read "Next step will configure Apache web server.". We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-6.jpg


7. The next page is 'OpenEMR Setup' 'Step 6'. On this page is displayed recommendations and warnings regarding directories Apache should NOT allow the outside world to see, as these directories contain Protected Health Information.

Read and follow the instructions carefully. We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-7.jpg


8. The next page is 'OpenEMR Setup'. This is the final configuration page.

This final installation screen gives additional instructions. This information is personalized for your setup, so we suggest you print this screen for future reference. At the bottom of the page is your OpenEMR username and password, along with a link to OpenEMR. (screenshot below)

Linux-Install-V3 1-8.jpg


OpenEMR after installation: (screenshot below)

Linux-Install-V3 1-9.jpg


Post-install FileSystem Permission Cleanups

1. After installation is finished, then secure files (this should be done as root user):

chmod 644 openemr/library/sqlconf.php
chmod 644 openemr/interface/globals.php
chmod 600 openemr/acl_setup.php
chmod 600 openemr/acl_upgrade.php
chmod 600 openemr/sl_convert.php
chmod 600 openemr/setup.php
chmod 600 openemr/sql_upgrade.php
chmod 600 openemr/gacl/setup.php

Installing OpenEMR

Extracting the Tarball

1. First, Download OpenEMR from sourceforge:

http://downloads.sourceforge.net/openemr/openemr-3.1.0.tar.gz (MD5 sum: cd0131762e3e2cee4a7eb04689267467)

Start a Terminal Session and change directory (cd) the the Download folder.

2. Next, Extract the downloaded archive:

tar -pxvzf openemr-3.1.0.tar.gz


3. Move the extracted openemr-3.1.0 directory to your webserver root directory, and then go to this directory.

mv openemr-3.1.0 /Library/WebServer/Documents/openemr
cd /Library/WebServer/Documents


Cleaning up FileSystem Permissions

1. Modify file permissions (this should be done as root user):

chmod 666 openemr/library/sqlconf.php
chmod 666 openemr/interface/globals.php


2. Modify directory permissions. We need to make the following directories writable by the webserver username.

chown -R _www:_www openemr/documents
chown -R _www:_www openemr/edi
chown -R _www:_www openemr/era
chown -R _www:_www openemr/custom/letter_templates
chown -R _www:_www openemr/library/freeb
chown -R _www:_www openemr/gacl/admin/templates_c
chown -R _www:_www openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
chown -R _www:_www openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled


Configuring the Install through the WEB GUI

1. Open up web-browser and point it to the installation script at http://localhost/openemr/setup.php .

The first screen gives some general instructions and ensures file and directory permissions are set up correctly. It should tell you all your file system permissions are good, and have a 'Continue' button on the bottom of the form. If it does, Click the 'Continue' button. Otherwise, If there are errors on this screen, then follow instructions to fix. (screenshot below)

Linux-Install-V3 1-1.jpg


2. The next page is 'OpenEMR Setup' 'Step 1', which asks whether setup should create the database.

Leave the setting set to 'Have setup create the database', and click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-2.jpg


3. The next page is 'OpenEMR Setup' 'Step 2'. It has a list of options used to setup the database, along with OpenEMR user and OpenEMR path information.

Most users will just need to enter a Password for the OpenEMR user. Some users may have to enter the password of the 'root' user in the mysql server. (screenshot below)

Linux-Install-V3 1-3.jpg


4. The next page is 'OpenEMR Setup' 'Step 3'. On this page you should see logs of OpenEMR connecting and creating the database.

At the bottom of the page, it should read 'Next step will install and configure access controls (php-GACL).' Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-4.jpg


5. The next page is 'OpenEMR Setup' 'Step 4'. On this page, OpenEMR configures access controls (php-GACL).

You should see logs of OpenEMR installing and configuring php-GACL. you should see 'Success!' in green lettering four times. At the bottom of the page, it should read 'Next step will configure PHP.'. Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-5.jpg


6. The next page is 'OpenEMR Setup' 'Step 5'. On this page is displayed recommendations of how to configure your php.ini config file.

Read and follow the instructions carefully. At the bottom of the page, it should read "Next step will configure Apache web server.". We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-6.jpg


7. The next page is 'OpenEMR Setup' 'Step 6'. On this page is displayed recommendations and warnings regarding directories Apache should NOT allow the outside world to see, as these directories contain Protected Health Information.

Read and follow the instructions carefully. We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)

Linux-Install-V3 1-7.jpg


8. The next page is 'OpenEMR Setup'. This is the final configuration page.

This final installation screen gives additional instructions. This information is personalized for your setup, so we suggest you print this screen for future reference. At the bottom of the page is your OpenEMR username and password, along with a link to OpenEMR. (screenshot below)

Linux-Install-V3 1-8.jpg


OpenEMR after installation: (screenshot below)

Linux-Install-V3 1-9.jpg


Post-install FileSystem Permission Cleanups

1. After installation is finished, then secure files (this should be done as root user):

chmod 644 openemr/library/sqlconf.php
chmod 644 openemr/interface/globals.php
chmod 600 openemr/acl_setup.php
chmod 600 openemr/acl_upgrade.php
chmod 600 openemr/sl_convert.php
chmod 600 openemr/setup.php
chmod 600 openemr/sql_upgrade.php
chmod 600 openemr/gacl/setup.php