Downloads:

878

Downloads of v 7.1.1:

878

Last Update:

9/28/2015

Package Maintainer(s):

Software Author(s):

  • JBoss Developers

Tags:

jboss admin java jdk

JBoss

7.1.1 | Updated: 9/28/2015

Downloads:

878

Downloads of v 7.1.1:

878

Maintainer(s):

Software Author(s):

  • JBoss Developers

JBoss 7.1.1

Some Checks Have Failed or Are Not Yet Complete

1 Test Passing and 1 Failing Test


Validation Testing Passed


Verification Testing Failed

Details

To install JBoss, run the following command from the command line or from PowerShell:

>

To upgrade JBoss, run the following command from the command line or from PowerShell:

>

To uninstall JBoss, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade jboss-as -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade jboss-as -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure jboss-as installed
  win_chocolatey:
    name: jboss-as
    state: present
    version: 7.1.1
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'jboss-as' do
  action    :install
  version  '7.1.1'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: jboss-as,
    Version: 7.1.1,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller jboss-as
{
   Name     = 'jboss-as'
   Ensure   = 'Present'
   Version  = '7.1.1'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'jboss-as':
  provider => 'chocolatey',
  ensure   => '7.1.1',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install jboss-as version="7.1.1" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator gep13 on 1/6/2016.

Description

JBoss is a Application Server. It is possible to run Web application ARchive (WAR) files using JBoss. JBoss 7.1.1 requires a JDK 7 in order to run.

Overriding installation parameters example:

Install JBoss to c:\jboss and set the default admin account to "bob" with a password of "mypass":

choco install jboss -params '"/Start:false /InstallationPath:"c:\jboss" /Username:bob /Password:mypass"'

tools\chocolateyinstall.ps1
function hash([string] $value){    
    $md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
    $utf8 = new-object -TypeName System.Text.UTF8Encoding
    $hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($value))).ToLower().Replace('-', '')
    echo $hash
}

$ErrorActionPreference = 'Stop'
$packageName = 'jboss'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip'

$arguments = @{}

$packageParameters = $env:chocolateyPackageParameters

$installationPath = "c:\opt\jboss"
$jbossAdmin = "admin"
$jbossPass = "password"
$startService = "true"

$arguments = @{};
$packageParameters = $env:chocolateyPackageParameters;

if($packageParameters) {
	Write-Host "PackageParameters: $packageParameters"
	
	$match_pattern = "\/(?<option>([a-zA-Z]+)):(?<value>([`"'])?([a-zA-Z0-9- _\\:\.\$]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
	
	#""" fixes issues with notepad++
	
	$option_name = 'option'
    $value_name = 'value'

	if ($packageParameters -match $match_pattern ){
	  $results = $packageParameters | Select-String $match_pattern -AllMatches
	  $results.matches | % {
			$arguments.Add(
				$_.Groups[$option_name].Value.Trim(),
				$_.Groups[$value_name].Value.Trim())
		}
	}
	else
	{
	  Throw "Package Parameters were found but were invalid (REGEX Failure)"
	}

	 
	if($arguments.ContainsKey("InstallationPath")) {
	  $installationPath = $arguments["InstallationPath"];
	  Write-Host "Value variable installationPath changed to $installationPath"
	} else {
	  Write-Host "Default InstallationPath will be used"
	}

	if($arguments.ContainsKey("Username")) {
	  $jbossAdmin = $arguments["Username"];
	  Write-Host "Admin username changed to $jbossAdmin"
	} else {
	  Write-Host "Default admin username will be used"
	}

	if($arguments.ContainsKey("Password")) {
	  $jbossPass = $arguments["Password"];
	  Write-Host "Admin password changed to $jbossPass"
	} else {
	  Write-Host "Default admin password will be used. PLEASE CHANGE THIS!!!"
	}
	
	if($arguments.ContainsKey("Start")) {
	  $startService = $arguments["Start"];
	  Write-Host "Start service? $startService"
	} else {
	  Write-Host "Service will be automatically started"
	}
	
} else {
	Write-Host "Package parameters will not be overwritten"
}

$packageArgs = @{
  packageName   = $packageName
  unzipLocation = $installationPath
  url           = $url
  checksum      = '175c92545454f4e7270821f4b8326c4e'
  checksumType  = 'md5'  
}

Install-ChocolateyZipPackage @packageArgs

Write-Debug "Copy to $installationPath\ from $installationPath\jboss-as-7.1.1.Final"
cp -Recurse -Force $installationPath\jboss-as-7.1.1.Final\* $installationPath\jboss-as-7.1.1.Final\..\

Write-Debug "Remove $installationPath\jboss-as-7.1.1.Final"
rm -Force -Recurse $installationPath\jboss-as-7.1.1.Final

Install-ChocolateyEnvironmentVariable -variableName "JBOSS_HOME" -variableValue "$installationPath" -variableType 'Machine'
Install-ChocolateyPath "$installationPath\bin" "Machine"
Update-SessionEnvironment

Write-Verbose "Adding management user to JBoss"
$hashPass = hash ($jbossAdmin + ":ManagementRealm:" + $jbossPass)
$jbossUser = "$jbossAdmin=$hashPass" 
Write-Debug "Admin user hash: $jbossUser ==>  $installationPath\standalone\configuration\mgmt-users.properties"

Add-Content $installationPath\standalone\configuration\mgmt-users.properties "`r`n$jbossUser" -Encoding utf8

Write-Verbose "Checking for JBOSS service..."
$jbossSvc = Get-Service jboss*
if($jbossSvc -eq $null){
	Write-Host "Installing JBoss Service"
	
	Write-Debug "Service unzipLocation $installationPath"
	
	$servicePackageArgs = @{
		packageName   = "$packageName-Service"
		unzipLocation = $installationPath
		url           = "http://downloads.jboss.org/jbossnative/2.0.10.GA/jboss-native-2.0.10-windows-x86-ssl.zip"
		url64bit      = "http://downloads.jboss.org/jbossnative/2.0.10.GA/jboss-native-2.0.10-windows-x64-ssl.zip"
 
		checksum    = 'acc45d49f1838183726bf616f0069cfc'
		checksumType= 'md5'
		checksum64    = '63477e8e166c9ec695ab2922ca0a31b0'
		checksumType64= 'md5'
	}
		
	Install-ChocolateyZipPackage @servicePackageArgs
     
    cp $toolsDir\service.bat $installationPath\bin\service.bat -force
    
    &$installationPath\bin\service.bat install

    Set-Service jboss -StartupType Automatic
	
	if($startService -eq "true"){
		Write-Host "Starting Service"
		Start-Service jboss
	} else {
		Write-Host "Start service set to $startService"
	}
              
}
Write-Host "JBoss service installed"
tools\chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop'; # stop on all errors
$packageName = 'jboss'


Write-Debug "Checking for JBOSS service..."
$jbossSvc = Get-Service jboss*
if($jbossSvc -ne $null){
	Stop-Service jboss
	&sc.exe delete jboss
}

Uninstall-ChocolateyZipPackage $packageName "jboss-ServiceInstall.zip"

Install-ChocolateyEnvironmentVariable "JBOSS_HOME" $null "Machine"

$path = Get-EnvironmentVariable "PATH" "Machine"
Write-Host "Current path: $path"

$installationPath = Get-EnvironmentVariable "JBOSS_HOME" "Machine"	
$newPath = $path.Replace("$installationPath\bin;", $null)
Write-Host "New Path: $newPath"

Install-ChocolateyEnvironmentVariable "PATH" $newPath "Machine"

Update-SessionEnvironment
tools\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 -------------------------------------------------------------------------
REM
REM ITL Corrections
REM	Changed service name, display & description
REM Changed run.bat t0 standalone.bat
REM Changed shutdown -S to jboss-cli.bat --connect command=:shutdown
REM Changed JAVAOPTS
REM

@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
set DIRNAME=%CD%

REM
REM VERSION, VERSION_MAJOR and VERSION_MINOR are populated
REM during the build with ant filter.
REM
set SVCNAME=JBOSS
set SVCDISP=JBoss Application Server 7.1.1
set SVCDESC=JBoss Application Server 7.1.1 GA/Platform: Windows x64
set NOPAUSE=Y

REM Suppress killing service on logoff event

set JAVAOPTS=-Xmx1024M –Xms512M –XX:MaxPermSize=512M -Xrs
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
mkdir %JBOSS_HOME%\standalone\log
echo Service Installed > %JBOSS_HOME%\standalone\log\service.log
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 %JBOSS_HOME%\standalone\log\.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 > %JBOSS_HOME%\standalone\log\.r.lock
jbosssvc.exe -p 1 "Starting %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log
call standalone.bat --server-config=standalone.xml < %JBOSS_HOME%\standalone\log\.r.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> %JBOSS_HOME%\standalone\log\service.log
del %JBOSS_HOME%\standalone\log\.r.lock
goto cmdEnd

:cmdStop
REM Executed on service stop

echo Y > %JBOSS_HOME%\standalone\log\.s.lock
jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log

call jboss-cli.bat --connect command=:shutdown < %JBOSS_HOME%\standalone\log\.s.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> %JBOSS_HOME%\standalone\log\service.log

del %JBOSS_HOME%\standalone\log\.s.lock
goto cmdEnd

:cmdRestart
REM Executed manually from command line
REM Note: We can only stop and start

echo Y > %JBOSS_HOME%\standalone\log\.s.lock
jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log


call jboss-cli.bat --connect command=:shutdown < %JBOSS_HOME%\standalone\log\.s.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
del %JBOSS_HOME%\standalone\log\.s.lock
:waitRun
REM Delete lock file

del %JBOSS_HOME%\standalone\log\.r.lock > nul 2>&1
REM Wait one second if lock file exist
jbosssvc.exe -s 1
if exist "%JBOSS_HOME%\standalone\log\.r.lock" goto waitRun

echo Y > %JBOSS_HOME%\standalone\log\.r.lock
jbosssvc.exe -p 1 "Restarting %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log

call standalone.bat --server-config=standalone.xml < %JBOSS_HOME%\standalone\log\.r.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> %JBOSS_HOME%\standalone\log\service.log

del %JBOSS_HOME%\standalone\log\.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

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status

Discussion for the JBoss Package

Ground Rules:

  • This discussion is only about JBoss and the JBoss package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or JBoss, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus