Contributors | ||||||
---|---|---|---|---|---|---|
|
(Initial Draft contributed by UC Irvine)
Set up Vagrant
Init
vagrant init centos/7
Config private network
config.vm.network "private_network", ip: "192.xxx.xx.xx"
Config memory and cpus
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 2
end
Add synced folder
mkdir data
config.vm.synced_folder "data/", "/vagrant_data"
Install Vagrant-vbguest
vagrant plugin install vagrantvbguest
vagrant vbguest
Reload
vagrant reload
Installation for SPARCRequest
Reference
https://github.com/sparc-request/sparc-request/blob/master/doc/easy_installation.pdf
Update Yum
sudo yum update
Install Httpd
sudo yum install y httpd
sudo yum install y httpd-devel
Install and run MySQL
sudo yum install y wget cd /opt
sudo wget http://repo.mysql.com/mysqlcommunityreleaseel75.noarch.rpm
...
sudo systemctl status mysqld
Temporarily give root permission to be connected remotely
mysql u root
GRANT ALL ON . TO 'root';
\q
Install Ruby
I installed ruby 2.4.2p198
Based on my conversation with the SPARCRequest team, I don't think it has to be 1.9.3
sudo yum install y gitcore zlib zlibdevel gccc++ patch readline readlinedevel libyamldevel libffidevel openssldevel make bzip2 autoconf automake libtool bison curl sqlitedevel vim
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
git clone https://github.com/rbenv/rubybuild.git ~/.rbenv/plugins/rubybuild echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init )"' >> ~/.bash_profile source ~/.bash_profile
rbenv install v 2.4.2
rbenv global 2.4.2
ruby -v
Install Rails
gem install rails
Configure based on multi_institutional_documentation
{+}https://github.com/sparcrequest/sparcrequest/blob/master/doc/multi_institutional_documentatio+ n.md
I didn't do this, so the email function and single signon functions haven't been set up yet
Install bundle
gem install bundler --no-rdoc --no-ri
Install capybara-webkit 1.14.0
sudo yum install -y epel-release
sudo yum install -y qt5-qtwebkit-devel
QMAKE=/usr/lib64/qt5/bin/qmake gem install capybarawebkit v 1.14.0 (The default is >= 1.15.0)
echo 'export PATH="/usr/lib64/qt5/bin:$PATH"' >> ~/.bash_profile
Install curl-devel
sudo yum install -y curl-devel
Install curb 0.9.4
gem install curb -v '0.9.4'
Install mysql-devel
sudo yum install -y mysql-devel
Install mysql2 0.4.10
gem install mysql2 -v '0.4.10'
Mkdir /var/www/rails
sudo mkdir /var/www/rails
cd /var/www/rails
Chown permission on /var/www/rails
sudo chown vagrant:vagrant -R /var/www/rails
Git Clone SPARC Request Repository
cd /var/www/rails
git clone https://github.com/sparc-request/sparc-request
Check out v3.3.0
cd sparc-request/
git checkout tags/release-3.3.0 -b uci-local-test
Setup config/database.yml
cd sparc-request
cp config/database.yml.example config/database.yml
Set the env to be development
RAILS_ENV="development" bundle install
...
RAILS_ENV="development" rake db:migrate
Install Phusion Passenger
gem install passenger
NOTE:Need to install Passenger in a different location that can only be modified by root
Disable selinux
https://linuxhint.com/how-to-disable-selinux-on-centos-7/
Install the Passenger Apache Module
passenger-install-apache2-module
Press enter
Press enter
Ctrl-c
chmod o+x ~
...
sudo systemctl restart httpd
Create a virtual host entry for the application
http://seagullproject.org/Installation/SettingUpApacheVirtualHosts.html
This is not working with SPARCRequest (port is taken error), which needs to be fixed later
<VirtualHost *:80> ServerNamelocalhost
DocumentRoot/var/www/rails/sparcrequest/public
<Directory /var/www/rails/sparcrequest/public> Options FollowSymLinks MultiViews AllowOverride all
Allow from all
</Directory>
</VirtualHost>
sudo systemctl restart httpd
Depending on your settings you may need to chmod the application directory ( I had to chmod R 777 the directory to get write permissions for log and cache files to work with apache)
Initial Invoke for SPARCRequest
Create the initial institution and user
cd /var/www/rails/sparcrequest/
...
Or: cd /var/www/rails/sparcrequest/
RAILS_ENV="development" rails console
initial_cm_creation
Fix the error URL
Import the missing values (not in the reference)
cd /var/www/rails/sparcrequest/
cd lib/tasks/
rake import_permissible_values
Update navbar_links
Set up Super User
SPARCRequest (v3.
...
12.
...
1) and SPARCFulfillment (
...
v3.
...
5.
...