This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Installation Instructions (CentOS 7.1.1503)
Andre Quina edited this page Dec 16, 2015
·
9 revisions
Installation instructions for CentOS 7.1.1503
sudo yum update
sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
Install nano, skip if you use another editor... you'll need to change the editing commands below
sudo yum install -y nano
sudo yum install -y httpd
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --reload
sudo systemctl start httpd
sudo systemctl enable httpd
sudo yum install -y git
sudo nano /etc/yum.repos.d/MongoDB.repo
enter the contents:
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
start mongo
sudo yum install -y mongodb-org
sudo chkconfig mongod on
sudo service mongod start
sudo curl -sL https://rpm.nodesource.com/setup | sudo bash -
sudo yum install -y nodejs
sudo -E npm install -g bower
sudo yum install -y epel-release pygpgme curl
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
sudo yum install -y mod_passenger
sudo yum install -y ruby-devel
sudo useradd -m crucible
sudo passwd crucible
sudo su crucible
cd
gem install bundler
echo 'export PATH=${PATH}:${HOME}/bin' >> .bashrc
source .bashrc
git clone https://github.com/fhir-crucible/crucible.git
cd crucible
bundle install --deployment
bower install
bundle exec rake assets:precompile RAILS_ENV=production
bundle exec rake secret RAILS_ENV=production
# enter secret from previous command
nano config/secrets.yml
# exit from crucible user
exit
sudo nano /etc/httpd/conf.d/crucible.conf
Enter the following contents
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/crucible/public
<Directory /var/www/crucible/public>
Order allow,deny
Allow from all
Options -MultiViews
# Compress css and js
AddOutputFilterByType DEFLATE text/css application/x-javascript application/javascript text/javascript application/json
</Directory>
</VirtualHost>
sudo nano /etc/httpd/conf.d/passenger.conf
add the following lines under PassengerRuby line
PassengerDefaultUser crucible
PassengerDefaultGroup crucible
sudo mv /home/crucible/crucible /var/www
sudo nano /etc/init.d/delayed_job
Enter the following contents
#!/bin/bash
#
# delayed job
#
# chkconfig: - 99 15
# description: start, stop, restart God (bet you feel powerful)
#
RETVAL=0
case "$1" in
start)
cd /var/www/crucible
su crucible -c 'RAILS_ENV=production bin/delayed_job -n3 start'
RETVAL=$?
;;
stop)
cd /var/www/crucible
su crucible -c 'RAILS_ENV=production bin/delayed_job stop'
RETVAL=$?
;;
restart)
cd /var/www/crucible
su crucible -c 'RAILS_ENV=production bin/delayed_job restart'
RETVAL=$?
;;
status)
cd /var/www/crucible
su crucible -c 'RAILS_ENV=production bin/delayed_job status'
RETVAL=$?
;;
*)
echo "Usage: delayed-job {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL
Start delayed job
sudo chmod a+x /etc/init.d/delayed-job
sudo chkconfig --level 345 delayed-job on
sudo /etc/init.d/delayed-job start
note the time from the following
date
Create a policy file with the following
sudo yum install -y policycoreutils-python
sudo setenforce 0
sudo systemctl restart httpd
# open the site on port 80 in a browser
# enter a url to a FHIR server in the input box at the top
# i.e, https://sqlonfhir-dstu2.azurewebsites.net/fhir
# click begin
# when the tests load (may take a minute), select read test and click execute
# when execution completes:
sudo su
cd
ausearch -ts <NOTED DATE ABOVE: i.e., 10:30:00> | audit2allow -M crucible
semodule -i crucible.pp
sudo setenforce 1
sudo systemctl restart httpd
The end.