文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Lab 3 管理启动

Lab 3 管理启动

时间:2007-02-07  来源:LinuxBoy!

Lab 3 管理启动
目标: 定制系统服务的技巧

步骤一: 使用chkconfig禁用服务
1. 使用chkconfig检查系统服务的状态: chkconfig --list
2. 使用以下示例将isdn在所有runlevel关闭
chkconfig --del <service name>
3. 使用--help 查看chkconfig语法信息 chkconfig --help. 关闭runlevel3和runlevel5的kudzu服务
4. 观察 on 和 --add 的差异, off 和 --de 的差异
chkconfig isdn --list
chkconfig isdn on
chkconfig isdn --list
chkconfig isdn off
chkconfig isdn --list
chkconfig isdn --del
chkconfig isdn --list
chkconfig isdn --add
chkconfig isdn --list
5. 使用chkconfig查看系统服务的状态和改变状态

步骤二: 更改系统登录标题
1. 我们将设置rc.local脚本用于每次重启时出现登录标题. 打开/etc/rc.local文件找到以下行:
touch /var/lock/subsys/local
2. 在后面插入以下行:
echo “ Welcome to \n” > /etc/issue
echo “All access to this computer is monitored” >> /etc/issue
echo “Unauthorized access is prohibited” >> /etc/issue
echo >> /etc/issue
echo “Last reboot complete at $(/bin/date)” >> /etc/issue
3. 保存文件,把/etc/issue复制为/etc/issue.orig
4. 重启动系统
5. 当系统启动后,切换到虚拟控制台确认登录标题出现了. 打开/etc/issue, 注意mingetty把\n扩展为你的主机名

步骤三: 更改默认runlevel
1. 编辑/etc/inittab文件,将默认runlevel从5改为3,如下:
id:3:initdefault:
2. 重启动系统.发生了什么?
3. 把默认runlevel改为5,重启动系统

步骤四: 增加当天的消息
1. 编辑/etc/motd文件,默认应为空. 增加以下行:
##################################
# Welcome to station xx #
##################################
<date> The sysadmin is playing today.
Expect frequent system downtime.
2. 切换到虚拟控制台登录.
相关阅读 更多 +
排行榜 更多 +
摧毁大厦游戏

摧毁大厦游戏

飞行射击 下载
合并动物城手游版

合并动物城手游版

休闲益智 下载
哈士奇大冒险

哈士奇大冒险

休闲益智 下载