在linux的条件下,有时候我们可能需要在开机启动中加入自己的程序。
如何加呢,对于linux管理员来说,可能没有什么问题。如果刚接触linux的还真的有点麻烦。
把自定义的脚本放到\etc\rcd\init.d
执行命令:chkconfig --add shell
不过普通脚本是不能被加入到启动项目里的,具体的写法如下
#!bin/sh
#
# $Id: rc.autofs.in,v 1.63 2006/03/30 02:09:51 raven Exp $
#
# rc file for automount using a Sun-style "master map".
#
# chkconfig: 345 28 72
# processname: /usr/sbin/automount
# config: /etc/auto.master
# description: Automounts filesystems on demand
#
# Location of the automount daemon and the init directory
#
以下为启动项目
/etc/rc.d/init.d/httpd restart;