Last active
August 29, 2015 14:00
-
-
Save modius/4af8ac94cfe153336e34 to your computer and use it in GitHub Desktop.
Sh for unattended installation of Railo on through vagrant.
This file contains hidden or 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 | |
RAILO_INSTALLER="www.getrailo.org/down.cfm?item=/railo/remote/download/4.1.1.009/tomcat/linux/railo-4.1.1.009-pl0-linux-x64-installer.run" | |
apt-get update | |
touch apt-updated | |
apt-get install -y git | |
apt-get install -y curl | |
apt-get install -y apache2 | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password password railoadmin' | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password railoadmin' | |
apt-get -y install mysql-server | |
# get railo installer | |
if [[ -s "railo.run" ]] ; then | |
echo "Using local Railo installer ..." | |
else | |
echo "Downloading Railo installer ..." | |
wget -q $RAILO_INSTALLER -O railo.run | |
chmod 744 /home/vagrant/railo.run | |
fi | |
if [[ -s "railo-installed" ]] ; then | |
echo "Railo already installed." | |
else | |
echo "Installing Railo ..." | |
/home/vagrant/railo.run \ | |
--debuglevel 1 \ | |
--mode unattended \ | |
--prefix /opt/railo \ | |
--railopass railoadmin \ | |
--tomcatport 8888 \ | |
--installconn true \ | |
--apachecontrolloc /usr/sbin/apachectl \ | |
--apachemodulesloc /usr/lib/apache2/modules \ | |
--apachelogloc /var/log/apache2 \ | |
--installiis false \ | |
--bittype 64 | |
touch railo-installed | |
fi | |
# link apache webroot to railo webapp root | |
rm -rf /var/www | |
ln -fs /opt/railo/tomcat/webapps/ROOT /var/www | |
This file contains hidden or 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 : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# grab default ubuntu 64 | |
config.vm.box = "hashicorp/precise64" | |
# sync folders | |
config.vm.synced_folder ".", "/vagrant" | |
config.vm.synced_folder "webapp", "/opt/railo/tomcat/webapps/ROOT/" | |
# provision from shell; inline script | |
config.vm.provision :shell, :path => "provision.sh" | |
# fwd apache | |
config.vm.network :forwarded_port, host: 8080, guest: 80 | |
# fwd tomcat/railo | |
config.vm.network :forwarded_port, host: 8888, guest: 8888 | |
# turn these on if file sync is slow | |
#config.vm.network "private_network", ip: "192.168.88.88" | |
#config.vm.synced_folder ".", "/vagrant", type: "nfs" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment