Java Reference
In-Depth Information
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 (start|stop|restart|help)"
esac
# define where JBoss is - this is the directory
# containing directories log, bin, conf, etc.
JBOSS_HOME=${JBOSS_HOME:-"/usr/local/jboss"}
# make sure Java is on your path
JAVAPTH=${JAVAPTH:-"/usr/java/jdk/bin"}
Finally, we don't need to run the “all” configuration, we only need the
default configuration at the moment, so we change the argument to the
run.sh
invocation:
# define the script to use to start JBoss
JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c default"}
JBoss Configurations
When you unpacked JBoss, it contained three predefined server configu-
rations located in
jboss/server
. The three configurations are named
all
(which runs every single service JBoss supports, including RMI/IIOP
and clustering features),
default
(which runs only the set needed to run
servlets, JSP, and EJBs), and
minimal
(which runs just JNDI, the logger,
and a URL deployment service; no Web container, no JMS, no EJBs).
In effect, the selected configuration
is
the server. You can, of
course, customize any configuration, and you may create additional
configurations.
Now, this script allows you to run JBoss as any user. It defaults to user
jboss
if none is specified. You have to decide what to do here. Without speci-
fying a user, it will run as
root
. That is a major security risk. On an out-of-the-
box RedHat or Fedora system, there is no user called
jboss
. We will have to
create one. There are a lot of security concerns to creating a special “nonlogin”
user. The most important involve changing the user entries in
/etc/passwd