[svc]centos7的服务治理-systemd

任务旧指令新指令
哪些服务正在跑?chkconfig --list\grep 3:onsystemctl list-units --type=service
哪些服务开机会自启动?chkconfig --listsystemctl list-unit-files --type=service
使httpd开机自启动chkconfig --level 3 httpd onsystemctl enable httpd.service
使httd开机不自启动chkconfig --level 3 httpd offsystemctl disable httpd.service
查看httpd现在是否启动着service httpd statussystemctl status httpd.service (服务详细信息)
启动某服务/etc/init.d/httpd startsystemctl start httpd.service
停止某服务/etc/init.d/httpd stopsystemctl stop httpd.service
重启某服务/etc/init.d/httpd restartsystemctl restart httpd.service

相关推荐