Step 1: First you have to download JBOSS Web Native Connectors as per your windows architecture.
Download link : http://jbossweb.jboss.org/downloads/jboss-native-2-0-10
OR
https://drive.google.com/JBOSS_native
Screenshot :
Step 2: Unzip/Extract the downloaded jboss-native-2.0.9-windows-x64-ssl.zip
Screenshot :
Step 3: Copy all the libraries to %JBOSS_HOME%/bin
Screenshot :
Step 4: Navigate to %JBOSS_HOME%/bin and take backup of service.bat file.
step 5 : Make a new service.bat file and paste below lines OR directly download from link.
Download link : https://drive.google.com/service.bat
-----------------------------------------------------------------------------------------------------------------
@echo off
REM JBoss, the OpenSource webOS
REM
REM Distributable under LGPL license.
REM See terms of license at gnu.org.
REM
REM ---------------------------------------------------
REM JBoss Service Script for Windows
REM ---------------------------------------------------
set "JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_144"
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
set DIRNAME=%CD%
REM VERSION, VERSION_MAJOR and VERSION_MINOR are populated
REM during the build with ant filter.
set SVCNAME=JBOSS6.4
set SVCDISP=JBoss Application Server 6.4
set SVCDESC=JBoss Application Server 6.4 Platform: Windows x64
set NOPAUSE=Y
REM Suppress killing service on logoff event
set JAVA_OPTS=-Xrs -Xms1024M -Xmx1024M
REM Figure out the running mode
if /I "%1" == "install" goto cmdInstall
if /I "%1" == "uninstall" goto cmdUninstall
if /I "%1" == "start" goto cmdStart
if /I "%1" == "stop" goto cmdStop
if /I "%1" == "restart" goto cmdRestart
if /I "%1" == "signal" goto cmdSignal
echo Usage: service install^|uninstall^|start^|stop^|restart^|signal
goto cmdEnd
REM jbosssvc retun values
REM ERR_RET_USAGE 1
REM ERR_RET_VERSION 2
REM ERR_RET_INSTALL 3
REM ERR_RET_REMOVE 4
REM ERR_RET_PARAMS 5
REM ERR_RET_MODE 6
:errExplain
if errorlevel 1 echo Invalid command line parameters
if errorlevel 2 echo Failed installing %SVCDISP%
if errorlevel 4 echo Failed removing %SVCDISP%
if errorlevel 6 echo Unknown service mode for %SVCDISP%
goto cmdEnd
:cmdInstall
jbosssvc.exe -imwdc %SVCNAME% "%DIRNAME%" "%SVCDISP%" "%SVCDESC%" service.bat
if not errorlevel 0 goto errExplain
echo Service %SVCDISP% installed
goto cmdEnd
:cmdUninstall
jbosssvc.exe -u %SVCNAME%
if not errorlevel 0 goto errExplain
echo Service %SVCDISP% removed
goto cmdEnd
:cmdStart
REM Executed on service start
del .r.lock 2>&1 | findstr /C:"being used" > nul
if not errorlevel 1 (
echo Could not continue. Locking file already in use.
goto cmdEnd
)
echo Y > .r.lock
jbosssvc.exe -p 1 "Starting %SVCDISP%" > D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
call standalone.bat --server-config=standalone.xml < .r.lock >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
del .r.lock
goto cmdEnd
:cmdStop
REM Executed on service stop
echo Y > .s.lock
jbosssvc.exe -p 1 "Shutting down %SVCDISP%" > D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log
call jboss-cli.bat --connect --controller=192.168.0.12:9999 --user=jboss --password=jboss@123 command=:shutdown >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log
del .s.lock
goto cmdEnd
:cmdRestart
REM Executed manually from command line
REM Note: We can only stop and start
echo Y > .s.lock
jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log
call jboss-cli.bat --connect command=:shutdown >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log 2>&1
del .s.lock
:waitRun
REM Delete lock file
del .r.lock > nul 2>&1
REM Wait one second if lock file exist
jbosssvc.exe -s 1
if exist ".r.lock" goto waitRun
echo Y > .r.lock
jbosssvc.exe -p 1 "Restarting %SVCDISP%" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
call standalone.bat --server-config=standalone.xml < .r.lock >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
del .r.lock
goto cmdEnd
:cmdSignal
REM Send signal to the service.
REM Requires jbosssch.dll to be loaded in JVM
@if not ""%2"" == """" goto execSignal
echo Missing signal parameter.
echo Usage: service signal [0...9]
goto cmdEnd
:execSignal
jbosssvc.exe -k%2 %SVCNAME%
goto cmdEnd
:cmdEnd
-----------------------------------------------------------------------------------------------------------------
Step 6 : Open service.bat with your favorite editor and make changes on below path.
6(1) : Set JAVA_HOME.
set "JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_144"
Screenshot :
6(2) : Set JAVA OPTS
set JAVA_OPTS=-Xrs -Xms1024M -Xmx1024M
Screenshot :
6(3) : Change log directory path. for :cmdStart , :cmdStop , :cmdRestart & :waitRun cmd service containers.
Screenshot :
6(4) : Make changes at :cmdStop and :cmdRestart on shutdown command as below included IP:[native-port] , username and password.
call jboss-cli.bat --connect --controller=192.168.0.12:9999 --user=jboss --password=jboss@123 command=:shutdown
Screenshot :
Step 7 : Run CMD as a administrator.
Step 8 : Navigate to %JAVA_HOME%/bin on CMD and run below command to create service.
service.bat install
Screenshot :
Step 9 : Check through services.msc
Screenshot :
Step 10 : Start the JBOSS services.
Screenshot :
Step 11 : Check through browser.
Screenshot:
Step 12 :Check the server/standalone/shutdown logs after Start/Stop services.
Screenshot :
Thanks :-)
Download link : http://jbossweb.jboss.org/downloads/jboss-native-2-0-10
OR
https://drive.google.com/JBOSS_native
Screenshot :
Step 2: Unzip/Extract the downloaded jboss-native-2.0.9-windows-x64-ssl.zip
Screenshot :
Step 3: Copy all the libraries to %JBOSS_HOME%/bin
Screenshot :
Step 4: Navigate to %JBOSS_HOME%/bin and take backup of service.bat file.
step 5 : Make a new service.bat file and paste below lines OR directly download from link.
Download link : https://drive.google.com/service.bat
-----------------------------------------------------------------------------------------------------------------
@echo off
REM JBoss, the OpenSource webOS
REM
REM Distributable under LGPL license.
REM See terms of license at gnu.org.
REM
REM ---------------------------------------------------
REM JBoss Service Script for Windows
REM ---------------------------------------------------
set "JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_144"
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
set DIRNAME=%CD%
REM VERSION, VERSION_MAJOR and VERSION_MINOR are populated
REM during the build with ant filter.
set SVCNAME=JBOSS6.4
set SVCDISP=JBoss Application Server 6.4
set SVCDESC=JBoss Application Server 6.4 Platform: Windows x64
set NOPAUSE=Y
REM Suppress killing service on logoff event
set JAVA_OPTS=-Xrs -Xms1024M -Xmx1024M
REM Figure out the running mode
if /I "%1" == "install" goto cmdInstall
if /I "%1" == "uninstall" goto cmdUninstall
if /I "%1" == "start" goto cmdStart
if /I "%1" == "stop" goto cmdStop
if /I "%1" == "restart" goto cmdRestart
if /I "%1" == "signal" goto cmdSignal
echo Usage: service install^|uninstall^|start^|stop^|restart^|signal
goto cmdEnd
REM jbosssvc retun values
REM ERR_RET_USAGE 1
REM ERR_RET_VERSION 2
REM ERR_RET_INSTALL 3
REM ERR_RET_REMOVE 4
REM ERR_RET_PARAMS 5
REM ERR_RET_MODE 6
:errExplain
if errorlevel 1 echo Invalid command line parameters
if errorlevel 2 echo Failed installing %SVCDISP%
if errorlevel 4 echo Failed removing %SVCDISP%
if errorlevel 6 echo Unknown service mode for %SVCDISP%
goto cmdEnd
:cmdInstall
jbosssvc.exe -imwdc %SVCNAME% "%DIRNAME%" "%SVCDISP%" "%SVCDESC%" service.bat
if not errorlevel 0 goto errExplain
echo Service %SVCDISP% installed
goto cmdEnd
:cmdUninstall
jbosssvc.exe -u %SVCNAME%
if not errorlevel 0 goto errExplain
echo Service %SVCDISP% removed
goto cmdEnd
:cmdStart
REM Executed on service start
del .r.lock 2>&1 | findstr /C:"being used" > nul
if not errorlevel 1 (
echo Could not continue. Locking file already in use.
goto cmdEnd
)
echo Y > .r.lock
jbosssvc.exe -p 1 "Starting %SVCDISP%" > D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
call standalone.bat --server-config=standalone.xml < .r.lock >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
del .r.lock
goto cmdEnd
:cmdStop
REM Executed on service stop
echo Y > .s.lock
jbosssvc.exe -p 1 "Shutting down %SVCDISP%" > D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log
call jboss-cli.bat --connect --controller=192.168.0.12:9999 --user=jboss --password=jboss@123 command=:shutdown >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log
del .s.lock
goto cmdEnd
:cmdRestart
REM Executed manually from command line
REM Note: We can only stop and start
echo Y > .s.lock
jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log
call jboss-cli.bat --connect command=:shutdown >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\shutdown.log 2>&1
del .s.lock
:waitRun
REM Delete lock file
del .r.lock > nul 2>&1
REM Wait one second if lock file exist
jbosssvc.exe -s 1
if exist ".r.lock" goto waitRun
echo Y > .r.lock
jbosssvc.exe -p 1 "Restarting %SVCDISP%" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
call standalone.bat --server-config=standalone.xml < .r.lock >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> D:\jboss-eap-6.4.0\jboss-eap-6.4\standalone\log\standalone.log
del .r.lock
goto cmdEnd
:cmdSignal
REM Send signal to the service.
REM Requires jbosssch.dll to be loaded in JVM
@if not ""%2"" == """" goto execSignal
echo Missing signal parameter.
echo Usage: service signal [0...9]
goto cmdEnd
:execSignal
jbosssvc.exe -k%2 %SVCNAME%
goto cmdEnd
:cmdEnd
-----------------------------------------------------------------------------------------------------------------
Step 6 : Open service.bat with your favorite editor and make changes on below path.
6(1) : Set JAVA_HOME.
set "JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_144"
Screenshot :
6(2) : Set JAVA OPTS
set JAVA_OPTS=-Xrs -Xms1024M -Xmx1024M
Screenshot :
6(3) : Change log directory path. for :cmdStart , :cmdStop , :cmdRestart & :waitRun cmd service containers.
Screenshot :
6(4) : Make changes at :cmdStop and :cmdRestart on shutdown command as below included IP:[native-port] , username and password.
call jboss-cli.bat --connect --controller=192.168.0.12:9999 --user=jboss --password=jboss@123 command=:shutdown
Screenshot :
Step 7 : Run CMD as a administrator.
Step 8 : Navigate to %JAVA_HOME%/bin on CMD and run below command to create service.
service.bat install
Screenshot :
Step 9 : Check through services.msc
Screenshot :
Step 10 : Start the JBOSS services.
Screenshot :
Step 11 : Check through browser.
Screenshot:
Step 12 :Check the server/standalone/shutdown logs after Start/Stop services.
Screenshot :
Thanks :-)
No comments:
Post a Comment