此内容没有您所选择的语言版本。
2.4. Starting the JBoss ON Server
The JBoss ON server is actually a customized JBoss AS server, included in the JBoss ON installation, so starting the JBoss ON server means starting that JBoss instance.
The JBoss ON server can be started manually or can be configured to start and run as a system service.
2.4.1. Starting the JBoss ON Server (Basic) 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The JBoss ON server process is started by running the rhqctl script in the serverRoot
/bin/
directory.
Important
The JBoss ON server cannot start or restart itself through a resource operation in the command line or UI (unlike other EAP resources). The JBoss ON UI or CLI for one server can be used to start another JBoss ON server in the cloud, but it cannot be perform a start or restart operation reflexively.
The simplest way to start the server is simply to run the script with the
start
command. This starts the server process and then exits from the script.
serverRoot/bin/rhqctl start --server Trying to start the RHQ Server... RHQ Server (pid 27547) is starting
serverRoot/bin/rhqctl start --server
Trying to start the RHQ Server...
RHQ Server (pid 27547) is starting
The
rhqctl
script looks for specific environment variables during its execution, especially related to the JVM to use with the JBoss EAP server instance. A complete list of environment variables is given in the script itself; defaults based on the installation information are used, so most environment variables don't need to be reset.
Note
The
RHQ_JAVA_HOME
environment variable must be set on Red Hat Enterprise Linux systems for the server to start. This can be set to a general value like /usr/
.
The server can also be started in console mode, which prints detailed information about the server process to the terminal and leaves the script open as long as the server is running.
./rhqctl console --server
[root@server ~]# ./rhqctl console --server
20:28:44,120 INFO [org.jboss.modules] JBoss Modules version 1.2.2.Final-redhat-1
Starting RHQ Server in console...
JAVA_OPTS already set in environment; overriding default settings with values: -
....
2.4.2. Running the JBoss ON Server as a Service 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The JBoss ON server, storage node and agent can be managed and run as a SysV style init service on Red Hat Enterprise Linux using the following example:
- Create a initalization scipt
/etc/init.d/jboss-on
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Change the permissions on the file so it can be executed:
sudo chmod +x /etc/init.d/jboss-on
sudo chmod +x /etc/init.d/jboss-on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add the initalization script to chkconfig:
sudo chkconfig --add /etc/init.d/jboss-on
sudo chkconfig --add /etc/init.d/jboss-on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To indicate that you intend for the script to run system startup and stop during shutdown:
sudo chkconfig jboss-on on
sudo chkconfig jboss-on on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To override the default values for
RHQ_HOME
,RHQ_SERVER_HOME
,RHQ_AGENT_HOME
,RHQ_JAVA_HOME
andRHQ_USER
, create the service configuration file/etc/jboss-on.conf
or/etc/jboss-on/<SERVICE NAME>.conf
with your specific values:RHQ_HOME=/usr/share/jboss-on RHQ_USER=jbosson
RHQ_HOME=/usr/share/jboss-on RHQ_USER=jbosson
Copy to Clipboard Copied! Toggle word wrap Toggle overflow