Start WildFly as a System V Service on Linux: Difference between revisions
No edit summary |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
=Locate the Pre-Packaged Startup Scripts= | =Locate the Pre-Packaged Startup Scripts= | ||
They are available in | They are available in <tt>$JBOSS_HOME/bin/init.d</tt> as <tt>jboss-as-domain.sh</tt> and <tt>jboss-as-standalone.sh</tt>. | ||
=Install the Scripts into their Standard Locations= | |||
Perform the following operations as "root", name the scripts accordingly: | Perform the following operations as "root", name the scripts accordingly: | ||
For a standalone installation, name the script | For a standalone installation, name the script <tt>jboss</tt>. | ||
<pre> | |||
cp $JBOSS_HOME/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss | cp $JBOSS_HOME/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss | ||
</pre> | |||
For a domain installation, name the script | For a domain installation, name the script <tt>jboss-host-controller</tt>, regardless of whether we're configuring to start the domain controller or a subordinate host controller. This is because on the domain controller host, the domain controller process and the host controller process coincide. | ||
<pre> | |||
cp $JBOSS_HOME/bin/init.d/jboss-as-domain.sh /etc/init.d/jboss-host-controller | cp $JBOSS_HOME/bin/init.d/jboss-as-domain.sh /etc/init.d/jboss-host-controller | ||
</pre> | |||
=Customize the WildFly Startup Wrapper= | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[Customize WildFly Startup Wrapper]] | |||
</blockquote> | |||
Add | =Add the Startup Script As a Service= | ||
<pre> | |||
chkconfig --add jboss|jboss-host-controller | chkconfig --add jboss|jboss-host-controller | ||
chkconfig --list jboss|jboss-host-controller | chkconfig --list jboss|jboss-host-controller | ||
chkconfig --level 2345 jboss|jboss-host-controller on | chkconfig --level 2345 jboss|jboss-host-controller on | ||
</pre> | |||
=The Line that Starts The Process= | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[WildFly - The Wrapper Script Line that Starts the Process]] | |||
</blockquote> |
Latest revision as of 08:07, 16 February 2016
Internal
Overview
This procedure applies when the installation was done by unzipping or via the installer. This does not apply to an RPM installation.
The procedure is similar for standalone mode and domain mode. The only difference is the name of the original startup scripts (jboss-as-standalone.sh, jboss-as-domain.sh below).
Note that this procedure differs slightly from the manual procedure (https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Installation_Guide/sect-Service_Configuration.html#Install_JBoss_Enterprise_Application_Platform_6_Red_Hat_Enterprise_Linux_Service). This procedure is simpler, and does not require supplementary configuration files in /etc.
Locate the Pre-Packaged Startup Scripts
They are available in $JBOSS_HOME/bin/init.d as jboss-as-domain.sh and jboss-as-standalone.sh.
Install the Scripts into their Standard Locations
Perform the following operations as "root", name the scripts accordingly:
For a standalone installation, name the script jboss.
cp $JBOSS_HOME/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss
For a domain installation, name the script jboss-host-controller, regardless of whether we're configuring to start the domain controller or a subordinate host controller. This is because on the domain controller host, the domain controller process and the host controller process coincide.
cp $JBOSS_HOME/bin/init.d/jboss-as-domain.sh /etc/init.d/jboss-host-controller
Customize the WildFly Startup Wrapper
Add the Startup Script As a Service
chkconfig --add jboss|jboss-host-controller chkconfig --list jboss|jboss-host-controller chkconfig --level 2345 jboss|jboss-host-controller on