-
-
Save VadymKo/be2ac9c891df481328b2a4160429b46a to your computer and use it in GitHub Desktop.
Revisions
-
sukharevd revised this gist
Jun 24, 2016 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,14 @@ #description :The script to install Wildfly 10.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :2016-06-18T02:45-0700 #usage :/bin/bash wildfly-install.sh #tested-version1 :10.0.0.CR3 #tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22 #tested-version2 :10.0.0.Final #tested-distros2 :Debian 8 WILDFLY_VERSION=10.0.0.Final WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME -
sukharevd revised this gist
Oct 30, 2015 . No changes.There are no files selected for viewing
-
sukharevd revised this gist
Oct 30, 2015 . 1 changed file with 67 additions and 21 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,14 @@ #!/bin/bash #title :wildfly-install.sh #description :The script to install Wildfly 10.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :2015-10-24T17:14-0700 #usage :/bin/bash wildfly-install.sh #tested-version :10.0.0.CR3 #tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22 WILDFLY_VERSION=10.0.0.CR4 WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME @@ -17,6 +19,7 @@ WILDFLY_DIR=$INSTALL_DIR/wildfly WILDFLY_USER="wildfly" WILDFLY_SERVICE="wildfly" WILDFLY_MODE="standalone" WILDFLY_STARTUP_TIMEOUT=240 WILDFLY_SHUTDOWN_TIMEOUT=30 @@ -52,22 +55,61 @@ useradd -s /sbin/nologin $WILDFLY_USER chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR/ #mkdir -p /var/log/$WILDFLY_SERVICE echo "Registrating Wildfly as service..." # if should use systemd if [ -x /bin/systemctl ]; then # Script from $WILDFLY_DIR/docs/contrib/scripts/systemd/launch.sh didn't work for me cat > $WILDFLY_DIR/bin/launch.sh << "EOF" #!/bin/sh if [ "x$WILDFLY_HOME" = "x" ]; then WILDFLY_HOME="/opt/wildfly" fi if [ "x$1" = "xdomain" ]; then echo 'Starting Wildfly in domain mode.' $WILDFLY_HOME/bin/domain.sh -c $2 -b $3 #>> /var/log/$WILDFLY_SERVICE/server-`date +%Y-%m-%d`.log else echo 'Starting Wildfly in standalone mode.' $WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 #>> /var/log/$WILDFLY_SERVICE/server-`date +%Y-%m-%d`.log fi EOF # $WILDFLY_HOME is not visible here sed -i -e 's,WILDFLY_HOME=.*,WILDFLY_HOME='$WILDFLY_DIR',g' $WILDFLY_DIR/bin/launch.sh #sed -i -e 's,$WILDFLY_SERVICE,'$WILDFLY_SERVICE',g' $WILDFLY_DIR/bin/launch.sh chmod +x $WILDFLY_DIR/bin/launch.sh cp $WILDFLY_DIR/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/$WILDFLY_SERVICE.service WILDFLY_SERVICE_CONF=/etc/default/$WILDFLY_SERVICE # To install multiple instances of Wildfly replace all hardcoding in systemd file sed -i -e 's,EnvironmentFile=.*,EnvironmentFile='$WILDFLY_SERVICE_CONF',g' /etc/systemd/system/$WILDFLY_SERVICE.service sed -i -e 's,User=.*,User='$WILDFLY_USER',g' /etc/systemd/system/$WILDFLY_SERVICE.service sed -i -e 's,PIDFile=.*,PIDFile=/var/run/wildfly/'$WILDFLY_SERVICE'.pid,g' /etc/systemd/system/$WILDFLY_SERVICE.service sed -i -e 's,ExecStart=.*,ExecStart='$WILDFLY_DIR'/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND,g' /etc/systemd/system/$WILDFLY_SERVICE.service systemctl daemon-reload #systemctl enable $WILDFLY_SERVICE.service fi # if non-systemd Debian-like distribution if [ ! -x /bin/systemctl -a -r /lib/lsb/init-functions ]; then cp $WILDFLY_DIR/docs/contrib/scripts/init.d/wildfly-init-debian.sh /etc/init.d/$WILDFLY_SERVICE sed -i -e 's,NAME=wildfly,NAME='$WILDFLY_SERVICE',g' /etc/init.d/$WILDFLY_SERVICE WILDFLY_SERVICE_CONF=/etc/default/$WILDFLY_SERVICE fi # if non-systemd RHEL-like distribution if [ ! -x /bin/systemctl -a -r /etc/init.d/functions ]; then cp $WILDFLY_DIR/docs/contrib/scripts/init.d/wildfly-init-redhat.sh /etc/init.d/$WILDFLY_SERVICE WILDFLY_SERVICE_CONF=/etc/default/wildfly.conf chmod 755 /etc/init.d/$WILDFLY_SERVICE fi # if neither Debian nor RHEL like distribution if [ ! -x /bin/systemctl -a ! -r /lib/lsb/init-functions -a ! -r /etc/init.d/functions ]; then cat > /etc/init.d/$WILDFLY_SERVICE << "EOF" #!/bin/sh ### BEGIN INIT INFO @@ -106,26 +148,30 @@ esac exit 0 EOF sed -i -e 's,${WILDFLY_USER},'$WILDFLY_USER',g; s,${WILDFLY_FILENAME},'$WILDFLY_FILENAME',g; s,${WILDFLY_SERVICE},'$WILDFLY_SERVICE',g; s,${WILDFLY_DIR},'$WILDFLY_DIR',g' /etc/init.d/$WILDFLY_SERVICE chmod 755 /etc/init.d/$WILDFLY_SERVICE fi if [ ! -z "$WILDFLY_SERVICE_CONF" ]; then echo "Configuring service..." echo JBOSS_HOME=\"$WILDFLY_DIR\" > $WILDFLY_SERVICE_CONF echo JBOSS_USER=$WILDFLY_USER >> $WILDFLY_SERVICE_CONF echo WILDFLY_HOME=\"$WILDFLY_DIR\" > $WILDFLY_SERVICE_CONF echo WILDFLY_USER=\"$WILDFLY_USER\" > $WILDFLY_SERVICE_CONF echo STARTUP_WAIT=$WILDFLY_STARTUP_TIMEOUT >> $WILDFLY_SERVICE_CONF echo SHUTDOWN_WAIT=$WILDFLY_SHUTDOWN_TIMEOUT >> $WILDFLY_SERVICE_CONF echo WILDFLY_CONFIG=$WILDFLY_MODE.xml >> $WILDFLY_SERVICE_CONF echo WILDFLY_MODE=$WILDFLY_MODE >> $WILDFLY_SERVICE_CONF echo WILDFLY_BIND=0.0.0.0 >> $WILDFLY_SERVICE_CONF fi echo "Configuring application server..." sed -i -e 's,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000",<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="'$WILDFLY_STARTUP_TIMEOUT'",g' $WILDFLY_DIR/$WILDFLY_MODE/configuration/$WILDFLY_MODE.xml sed -i -e 's,<inet-address value="${jboss.bind.address:127.0.0.1}"/>,<any-address/>,g' $WILDFLY_DIR/$WILDFLY_MODE/configuration/$WILDFLY_MODE.xml sed -i -e 's,<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>,<socket-binding name="ajp" port="${jboss.ajp.port:28009}"/>,g' $WILDFLY_DIR/$WILDFLY_MODE/configuration/$WILDFLY_MODE.xml sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socket-binding name="http" port="${jboss.http.port:28080}"/>,g' $WILDFLY_DIR/$WILDFLY_MODE/configuration/$WILDFLY_MODE.xml sed -i -e 's,<socket-binding name="https" port="${jboss.https.port:8443}"/>,<socket-binding name="https" port="${jboss.https.port:28443}"/>,g' $WILDFLY_DIR/$WILDFLY_MODE/configuration/$WILDFLY_MODE.xml sed -i -e 's,<socket-binding name="osgi-http" interface="management" port="8090"/>,<socket-binding name="osgi-http" interface="management" port="28090"/>,g' $WILDFLY_DIR/$WILDFLY_MODE/configuration/$WILDFLY_MODE.xml [ -x /bin/systemctl ] && systemctl start $WILDFLY_SERVICE || service $WILDFLY_SERVICE start echo "Done." -
sukharevd revised this gist
Jul 26, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,10 @@ #description :The script to install Wildfly 9.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :20150726 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=9.0.1.Final WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME -
sukharevd revised this gist
Jul 5, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ #description :The script to install Wildfly 9.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :20150705 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=9.0.0.Final -
sukharevd revised this gist
Jul 5, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ #!/bin/bash #title :wildfly-install.sh #description :The script to install Wildfly 9.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :201507051334 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=9.0.0.Final WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME @@ -119,7 +119,7 @@ if [ ! -z "$WILDFLY_SERVICE_CONF" ]; then fi echo "Configuring application server..." sed -i -e 's,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000",<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="'$WILDFLY_STARTUP_TIMEOUT'",g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<inet-address value="${jboss.bind.address:127.0.0.1}"/>,<any-address/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>,<socket-binding name="ajp" port="${jboss.ajp.port:28009}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socket-binding name="http" port="${jboss.http.port:28080}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml -
sukharevd revised this gist
Nov 29, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,10 @@ #description :The script to install Wildfly 8.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :20141129 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.2.0.Final WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME -
sukharevd revised this gist
Jun 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ #description :The script to install Wildfly 8.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :20140601 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.1.0.Final -
sukharevd revised this gist
Jun 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ #date :20140312 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.1.0.Final WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME -
sukharevd revised this gist
Mar 13, 2014 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ #!/bin/bash #title :wildfly-install.sh #description :The script to install Wildfly 8.x #more :http://sukharevd.net/wildfly-8-installation.html #author :Dmitriy Sukharev #date :20140312 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.0.0.Final WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME @@ -50,7 +51,6 @@ ln -s $WILDFLY_FULL_DIR/ $WILDFLY_DIR useradd -s /sbin/nologin $WILDFLY_USER chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR/ echo "Registrating Wildfly as service..." # if Debian-like distribution @@ -120,7 +120,6 @@ fi echo "Configuring application server..." sed -i -e 's,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="'$WILDFLY_STARTUP_TIMEOUT'"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<inet-address value="${jboss.bind.address:127.0.0.1}"/>,<any-address/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>,<socket-binding name="ajp" port="${jboss.ajp.port:28009}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socket-binding name="http" port="${jboss.http.port:28080}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml -
sukharevd revised this gist
Dec 23, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -105,7 +105,7 @@ exit 1 esac exit 0 EOF sed -i -e 's,${WILDFLY_USER},'$WILDFLY_USER',g; s,${WILDFLY_FILENAME},'$WILDFLY_FILENAME',g; s,${WILDFLY_SERVICE},'$WILDFLY_SERVICE',g; s,${WILDFLY_DIR},'$WILDFLY_DIR',g' /etc/init.d/$WILDFLY_SERVICE fi chmod 755 /etc/init.d/$WILDFLY_SERVICE -
sukharevd revised this gist
Dec 23, 2013 . 1 changed file with 5 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,12 +2,12 @@ #title :wildfly-install.sh #description :The script to install Wildfly 8.x #author :Dmitriy Sukharev #date :20131222 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.0.0.CR1 WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME INSTALL_DIR=/opt @@ -55,16 +55,14 @@ chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR/ echo "Registrating Wildfly as service..." # if Debian-like distribution if [ -r /lib/lsb/init-functions ]; then cp $WILDFLY_DIR/bin/init.d/wildfly-init-debian.sh /etc/init.d/$WILDFLY_SERVICE sed -i -e 's,NAME=wildfly,NAME='$WILDFLY_SERVICE',g' /etc/init.d/$WILDFLY_SERVICE WILDFLY_SERVICE_CONF=/etc/default/$WILDFLY_SERVICE fi # if RHEL-like distribution if [ -r /etc/init.d/functions ]; then cp $WILDFLY_DIR/bin/init.d/wildfly-init-redhat.sh /etc/init.d/$WILDFLY_SERVICE WILDFLY_SERVICE_CONF=/etc/default/wildfly.conf fi @@ -107,7 +105,7 @@ exit 1 esac exit 0 EOF sed -i -e 's,${WILDFLY_USER},'$WILDFLY_USER',g; s,${WILDFLY_FILENAME},'$WILDFLY_FILENAME',g; s,${WILDFLY_SERVICE},'$WILDFLY_SERVICE',g; s,${WILDFLY_DIR},'$WILDFLY_DIR',g' /etc/init.d/$WILDFLY_SERVICE # TODO do I need this??? fi chmod 755 /etc/init.d/$WILDFLY_SERVICE -
sukharevd revised this gist
Dec 23, 2013 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ #title :wildfly-install.sh #description :The script to install Wildfly 8.x #author :Dmitriy Sukharev #date :20131121 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.0.0.Beta1 @@ -55,16 +55,17 @@ chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR/ echo "Registrating Wildfly as service..." # if Debian-like distribution if [ -r /lib/lsb/init-functions ]; then #cp $WILDFLY_DIR/bin/init.d/wildfly-init-debian.sh /etc/init.d/$WILDFLY_SERVICE wget https://dl.dropboxusercontent.com/u/5339027/shared/dsps/wildfly-init-debian.sh -q -O /etc/init.d/$WILDFLY_SERVICE # Temporary: https://github.com/wildfly/wildfly/pull/5502 sed -i -e 's,NAME=wildfly,NAME='$WILDFLY_SERVICE',g' /etc/init.d/$WILDFLY_SERVICE WILDFLY_SERVICE_CONF=/etc/default/$WILDFLY_SERVICE fi # if RHEL-like distribution if [ -r /etc/init.d/functions ]; then cp $WILDFLY_DIR/bin/init.d/wildfly-init-redhat.sh /etc/init.d/$WILDFLY_SERVICE sed -i "s,JBOSS_PIDFILE=/var/run/wilfly/wildfly.pid,JBOSS_PIDFILE=/var/run/wildfly/wildfly.pid,g" /etc/init.d/$WILDFLY_SERVICE # Temporary: https://github.com/wildfly/wildfly/pull/5405 WILDFLY_SERVICE_CONF=/etc/default/wildfly.conf fi # if neither Debian nor RHEL like distribution -
sukharevd revised this gist
Oct 6, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ #title :wildfly-install.sh #description :The script to install Wildfly 8.x #author :Dmitriy Sukharev #date :20130906 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.0.0.Beta1 WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME -
sukharevd revised this gist
Sep 6, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -67,7 +67,7 @@ if [ -r /etc/init.d/functions ]; then WILDFLY_SERVICE_CONF=/etc/jboss-as/jboss-as.conf fi # if neither Debian nor RHEL like distribution if [ ! -r /lib/lsb/init-functions -a ! -r /etc/init.d/functions ]; then cat > /etc/init.d/$WILDFLY_SERVICE << "EOF" #!/bin/sh -
sukharevd revised this gist
Sep 6, 2013 . 1 changed file with 30 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,7 @@ WILDFLY_USER="wildfly" WILDFLY_SERVICE="wildfly" WILDFLY_STARTUP_TIMEOUT=240 WILDFLY_SHUTDOWN_TIMEOUT=30 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -40,7 +41,7 @@ echo "Cleaning up..." rm -f "$WILDFLY_DIR" rm -rf "$WILDFLY_FULL_DIR" rm -rf "/var/run/$WILDFLY_SERVICE/" rm -f "/etc/init.d/$WILDFLY_SERVICE" echo "Installation..." mkdir $WILDFLY_FULL_DIR @@ -52,6 +53,22 @@ chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR/ #rm $WILDFLY_ARCHIVE_NAME echo "Registrating Wildfly as service..." # if Debian-like distribution if [ -r /lib/lsb/init-functions ]; then cp $WILDFLY_DIR/bin/init.d/wildfly-init-debian.sh /etc/init.d/$WILDFLY_SERVICE sed -i -e 's,NAME=wildfly,NAME='$WILDFLY_SERVICE',g' /etc/init.d/$WILDFLY_SERVICE WILDFLY_SERVICE_CONF=/etc/default/$WILDFLY_SERVICE fi # if RHEL-like distribution if [ -r /etc/init.d/functions ]; then cp $WILDFLY_DIR/bin/init.d/jboss-as-standalone.sh /etc/init.d/$WILDFLY_SERVICE mkdir -p /etc/jboss-as WILDFLY_SERVICE_CONF=/etc/jboss-as/jboss-as.conf fi # if neigther Debian nor RHEL like distribution if [ ! -r /lib/lsb/init-functions -a ! -r /etc/init.d/functions ]; then cat > /etc/init.d/$WILDFLY_SERVICE << "EOF" #!/bin/sh ### BEGIN INIT INFO @@ -90,9 +107,19 @@ esac exit 0 EOF sed -i -e 's,${WILDFLY_USER},'$WILDFLY_USER',g; s,${WILDFLY_FILENAME},'$WILDFLY_FILENAME',g; s,${WILDFLY_SERVICE},'$WILDFLY_SERVICE',g; s,${WILDFLY_DIR},'$WILDFLY_DIR',g' /etc/init.d/$WILDFLY_SERVICE fi chmod 755 /etc/init.d/$WILDFLY_SERVICE if [ ! -z "$WILDFLY_SERVICE_CONF" ]; then echo "Configuring service..." echo JBOSS_HOME=\"$WILDFLY_DIR\" > $WILDFLY_SERVICE_CONF echo JBOSS_USER=$WILDFLY_USER >> $WILDFLY_SERVICE_CONF echo STARTUP_WAIT=$WILDFLY_STARTUP_TIMEOUT >> $WILDFLY_SERVICE_CONF echo SHUTDOWN_WAIT=$WILDFLY_SHUTDOWN_TIMEOUT >> $WILDFLY_SERVICE_CONF fi echo "Configuring application server..." sed -i -e 's,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="'$WILDFLY_STARTUP_TIMEOUT'"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml #sed -i -e 's,<virtual-server name="default-host" enable-welcome-root="true">,<virtual-server name="default-host" enable-welcome-root="false">,g' $WILDFLY_DIR/standalone/configuration/standalone.xml # looks like applications can be deployed to root without this property now sed -i -e 's,<inet-address value="${jboss.bind.address:127.0.0.1}"/>,<any-address/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml @@ -101,6 +128,6 @@ sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socke sed -i -e 's,<socket-binding name="https" port="${jboss.https.port:8443}"/>,<socket-binding name="https" port="${jboss.https.port:28443}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="osgi-http" interface="management" port="8090"/>,<socket-binding name="osgi-http" interface="management" port="28090"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml service $WILDFLY_SERVICE start echo "Done." -
sukharevd revised this gist
Aug 13, 2013 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ #title :wildfly-install.sh #description :The script to install Wildfly 8.x #author :Dmitriy Sukharev #date :20130813 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.0.0.Alpha4 WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME @@ -99,6 +99,7 @@ sed -i -e 's,<inet-address value="${jboss.bind.address:127.0.0.1}"/>,<any-addres sed -i -e 's,<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>,<socket-binding name="ajp" port="${jboss.ajp.port:28009}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socket-binding name="http" port="${jboss.http.port:28080}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="https" port="${jboss.https.port:8443}"/>,<socket-binding name="https" port="${jboss.https.port:28443}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="osgi-http" interface="management" port="8090"/>,<socket-binding name="osgi-http" interface="management" port="28090"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml service wildfly start -
sukharevd revised this gist
Jul 28, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -100,4 +100,6 @@ sed -i -e 's,<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>,<socket- sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socket-binding name="http" port="${jboss.http.port:28080}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="https" port="${jboss.https.port:8443}"/>,<socket-binding name="https" port="${jboss.https.port:28443}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml service wildfly start echo "Done." -
sukharevd created this gist
Jul 26, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,103 @@ #!/bin/bash #title :wildfly-install.sh #description :The script to install Wildfly 8.x #author :Dmitriy Sukharev #date :20130726 #usage :/bin/bash wildfly-install.sh WILDFLY_VERSION=8.0.0.Alpha3 WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz WILDFLY_DOWNLOAD_ADDRESS=http://download.jboss.org/wildfly/$WILDFLY_VERSION/$WILDFLY_ARCHIVE_NAME INSTALL_DIR=/opt WILDFLY_FULL_DIR=$INSTALL_DIR/$WILDFLY_FILENAME WILDFLY_DIR=$INSTALL_DIR/wildfly WILDFLY_USER="wildfly" WILDFLY_SERVICE="wildfly" WILDFLY_STARTUP_TIMEOUT=240 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [[ $EUID -ne 0 ]]; then echo "This script must be run as root." exit 1 fi echo "Downloading: $WILDFLY_DOWNLOAD_ADDRESS..." [ -e "$WILDFLY_ARCHIVE_NAME" ] && echo 'Wildfly archive already exists.' if [ ! -e "$WILDFLY_ARCHIVE_NAME" ]; then wget -q $WILDFLY_DOWNLOAD_ADDRESS if [ $? -ne 0 ]; then echo "Not possible to download Wildfly." exit 1 fi fi echo "Cleaning up..." rm -f "$WILDFLY_DIR" rm -rf "$WILDFLY_FULL_DIR" rm -rf "/var/run/$WILDFLY_SERVICE/" rm -f /etc/init.d/$WILDFLY_SERVICE echo "Installation..." mkdir $WILDFLY_FULL_DIR tar -xzf $WILDFLY_ARCHIVE_NAME -C $INSTALL_DIR ln -s $WILDFLY_FULL_DIR/ $WILDFLY_DIR useradd -s /sbin/nologin $WILDFLY_USER chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR chown -R $WILDFLY_USER:$WILDFLY_USER $WILDFLY_DIR/ #rm $WILDFLY_ARCHIVE_NAME echo "Registrating Wildfly as service..." cat > /etc/init.d/$WILDFLY_SERVICE << "EOF" #!/bin/sh ### BEGIN INIT INFO # Provides: ${WILDFLY_SERVICE} # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop ${WILDFLY_FILENAME} ### END INIT INFO WILDFLY_USER=${WILDFLY_USER} WILDFLY_DIR=${WILDFLY_DIR} case "$1" in start) echo "Starting ${WILDFLY_FILENAME}..." start-stop-daemon --start --background --chuid $WILDFLY_USER --exec $WILDFLY_DIR/bin/standalone.sh exit $? ;; stop) echo "Stopping ${WILDFLY_FILENAME}..." start-stop-daemon --start --quiet --background --chuid $WILDFLY_USER --exec $WILDFLY_DIR/bin/jboss-cli.sh -- --connect command=:shutdown exit $? ;; log) echo "Showing server.log..." tail -500f $WILDFLY_DIR/standalone/log/server.log ;; *) echo "Usage: /etc/init.d/wildfly {start|stop}" exit 1 ;; esac exit 0 EOF sed -i -e 's,${WILDFLY_USER},'$WILDFLY_USER',g; s,${WILDFLY_FILENAME},'$WILDFLY_FILENAME',g; s,${WILDFLY_SERVICE},'$WILDFLY_SERVICE',g; s,${WILDFLY_DIR},'$WILDFLY_DIR',g' /etc/init.d/$WILDFLY_SERVICE chmod 755 /etc/init.d/$WILDFLY_SERVICE echo "Configurating..." sed -i -e 's,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>,<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="'$WILDFLY_STARTUP_TIMEOUT'"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml #sed -i -e 's,<virtual-server name="default-host" enable-welcome-root="true">,<virtual-server name="default-host" enable-welcome-root="false">,g' $WILDFLY_DIR/standalone/configuration/standalone.xml # looks like applications can be deployed to root without this property now sed -i -e 's,<inet-address value="${jboss.bind.address:127.0.0.1}"/>,<any-address/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>,<socket-binding name="ajp" port="${jboss.ajp.port:28009}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="http" port="${jboss.http.port:8080}"/>,<socket-binding name="http" port="${jboss.http.port:28080}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml sed -i -e 's,<socket-binding name="https" port="${jboss.https.port:8443}"/>,<socket-binding name="https" port="${jboss.https.port:28443}"/>,g' $WILDFLY_DIR/standalone/configuration/standalone.xml echo "Done."