美文网首页
linux的服务管理

linux的服务管理

作者: 小胖_20c7 | 来源:发表于2019-04-28 16:40 被阅读0次
    启动进程对比:
    开机的自动启动
        init
        systemd
    运行过程中的手动启动
        service
        systemctl
    修改和查看开始的自动启动项
        chkconfig
        systemctl
    启动脚本:
        /etc/init.d
        /usr/lib/systemd/system
    启动级别:
        /etc/rc3.d
        /etc/systemd/system
    默认运行级别:
        /etc/inittab
        /etc/systemd/system/default.target
    切换级别:
        init 3
        systemctl isolate multi-user.target
    
    systemctl管理
    runlevel
    init 0(systemctl poweroff)
    init 6(systemctl reboot)
    init 3(systemctl isolate multi-user.target)
    
    systemctl get-default
    systemctl set-default multi-user.target
    
    systemctl enable httpd.service
    systemctl disable httpd.service
    
    systemctl start httpd.service
    systemctl stop httpd.service
    systemctl restart httpd.service
    
    systemctl is-active httpd.service
    systemctl is-enabled httpd.service
    systemctl status httpd.service
    
    systemctl list-units(针对的是汇总的服务)
    systemctl list-unit-files | grep enabled(针对的是涉及到的所有文件)
    systemctl list-unit-files --type=service | grep enabled(type为service,socket,target)
    
    systemctl cat sshd.service
    systemctl list-dependencies default.target

    相关文章

      网友评论

          本文标题:linux的服务管理

          本文链接:https://www.haomeiwen.com/subject/uucjnqtx.html