Created
November 9, 2016 19:29
-
-
Save noinarisak/0a0c5edd64bdc4c29312b28b7034393d to your computer and use it in GitHub Desktop.
Vagrantfile + Tomcat/Maven/Java6/CVS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# TOMCAT_FILENAME=apache-tomcat-6.0.47.tar.gz | |
TOMCAT_FILENAME=apache-tomcat-6.0.47 | |
TOMCAT_FILENAME_DOWNLOAD=$TOMCAT_FILENAME.tar.gz | |
TOMCAT=http://mirror.symnds.com/software/Apache/tomcat/tomcat-6/v6.0.47/bin/$TOMCAT_FILENAME_DOWNLOAD | |
# MAVEN_FILENAME=apache-maven-3.3.9-bin.tar.gz | |
MAVEN_FILENAME=apache-maven-3.3.9 | |
MAVEN_FILENAME_DOWNLOAD=$MAVEN_FILENAME-bin.tar.gz | |
MAVEN=http://apache.claz.org/maven/maven-3/3.3.9/binaries/$MAVEN_FILENAME_DOWNLOAD | |
sudo yum -y install java-1.7.0-openjdk-devel ant ant-apache-regexp cvs | |
# Setup Tomcat | |
curl -O $TOMCAT | |
tar -xzvf $TOMCAT_FILENAME_DOWNLOAD | |
sudo mv $TOMCAT_FILENAME /usr/local/tomcat6 | |
# Setup Maven | |
curl -O $MAVEN | |
tar -xzvf $MAVEN_FILENAME_DOWNLOAD | |
sudo mv $MAVEN_FILENAME /usr/local/ | |
# Setup the cvs | |
echo "export CVS_RSH=ssh" >> /home/vagrant/.bashrc | |
echo "export CVSROOT=:ext:nnt446@idmdev1a.ci.northwestern.edu:/var/cvsroot" >> /home/vagrant/.bashrc | |
# Setup Java and Maven | |
# echo "export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64" >> /home/vagrant/.bashrc | |
echo "export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64" >> /home/vagrant/.bashrc | |
echo "export M2_HOME=/usr/local/apache-maven-3.3.9" >> /home/vagrant/.bashrc | |
echo "PATH=\$PATH:/usr/lib/jvm/java-1.6.0-openjdk.x86_64:\${M2_HOME}/bin" >> /home/vagrant/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/6" | |
config.vm.provision :shell, path: "bootstrap.sh" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder "src/", "/src", type:"rsync", rsync__exclude: ".git/" | |
config.vm.provider "virtualbox" do |vb| | |
# Display the VirtualBox GUI when booting the machine | |
# vb.gui = true | |
# Customize the amount of memory on the VM: | |
vb.memory = "1024" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment