1. systemctl服务控制:
++ systemctl,系统控制器,用来控制Linux系统的开关机,服务资源运行状态
++直接执行systemctl可以列出管理的系统资源,其中包括各种系统服务
++控制服务当前运行状态:通过systemctl start|stop|restart|status 服务名
++控制服务开机自启状态: systemctl enable|disable 服务名.....【--now】
++--now 代表服务立马启动
2. firewall,SELIinux安全开关:
++ 防火墙状态的控制:
关防火墙:ststemctl disable firewall --now
开防火墙:ststemctl enable firewall --now
++SELinux的作用:内核的一套保护机制,通过内核启动参数或者启动配置来控制
++如何关闭SELinux机制:(三种状态------Enforcing强制保护,Permissive宽松模式,Disabled禁用)
# vi /etc/selinux/config
SELinux=Permissive ==》重启后生效
#setenforce 0|1 ==》立即变成宽松|强制模式
#getenforce ==》查看结果