亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 1327 | 回復(fù): 0
打印 上一主題 下一主題

[OS Liunx] How To Install Services on Linux [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2010-01-10 22:12 |只看該作者 |倒序?yàn)g覽

               
Allow me to give you a little introduction on the subject prior to theproper howto. The Linux boot process can be splitup in three steps:
Loading the kernelDevice detection and configurationGranting control to ‘init’The ‘init’ program is a daemon that spawns all other processes in thesystem. It is responsibe for loading the systemusing initialization scripts, which are usually found at /etc/init.d.There are two ways for init to operate, BSD andSystemV. Typically, Linux systems use SystemV, though there aredistributions like Arch Linux or Slackware that use BSD.
The runlevel is a number used to identify the mode in which thecomputer is. For example, a runlevel 0 would mean thatthe computer is halted, while changing the runlevel to 6 would makethe computer reboot. There are 7 runlevels.Runlevels from 1 to 5 usually differ in the programs that areautomatically started. Typically, runlevel 3 is used toboot in text-only mode, while runlevel 5 will start the X server andthe desktop environment.
For each runlevel, there is a folder named rcN.d (where N stands forthe runlevel number) which contains symbolic linksto the some of the scripts located at /etc/init.d.
When changing the runlevel, what the system does is:
Changing directory to /etc/rcN.d or /etc/rc.d/rcN.d (depends on thedistribution).All the scripts that begin with K are executed in alphabetical orderwith the argument ‘stop’. Usually there arenumbers after the K to be able to control the exact execution order.All the scripts that begin with S are executed in alphabetical orderwith the argument ‘start’. As before, numbers areused to sort the scripts before execution.If you want to learn more, you can find information about init and runlevels at:
http://en.wikipedia.org/wiki/Init
http://en.wikipedia.org/wiki/Runlevel
http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-init-boot-shutdown-init.html
http://linux.about.com/od/commands/l/blcmdl8_init.htm
Now lets get our hands dirty and learn how to make the BitNami stackservers start at boot time :) Bear into mind thatyou will need root privileges to do it.
- Debian-like distribution (Debian, Ubuntu, etc)
1. Copy the installdir/ctlscript.sh file to /etc/init.d . It isadvisable to rename this script to something more specific, like “bitnami-drupal”.
cp installdir/ctlscript.sh /etc/init.d/bitnami-drupal2. We will use rc-update.d to add the script to the desired runlevels.
update-rc.d -f bitnami-drupal start 80 2 3 4 5 . stop 30 0 1 6 .
As you can see, we define the priority (80 for start and 30 for stop) and the runlevels in which the script will be executed. The result of this command will be something like
Adding system startup for /etc/init.d/bitnami-drupal … /etc/rc0.d/K30bitnami-bitnami-drupal → ../init.d/drupal /etc/rc1.d/K30bitnami-bitnami-drupal → ../init.d/drupal /etc/rc6.d/K30bitnami-drupal → ../init.d/bitnami-drupal /etc/rc2.d/S80bitnami-drupal → ../init.d/bitnami-drupal /etc/rc3.d/S80bitnami-drupal → ../init.d/bitnami-drupal /etc/rc4.d/S80bitnami-drupal → ../init.d/bitnami-drupal /etc/rc5.d/S80bitnami-drupal → ../init.d/bitnami-drupalAnd that’s it, the servers will be loaded at boot time. To revertthe changes, just type
update-rc.d -f bitnami-drupal remove
- RedHat-like distribution (Red Hat, Fedora Core, CentOS, Suse, etc)
1. Copy the installdir/ctlscript.sh file to /etc/init.d . It isadvisable to rename this script to something more specific, like “bitnami-drupal”.
cp installdir/ctlscript.sh /etc/init.d/bitnami-drupal2. You have to modify the script a little bit to make it work atboot time. Just add the following lines at the beginning of the file
#!/bin/sh#
chkconfig: 2345 80 30description: BitNami ServiceThis means that the script will be executed in runlevels 2, 3, 4and 5, with priority 80 to start, and 30 to stop.
3. Now, you only need chkconfig to install the script as a service.
chkconfig —add bitnami-drupal
And you’re done. To revert the changes, we will use chkconfig again
chkconfig —delete bitnami-drupal
That’s all! If you have comments or suggestions, please post at thefollowing topic on the forums
http://bitnami.org/forums/forums/27/topics/344
               
               
               
               
               
               
               

本文來(lái)自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u3/90363/showart_2145106.html
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP