4.2. Using run.sh (development)

4.2. Using run.sh (development)

For development, you can activate the JBoss AS server with the familiar run.sh command as usual. The jbossas RPM installs the JBOSS_HOME in

/var/lib/jbossas

So, you can cd to /var/lib/jbossas/bin and use run.sh from there.

If the -compat RPM for the Sun SDK was not installed, you must also set JAVA_HOME before starting the server. If it is installed, just make sure the alternatives are pointing to the SDK you want to use -- there is no need to set JAVA_HOME in this case, unless you want to use a different SDK than the one pointed to by alternatives.

Tip

JAVA_HOME can be set system-wide in /etc/profile. But beware, some users may not want to have JAVA_HOME set to this same SDK. Also, some may prefer to use the alternatives-selected one instead. These users may be affected by this global setting of JAVA_HOME.

With the Sun RPM, the SDK is usually located in /usr/java/... (it may vary between their releases). If the -compat RPM is installed but you still need to set JAVA_HOME for some other reason, the alternatives-selected SDK is in /usr/lib/jvm/java, so a export JAVA_HOME=/usr/lib/jvm/java will do.

IMPORTANT

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 run the server, change configuration, deploy etc., due to file system permissions. Alternatively, a developer can be listed in the jboss user group by the system administrator.

Yet another possibility is to create a personal copy of JBOSS_HOME (see Creating copies of JBOSS_HOME below).

To create additional JBoss AS configurations besides the provided 'default', 'minimal' and 'all', you must create a new directory for your configuration as follows (note the switches given to the cp command):

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 specifying it in the -c flag to run.sh, as usual.