groupadd -r wildfly
useradd -r -g wildfly -s /bin/false -d /nonexistent wildfly
usermod -s /bin/bash -d /home/wildfly wildfly
wget http://download.jboss.org/wildfly/9.0.2.Final/wildfly-9.0.2.Final.tar.gz
tar xvzf wildfly-9.0.2.Final.tar.gz
cp -rp wildfly-9.0.2.Final /var/service/wildfly
chown -R wildfly:wildfly /var/service/wildfly
mkdir /var/service/wildfly/logs
chown -R wildfly:wildfly /var/service/wildfly/logs
mkdir /var/run/wildfly
chown -R wildfly:wildfly /var/run/wildfly
cp -p /var/service/wildfly/bin/init.d/wildfly.conf /etc/default/wildfly.conf
Uncomment and fine-tune
wildfly.conf
# General configC34:C67the init.d scripts,
# not necessarily for JBoss AS itself.
# default location: /etc/default/wildfly
## Location of JDK
JAVA_HOME="/usr/bin/java"
## Location of WildFly
JBOSS_HOME="/var/service/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/service/wildfly/logs/console.log"
## Additionals args to include in startup
JBOSS_OPTS="-b 0.0.0.0"
cp /var/service/wildfly/bin/init.d/wildfly-init-redhat.sh /etc/init.d/wildfly
service wildfly start
service wildfly stop
Set a user name and password.
/var/service/wildfly/bin/add-user.sh
/var/service/wildfly/bin/jboss-cli.sh
--Deploy deploy test.war
--Overwrite deploy test.war --force
--name specification deploy test.war --name=test.war
Recommended Posts