1+ #! /bin/bash
2+
3+ # Base PRE Setup
4+
5+ GITDIR=" /tmp/git"
6+ ENGINEAPIHOME=" /home/engineAPI"
7+
8+ SERVERURL=" /home/engineAPI"
9+ DOCUMENTROOT=" public_html"
10+
11+ yum -y install httpd httpd-devel httpd-manual httpd-tools
12+ yum -y install mysql-connector-java mysql-connector-odbc mysql-devel mysql-lib mysql-server
13+ yum -y install mod_auth_kerb mod_auth_mysql mod_authz_ldap mod_evasive mod_perl mod_security mod_ssl mod_wsgi
14+ yum -y install php php-bcmath php-cli php-common php-gd php-ldap php-mbstring php-mcrypt php-mysql php-odbc php-pdo php-pear php-pear-Benchmark php-pecl-apc php-pecl-imagick php-pecl-memcache php-soap php-xml php-xmlrpc
15+ yum -y install emacs emacs-common emacs-nox
16+ yum -y install git
17+
18+ mv /etc/httpd/conf.d/mod_security.conf /etc/httpd/conf.d/mod_security.conf.bak
19+ /etc/init.d/httpd start
20+
21+ mkdir -p $GITDIR
22+ cd $GITDIR
23+ git clone https://github.com/wvulibraries/engineAPITemplates.git
24+ git clone https://github.com/wvulibraries/engineAPI-Modules.git
25+
26+ mkdir -p $SERVERURL /phpincludes/
27+ ln -s /vagrant/engine/ $SERVERURL /phpincludes/
28+
29+ # Application Specific
30+
31+ ln -s /vagrant/public_html $SERVERURL /$DOCUMENTROOT
32+ ln -s $SERVERURL /phpincludes/engine/engineAPI/latest $SERVERURL /phpincludes/engine/engineAPI/4.0
33+
34+ rm -f /etc/php.ini
35+ rm -f /etc/httpd/conf/httpd.conf
36+
37+ ln -s /vagrant/serverConfiguration/php.ini /etc/php.ini
38+ ln -s /vagrant/serverConfiguration/vagrant_httpd.conf /etc/httpd/conf/httpd.conf
39+
40+ ln -s /tmp/git/engineAPI/engine/template/distribution/public_html/js $SERVERURL /$DOCUMENTROOT /javascript/distribution
41+
42+ mkdir -p /vagrant/serverConfiguration/serverlogs
43+ touch /vagrant/serverConfiguration/serverlogs/error_log
44+ /etc/init.d/httpd restart
45+
46+ # Base Post Setup
47+
48+ # # Setup the EngineAPI Database
49+
50+ /etc/init.d/mysqld start
51+ mysql -u root < /vagrant/sql/vagrantSetup.sql
52+ mysql -u root EngineAPI < /vagrant/sql/EngineAPI.sql
0 commit comments