首页 > 其他 > 详细

题目:命令chkconfig;开机自启动服务

时间:2018-08-12 19:57:51      阅读:192      评论:0      收藏:0      [点我收藏+]


chkconfig 

    chkconfig --list 查看所有服务对应的运行级别

    技术分享图片

    过滤3级别开机自动启动的服务

    [root@xwj ~]# chkconfig --list | grep "3:on"

    查看某个服务开机自启级别,例如查看 iptables 

    [root@xwj ~]# chkconfig --list iptables





开机自启动服务:sshd 

一、更改配置文件

       将启动命令放入  /etc/rc.local

       例如配置sshd服务开机自启动: 

       [root@xwj ~]# echo /etc/init.d/sshd start >>/etc/rc.local 

       技术分享图片


二、使用chkconfig命令管理开机自启动

       [root@xwj ~]# chkconfig sshd on

       默认在 2345 级别启动

       技术分享图片

       设置sshd服务的启动级别

        在345级别上启动

        [root@xwj ~]# chkconfig sshd on --level 345

        [root@xwj ~]# chkconfig --level 345 sshd on 

        技术分享图片

        只在3级别上启动

        技术分享图片



题目:命令chkconfig;开机自启动服务

原文:http://blog.51cto.com/11193863/2158500

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!