/Wildfly 9.0 startup scripts for Debian 8.2 (systemd) inspired by files from wildfly 10 distribution
Last active
November 3, 2015 12:30
-
-
Save jenslohmann/d083f5172da6071cbc75 to your computer and use it in GitHub Desktop.
Wildfly 9.0 startup scripts for Debian 8.2 (systemd) inspired by files from wildfly 10 distribution
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
[Unit] | |
Description=The WildFly Application Server | |
After=syslog.target network.target | |
Before=httpd.service | |
[Service] | |
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1 | |
EnvironmentFile=-/etc/wildfly/wildfly.conf | |
User=wildfly | |
LimitNOFILE=102642 | |
PIDFile=/var/run/wildfly/wildfly.pid | |
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_MANAGEMENTBIND | |
StandardOutput=null | |
[Install] | |
WantedBy=multi-user.target |
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
# The configuration you want to run | |
WILDFLY_CONFIG=standalone-full.xml | |
# The mode you want to run | |
WILDFLY_MODE=standalone | |
# The address to bind to | |
WILDFLY_BIND=127.0.0.1 | |
WILDFLY_MANAGEMENTBIND=0.0.0.0 | |
# Be sure to set the proper JAVA_HOME | |
JAVA_HOME=/opt/jdk |
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
#!/bin/sh | |
if [ "x$WILDFLY_HOME" = "x" ]; then | |
WILDFLY_HOME="/opt/wildfly" | |
fi | |
if [[ "$1" == "domain" ]]; then | |
$WILDFLY_HOME/bin/domain.sh --server-config=$2 -b=$3 -bmanagement=$4 | |
else | |
$WILDFLY_HOME/bin/standalone.sh --server-config=$2 -b=$3 -bmanagement=$4 | |
fi |
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
groupadd -r wildfly | |
useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly | |
== Install WildFly | |
tar xvzf wildfly-9.0.1.Final.tar.gz -C /opt | |
ln -s /opt/wildfly-9.0.1.Final /opt/wildfly | |
chown -R wildfly:wildfly /opt/wildfly | |
== Configure systemd | |
mkdir /etc/wildfly | |
mkdir /var/run/wildfly | |
# Create the files below | |
chmod +x /opt/wildfly/bin/launch.sh | |
== Start and enable | |
systemctl start wildfly.service | |
systemctl enable wildfly.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment