1.在Linux /etc/目录下存在的rc.local 脚本,是在系统初始化脚本执行完成后在执行,你可以安全的在里面添加你想在系统启动之后执行的脚本。
在rc.local 脚本添加了如下东东/usr/sbin/setenforce 0。
下面是查到复制过来的东西。
SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统。NSA是在Linux社区的帮助下开发了一种访问控制体系,
/usr/sbin/setenforce 0 #使SELinux工作模式变成permissive模式
/usr/sbin/setenforce 1 #使SELinux工作模式变成enforcing模式
添加到系统默认启动脚本里面
echo "/usr/sbin/setenforce 0" >> /etc/rc.local
这样就可以实时控制SELinux的启用和不启用了。
三个参数介绍介绍
-
enforcing — The SELinux security policy is enforced.
-
permissive — The SELinux system prints warnings but does not enforce policy.
-
disabled — SELinux is fully disabled. SELinux hooks are disengaged from the kernel and the pseudo-file system is unregistered.
简单翻译:
enforcing模式:强制组织。
permissive模式:SELinux系统输出警告,但是不强制阻止程序运行。
Linux redhat 的相关网口配置
linux里IP、子网掩码、网关 redhat 的系统一般是在 /etc/sysconfig/network-scripts/ifcfg-eth0 里