更新换代----systemctl命令取代chkconfig和service
来源:互联网 发布:java获取访问者外网ip 编辑:程序博客网 时间:2024/06/15 14:06
systemctl命令是系统服务管理器指令,它实际上将 service 和chkconfig 这两个命令组合到一起。
任务旧指令新指令使某服务自动启动chkconfig --level 3 httpd onsystemctl enable httpd.service使某服务不自动启动chkconfig --level 3 httpd offsystemctl disable httpd.service检查服务状态service httpd statussystemctl status httpd.service (服务详细信息) systemctl is-active httpd.service (仅显示是否 Active)显示所有已启动的服务chkconfig --listsystemctl list-units --type=service启动某服务service httpd startsystemctl start httpd.service停止某服务service httpd stopsystemctl stop httpd.service重启某服务service httpd restartsystemctl restart httpd.service实例
1.启动nfs服务
systemctl start nfs-server.service
2.设置开机自启动
systemctl enable nfs-server.service
3.停止开机自启动
systemctl disable nfs-server.service
4.查看服务当前状态
systemctl status nfs-server.service
5.重新启动某服务
systemctl restart nfs-server.service
6.查看所有已启动的服务
systemctl list -units --type=service
开启防火墙22端口
iptables -I INPUT -p tcp --dport 22 -j accept
如果仍然有问题,就可能是SELinux导致的
关闭SElinux:
修改/etc/selinux/config
文件中的SELINUX=””
为disabled,然后重启。
彻底关闭防火墙:
sudo systemctl status firewalld.servicesudo systemctl stop firewalld.service sudo systemctl disable firewalld.service
阅读全文
0 0
- 更新换代----systemctl命令取代chkconfig和service
- centos7 systemctl取代service和chkconfig来实现系统管理
- Centos7下的systemctl命令与service和chkconfig
- Centos7下的systemctl命令与service和chkconfig
- Centos7下的systemctl命令与service和chkconfig
- systemctl-chkconfig-service
- chkconfig,systemctl命令用法
- systemctl替代service与chkconfig
- Linux中systemctl替代service与chkconfig
- linux命令之service和chkconfig
- systemctl 与 chkconfig 开机自启动命令
- RHEL 7 中 systemctl 的用法(替代service 和 chkconfig)
- RHEL 7 中 systemctl 的用法(替代service 和 chkconfig)
- centos7 开始 使用systemctl工具来管理服务程序,包括了service和chkconfig
- linux中daemon的改动之systemctl替代chkconfig和service
- Linux 设置程序开机自启动 (命令systemctl 和 chkconfig用法区别比较)
- Linux 设置程序开机自启动 (命令systemctl 和 chkconfig用法区别比较)
- Linux 设置程序开机自启动 (命令systemctl 和 chkconfig用法区别比较)
- Sublime text 3安装时,add to explorer context menu是什么意思?
- D-S envidence theory(DS 证据理论)的基本概念和推理过程
- SQL注入
- SessionID的本质
- STM32-UCOS学习笔记1
- 更新换代----systemctl命令取代chkconfig和service
- Xcode重构功能怎么用我全告诉你
- XCTF-REVERSE-指南
- java中校验正则表达式
- Unity5.6.x 上使用 插件 SE Natural Bloom Dirty Lens
- es6 之 Generator(二)
- 数据标准化/归一化normalization
- linux cannot find autoconf
- TextView一行最多显示8个 其他的字符自动滚动