jesdynf wrote on Saturday, November 26, 2016:
Hello,
I had a little more trouble setting OpenEMR up than I thought I should’ve – it was my first PHP project, and it wasn’t immediately obvious to me that I’d failed to install certain PHP modules. (And the grief I got from my VirtualBox CentOS hiding MySQL under MariaDB is a little embarassing, too, but that was local and not AWS.)
Attached you can find a full, tested, perfect “script” for installing OpenEMR 4.2.2 on the current release of Amazon Linux. I’d attach it to the wiki but I don’t have an account.
Hope it’s useful!
# pseudo-script for OpenEMR install on Amazon Linux
# some bits are interactive, sorry
sudo bash
cd
yum update -y
yum install httpd24 mysql-server php70 php70-mysqlnd php70-mbstring -y
wget -O openemr-4.2.2.tar.gz http://sourceforge.net/projects/openemr/files/OpenEMR%20Current/4.2.2/openemr-4.2.2.tar.gz/download
tar -pzxvf openemr-4.2.2.tar.gz
chown -R root:root openemr-4.2.2
mv openemr-4.2.2 /var/www/html/openemr
service mysqld start
chkconfig --level 2345 mysqld on
# interactive steps
mysql_secure_installation
# root password is blank, set a new root password, delete temp DBs and anonymous users, reload tables
nano /etc/php.ini
# add "register_globals = Off"
# change max_execution_time to 60 (from 30)
# change max_input_time to 90 (from 60)
# change post_max_size to 30M (from 8M)
nano /etc/httpd/conf.d/openemr.conf
# --- add the following section
<Directory "/var/www/html/openemr">
AllowOverride FileInfo
</Directory>
<Directory "/var/www/html/openemr/sites">
AllowOverride None
</Directory>
<Directory "/var/www/html/openemr/sites/*/documents">
order deny,allow
Deny from all
</Directory>
<Directory "/var/www/html/openemr/sites/*/edi">
order deny,allow
Deny from all
</Directory>
<Directory "/var/www/html/openemr/sites/*/era">
order deny,allow
Deny from all
</Directory>
# section ends ---
service httpd start
chkconfig --level 2345 httpd on
# begin setup process, browse to http://[remoteip]/openemr
# step 1, continue
# step 2, allow setup to create DB
# step 2 continued, fill in all empty blanks
# "Password": password for MySQL user OpenEMR /is about to create/ for its own use
# "Root pass": MySQL root user password you set during mysql_secure_installation step
# "Initial User Password": Master OpenEMR administrative password, can change later
# step 3, continue
# step 4, continue
# step 5, continue
# step 6, continue
# you may follow link and log in, username "admin", password your initial user password
# post-install cleanup
cd /var/www/html
chmod 644 openemr/library/sqlconf.php
chmod 600 openemr/acl_setup.php
chmod 600 openemr/acl_upgrade.php
# docs say it should be there but it isn't?
#chmod 600 openemr/sl_convert.php
chmod 600 openemr/setup.php
chmod 600 openemr/sql_upgrade.php
chmod 600 openemr/gacl/setup.php
chmod 600 openemr/ippf_upgrade.php