Created
December 14, 2011 11:13
-
-
Save carlhoerberg/1476172 to your computer and use it in GitHub Desktop.
Bootstrap a torquebox server
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
#.... | |
export TORQUEBOX_HOME=/opt/torquebox-current | |
export JBOSS_HOME=$TORQUEBOX_HOME/jboss | |
export JRUBY_HOME=$TORQUEBOX_HOME/jruby | |
export PATH=$JRUBY_HOME/bin:$PATH | |
export JRUBY_OPTS='--1.9 -J-Xmx64m' | |
export JAVA_OPTS='-Xmx256m -Xms32m' |
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
description "This is an upstart job file for apache mod_cluster" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
exec /opt/jboss/httpd/sbin/httpd.prefork -D FOREGROUND | |
# prefork uses a lot less memory than worker (50mb vs 500mb) |
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
apt-get update | |
apt-get upgrade | |
apt-get install openjdk-6-jre-headless | |
apt-get install wget | |
useradd -m torquebox | |
wget http://torquebox.org/release/org/torquebox/torquebox-dist/2.0.0.beta1/torquebox-dist-2.0.0.beta1-bin.zip | |
unzip torquebox-dist-2.0.0.beta1-bin.zip | |
mv torquebox-dist-2.0.0.beta1 /opt | |
chown -R torquebox:torquebox torquebox-dist-2.0.0.beta1 | |
ln -s /opt/torquebox-current/ /opt/torquebox-dist-2.0.0.beta1 | |
wget http://downloads.jboss.org/mod_cluster//1.1.3.Final/mod_cluster-1.1.3.Final-linux2-x86-ssl.tar.gz | |
tar zxvf http://downloads.jboss.org/mod_cluster//1.1.3.Final/mod_cluster-1.1.3.Final-linux2-x86-ssl.tar.gz | |
mv opt/jboss /opt |
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
description "This is an upstart job file for torquebox" | |
pre-start script | |
bash << "EOF" | |
mkdir -p /var/log/torquebox | |
chown -R torquebox /var/log/torquebox | |
EOF | |
end script | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
exec su - torquebox -c '/opt/torquebox-current/jboss/bin/standalone.sh --server-config=standalone-ha.xml >> /var/log/torquebox/torquebox.log 2>&1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for sharing. I would like ask you how can I add upstart job for torquebox.conf?