002

来源:互联网 发布:cookie.js cdn 编辑:程序博客网 时间:2024/04/26 22:50
linux 
Most Unix-like systems have different "runlevels" (think about them as steps) for various
stages of the system running phase. At the operating system level, a service can be activated
only if other services have been successfully activated. Thus if you activate a service that
needs network before this one is up and running, it gets faulty or useless. This is essentially
what "runlevels" are for.
The following is a list of runlevels:
rc1.d: Single user mode
rc2.d: Single user mode with networking
rc3.d: Multi-user mode—boot up in text mode
rc4.d: Undefined
rc5.d: Multi-user mode—boot up in X Windows
rc6.d: Shutdown


Most production Linux systems boot using runlevel 3 (UI is not needed and it will be a waste of
resources), but to reach all audiences, we will use level 2, 3 and 5.




WildFly comes with a predefined script, which can be used to run WildFly as a service. This
script is located in the bin/init.d folder of the WildFly installation folder. So we just need to
copy the file inside the /etc/init.d system folder and set it as a service, as follows:
$ sudo cp $WILDFLY_HOME/bin/init.d/wildfly-init-redhat.sh /etc/init.d/
wildfly
$ sudo chkconfig --add wildfly
$ sudo chkconfig wildfly on --level 235
0 0
原创粉丝点击