Skip to content

Instantly share code, notes, and snippets.

@ogregoire
Created February 26, 2016 15:25
Show Gist options
  • Save ogregoire/6098410801f00ecfd2a4 to your computer and use it in GitHub Desktop.
Save ogregoire/6098410801f00ecfd2a4 to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
wget http://download.jboss.org/wildfly/10.0.0.Final/wildfly-10.0.0.Final.tar.gz
sudo tar -zxf wildfly-10.0.0.Final.tar.gz -C /opt/
sudo ln -s /opt/wildfly-10.0.0.Final /opt/wildfly
sudo cp /opt/wildfly/bin/init.d/wildfly.conf /etc/default/wildfly
# Edit /etc/default/wildfly
sudo cp /opt/wildfly/bin/init.d/wildfly-init-debian.sh /etc/init.d/wildfly
sudo chown root:root /etc/init.d/wildfly
sudo chmod +X /etc/init.d/wildfly
sudo update-rc.d wildfly defaults
sudo update-rc.d wildfly enable
sudo mkdir -p /var/log/wildfly
sudo useradd --system --shell /bin/false wildfly
sudo chown -R wildfly:wildfly /opt/wildfly-9.0.2.Final/
sudo chown -R wildfly:wildfly /opt/wildfly
sudo chown -R wildfly:wildfly /var/log/wildfly
sudo service wildfly start
## Location of JDK
JAVA_HOME="/usr/lib/jvm/java-8-oracle"
## Location of WildFly
JBOSS_HOME="/opt/wildfly"
## The username who should own the process.
JBOSS_USER=wildfly
## The mode WildFly should start, standalone or domain
JBOSS_MODE=standalone
## Configuration for standalone mode
JBOSS_CONFIG=standalone.xml
## Configuration for domain mode
# JBOSS_DOMAIN_CONFIG=domain.xml
# JBOSS_HOST_CONFIG=host-master.xml
## The amount of time to wait for startup
STARTUP_WAIT=60
## The amount of time to wait for shutdown
SHUTDOWN_WAIT=60
## Location to keep the console log
JBOSS_CONSOLE_LOG="/var/log/wildfly/console.log"
## Additionals args to include in startup
# JBOSS_OPTS="--admin-only -b 172.0.0.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment