CentOS 7常用命令

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

这里以nginx为例:

任务 旧指令 新指令
自动启动 chkconfig nginx on systemctl enable nginx.service
不自动启动 chkconfig nginx off systemctl disable nginx.service
检查服务状态 service httpd status systemctl status nginx.service (服务详细信息)
检查服务状态 systemctl is-active nginx.service (是否 Active)
显示所有服务 chkconfig --list systemctl list-units --type=service
启动服务 service nginx start systemctl start nginx.service
停止服务 service nginx stop systemctl stop nginx.service
重启服务 service nginx restart systemctl restart nginx.service
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • CentOS7 常用命令集合 常用命令 文件与目录操作 命令解析cd /home进入 ‘/home’ 目录cd ....
    小波同学阅读 5,403评论 0 1
  • 查看当前所有用户~]# w 踢出某用户~]# pkill -KILL -t pts/0其中最后一个参数tty/1可...
    xeklr阅读 2,934评论 0 1
  • 1.描述计算机的组成及其功能 (一)计算机的组成 1.CPU 2.CPU风扇 3.BIOS 4.内存 5.硬盘 6...
    whamai阅读 5,410评论 0 1
  • 一、配置防火墙,开启80端口、3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为i...
    ArleyDu阅读 6,333评论 0 0
  • 你好,坏记性 2018-04-06柚子Hi柚子读书 开始了各类整理,发现很多写了一部分的文字。忘了当初为何要写。也...
    Hi柚子读书阅读 1,800评论 0 2