Skip to content

Commit 87fa429

Browse files
author
Michael Bond
committed
initial vagrant setup
1 parent 0deedda commit 87fa429

6 files changed

Lines changed: 2179 additions & 0 deletions

File tree

VagrantFile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5+
VAGRANTFILE_API_VERSION = "2"
6+
7+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8+
9+
# Every Vagrant virtual environment requires a box to build off of.
10+
config.vm.box = "centos6.4"
11+
12+
# The url from where the 'config.vm.box' box will be fetched if it
13+
# doesn't already exist on the user's system.
14+
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v0.1.0/centos64-x86_64-20131030.box"
15+
16+
config.vm.network :forwarded_port, guest: 80, host: 8080
17+
18+
19+
config.vm.provision "shell", path: "bootstrap.sh"
20+
21+
end

bootstrap.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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

Comments
 (0)