4.1. Using the Linux service (production)
JBoss AS can be started, stopped, and configured to start automatically at boot time either from the command line or using a graphical tool.
You can start and stop the jbossas service using the service command as root on a console window (as is typical of a network service):
service jbossas start ... service jbossas stop
The behavior at boot can be controlled with the chkconfig command, as any other Linux service (see chkconfig man page).
Alternatively, you can issue the command system-config-services to activate the graphical Red Hat Service Configuration Tool, which can also be activated from the main menu. Select:
System Settings > Server Settings > Services
For security purposes, beginning with Red Hat Application Stack V.1.1, authentication for the jmx-console, web-console, jmx-invoker and http-invoker is turned on. Additionally, no user accounts are active by default, so as to prevent default user / password based attacks.
Accounts for the jmx-console and the invokers can be set up by modifying:
$JBOSS_HOME/server/$CONFIG/conf/props/jmx-console-users.properties
Accounts for the web-console users can be set up by modifying:
$JBOSS_HOME/server/$CONFIG/deploy/management/console-mgr.sar /web-console.war/WEB-INF/classes/web-console-users.properties
Please note that the file name above has been split onto two lines for readability. It should be understood and entered as one continuous line.
Where $JBOSS_HOME is the install directory (/var/lib/jbossas) and $CONFIG is the server configuration you are using.
Please see http://kbase.redhat.com/faq/FAQ_107_9963.shtm for more information
JBoss AS is configured with its internal servlet engine to listen for HTTP traffic on port 8080. Once the jbossas service has been started, you can verify that it is running by pointing your web browser to:
http://localhost:8080/web-console
You can use the Web Console to administer JBoss AS.
The entire JBoss AS suite runs under a new jboss system user. It may be necessary to use the 'su -s /bin/bash jboss' system command to deposit .ear / .war / .jar files under the JBoss AS deployment directory, due to file system permissions. Alternatively, a developer can be listed in the jboss user group by the system administrator. The best approach is to use the Web Console (URL above) to deploy the application.
Depositing files for which the user jboss has no read access in the deployment directory will cause the server to fail to deploy.
To create additional JBoss AS configurations besides the provided 'default', 'minimal', 'all' and 'production', you must create a new directory for your configuration as follows (note the switches given to the cp command):
export JBOSS_BASE=/var/lib/jbossas cd $JBOSS_HOME cp -pL -R server/default server/myownconfig
You can then change the configuration and request it to be used by setting the JBOSSCONF variable in the file:
/etc/sysconfig/jbossas
Optionally, you can just set the JBOSSCONF variable in /etc/sysconfig/jbossas to a non-existent subdirectory (existing parent with write access by the jboss user) or an empty directory (with write access by jboss) and the init script will create a new configuration directory tree for you based on the current "production" configuration when the service is first started. You can then stop the service, adjust the configuration as desired, and start it again.
Please note that automated updating of configurations created using method above is not supported. If you create custom configurations, you will manually have to port files / changes from a new update to that configuration.