+ -
当前位置:首页 → 问答吧 → RHEL 启动顺序问题请教

RHEL 启动顺序问题请教

时间:2010-12-30

来源:互联网

RH133里面说,启动过程是这样:
boot loader
kernel
init
rc.local

但对于rc.local讲述非常模糊,百度谷歌了一下,也只有少数在rc.local中添加脚本失败的帖子。

添加启动脚本,正规的做法是怎样的呢,官方这方面的描述在哪里能找到呢?

作者: 是我别封号   发布时间: 2010-12-30

额,动手做了一下,发现可以。。。
  1. [root@RHEL5TST tmp]# more /etc/rc.local
  2. #!/bin/sh
  3. #
  4. # This script will be executed *after* all the other init scripts.
  5. # You can put your own initialization stuff in here if you don't
  6. # want to do the full Sys V style init stuff.

  7. touch /var/lock/subsys/local
  8. /tmp/tst.sh
  9. [root@RHEL5TST tmp]# cat /tmp/tst.sh
  10. #!/bin/bash
  11. ps -ef >>/tmp/ps.txt
  12. [root@RHEL5TST tmp]# ls -l /tmp/ps.txt
  13. -rw-r--r-- 1 root root 6030 Dec 30 09:29 /tmp/ps.txt
复制代码

作者: 是我别封号   发布时间: 2010-12-30

回复 是我别封号


    往里面加就行了
   
   前几天有人问 mysql的

   /usr/local/mysql/bin/mysqld_safe --user=mysql &

    别漏了后面的 &

作者: taojie2000   发布时间: 2010-12-30



QUOTE:
回复  是我别封号


    往里面加就行了
   
   前几天有人问 mysql的

   /usr/local/mysql/bin/m ...
taojie2000 发表于 2010-12-30 09:47




    脚本后面不要吧?我是看教程,有些疑问,顺便研究了一下

作者: 是我别封号   发布时间: 2010-12-30