RedHat Linux 自动启动脚本设置

来源:互联网 发布:淘宝达人发帖图片范本 编辑:程序博客网 时间:2024/05/20 01:13

Note:working with user root.


1. 创建自启动脚本test.sh,一般放置到/etc/init.d/目录(optional)

#!bin/sh

xxxxxxxxxxxxxxx

2. 确定系统的启动level.

cat /etc/inittab

See the output line “id:?:initdefaut”, the value of the ? is the value for your system


3.链接启动脚本到启动序列目录

cd /etc/rc.d/rc?.d/
ln -s ../init.d/test.sh S##test

Where ## must be replaced by a number that is notcurrently in use by another symbolic link in the folder

原创粉丝点击