CentOS7 学习笔记

1.首先centos7 采用了systemd管理系统服务的启动 systemd结合了以前红帽子的service 与chkconfig 

   systemctl [command] [unit]
   command 主要有:

             start :启动后面 unit

             stop :停止后面 unit

         restart :关闭的unit后重新启动,亦即执行 stop 再 start 的意思

          reload :不关闭 unit 的情況下,重新读取配置文件

         enable :下次开机时,后面 unit 会被启动

        disable :下次开机时,后面的 unit 不会被启动

         status :展示 unit 的状态包括:有沒有正在執行、开机启动否、配置文件等!

     is-active :是否正在运行

    is-enable :开机时有没有启用这个unit

   关于开机时启动级别的设定

   systemctl enable muti-user.target   =  ln -sf /lib/systemd/syetem/muti-user.target   /etc/systemd/system/default.target

   systemctl enable graphical.target   =   ln -sf /lib/systemd/syetem/graphical.target   /etc/systemd/system/default.target

posted @ 2016-05-20 11:44  betajj  阅读(163)  评论(0编辑  收藏  举报