CentOS 6和CentOS 7管理系统服务的区别
2017-07-24 15:18
281 查看
管理系统服务 | CentOS 6 | CentOS 7(firewalld.service可简写成firewalldhttpd.service可简写成httpd) |
关闭防火墙 | # service iptables stop | # systemctl stop firewalld.service |
禁止防火墙开机自启 | # chkconfig iptables off | # systemctl disable firewalld.service |
查看防火墙是否运行 | # service iptables status | # firewall-cmd --state |
暂时关闭SELinux | # setenforce 0 | |
禁止SELinux开机自启(永久关闭SELinux) | # vim /etc/selinux/config --> SELINUX=disabled # reboot | |
查看SELinux状态 | # getenforce | |
启动httpd服务 | # service httpd start | # systemctl start httpd.service |
停止httpd服务 | # service httpd stop | # systemctl stop httpd.service |
重启httpd服务 | # service httpd restart | # systemctl restart httpd.service |
条件式重启httpd服务(服务之前已经启动-->重启服务之前没有启动-->不做任何操作) | # service httpd condrestart# service httpd try-restart | # systemctl condrestart httpd.service# systemctl try-restart httpd.service |
重载httpd服务 | # service httpd reload | # systemctl reload httpd.service |
重载或重启httpd服务(服务支持重载-->重载服务不支持重载-->重启) | 无 | # systemctl reload-or-restart httpd.service |
重载或条件式重启httpd服务(服务支持重载-->重载服务不支持重载且之前已经启动-->重启服务不支持重载且之前没有启动-->不做任何操作) | 无 | # systemctl reload-or-try-restart httpd.service |
查看httpd服务是否运行 | # service httpd status | # systemctl is-active httpd.service# systemctl status httpd.service |
设定httpd服务开机自启 | # chkconfig httpd on | # systemctl enable httpd.service |
禁止httpd服务开机自启 | # chkconfig httpd off | # systemctl disable httpd.service |
查看httpd服务是否开机自启 | # chkconfig --list httpd | # systemctl is-enabled httpd.service# systemctl status httpd.service |
列出所有正在运行的服务 | 无 | # systemctl list-units --type service |
列出所有服务的开机自启状态 | # chkconfig --list | # systemctl list-unit-files --type service |
禁止设定httpd服务开机自启(禁用# systemctl enable httpd.service) | 无 | # systemctl mask httpd.service |
取消禁止设定httpd服务开机自启(恢复# systemctl enable httpd.service) | 无 | # systemctl unmask httpd.service |
查看httpd服务的依赖关系 | 无 | # systemctl list-dependencies httpd.service |
结束所有httpd进程 | # killall httpd | # systemctl kill httpd |
相关文章推荐
- CentOS 6和CentOS 7的系统服务管理
- CentOS 6,7系统服务管理
- CentOS 7系统服务管理工具systemctl介绍
- Android系统Surface机制的SurfaceFlinger服务对帧缓冲区(Frame Buffer)的管理分析
- CentOS6优化——开机自启动服务管理
- 中服医院OA系统为医院规范办公管理,提高医疗服务质量
- 配置管理系统和整体的变化对系统有什么区别和联系
- Android系统Surface机制的SurfaceFlinger服务对帧缓冲区(Frame Buffer)的管理分析
- 禅道管理系统 linux centos 安装
- Centos 7 添加自定义系统服务的一些笔记
- CentOS 6.5系统搭建SVN服务
- CentOS远程系统管理之VNC
- CentOS 6.5系统服务详解
- 实战CentOS系统部署Hadoop集群服务
- CentOS7系统操作httpd服务 - 开机启动/重启/查看状态
- Centos 6.5上Apache + PAM + SVN服务安装配置(使用本地系统用户认证)
- CentOS系统如何设置APACHE和MYSQL服务开机自动运行
- 系统集成项目管理之信息系统服务管理
- sc.exe 命令行管理系统服务工具
- Asp.Net Core 项目实战之权限管理系统(4) 依赖注入、仓储、服务的多项目分层实现