2017年8月20日星期日

CentOS 7常用命令

CentOS 7很多命令较CentOS 6有很大的改变,总结了部分自己可能会用到的,比如启动,关闭,重启,设置自启动等等。

这里以nginx为例:

任务旧指令新指令
自动启动chkconfig nginx onsystemctl enable nginx.service
不自动启动chkconfig nginx offsystemctl disable nginx.service
检查服务状态service nginx statussystemctl status nginx.service
显示所有服务chkconfig --listsystemctl list-units --type=service
启动服务service nginx startsystemctl start nginx.service
停止服务service nginx stopsystemctl stop nginx.service
重启服务service nginx restartsystemctl restart nginx.service
如非注明,mifia的Blogger文章均为原创。转载请注明来自mifia的Blogger和链接。

本文地址: