RHEL6—关闭 SELinux
来源:互联网 发布:删除三星预装软件 编辑:程序博客网 时间:2024/06/08 09:23
之所以写这篇文章是因为最近重新装了系统,然后换了个 RHEL6 来玩玩!
可是谁知道配置的时候还是遇到了点问题!
尤其是 Samba、NFS、TFTP 等等的配置都是学习嵌入式 Linux 驱动程序的必备品,,如果不关闭掉 SELinux,那么这些东西都不能正常运行(关于如何配置这些应该都是很了解的吧,不知道的 Tell 我,我告诉你啊,呵呵)!
关闭 SELinux 成了必需品的先前条件!
如果想对 SELinux 有进一步的了解,可以查看百度百科(个人感觉 SELinux 就是一个像防火墙似的,只不过安全系数大而已,(*^__^*) 嘻嘻……)
好了,废话不多说了,关闭 SELinux 在 RHEL5 中只要选中 Firewall configeration 中的 SELinux 中的 Disable 就哦了!
但是在 RHEL6 中就要用专门的语言来了!
1)getenforce
得到当前的SELINUX值
[root@python bin]# getenforce
Permissive
2)setenforce
更改当前的SELINUX值 ,后面可以跟 enforcing,permissive 或者 1, 0。
[root@python bin]# setenforce permissive
3)sestatus
显示当前的 SELinux的信息
[root@python bin]# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 20
Policy from config file: refpolicy
Process contexts:
Current context: user_u:user_r:user_t
Init context: system_u:system_r:init_t
/sbin/mingetty system_u:system_r:getty_t
/usr/sbin/sshd system_u:system_r:sshd_t
File contexts:
Controlling term: user_u:object_r:user_devpts_t
/etc/passwd system_u:object_r:etc_t
/etc/shadow system_u:object_r:shadow_t
/bin/bash system_u:object_r:shell_exec_t
/bin/login system_u:object_r:login_exec_t
/bin/sh system_u:object_r:bin_t -> system_u:object_r:shell_exec_t
/sbin/agetty system_u:object_r:getty_exec_t
/sbin/init system_u:object_r:init_exec_t
/sbin/mingetty system_u:object_r:getty_exec_t
看看我虚拟机的设置吧:
- RHEL6—关闭 SELinux
- RHEL6关闭Selinux、防火墙
- 关闭SeLinux
- Selinux 关闭
- 关闭selinux
- 关闭selinux
- 关闭selinux
- 关闭selinux
- 关闭Selinux
- 关闭SELinux
- 关闭selinux
- 关闭SELinux
- 关闭SELINUX
- 关闭selinux
- 关闭selinux
- 关闭SELinux
- 关闭selinux
- 关闭SELINUX
- ACE主动对象模式
- CPU地址空间
- flex glow
- 十六周任务(二)对成绩分数排序
- A Guide To MSDN Integration (Visual Studio 6.0)
- RHEL6—关闭 SELinux
- Listview控件使用技巧大汇总
- 流媒体基本要点简述:如何在H264数据中获取PTS?
- [ARM笔记]设备IO端口和IO内存的访问
- 将UIColor转换为RGB值
- tomcat 部署自定义MBean 之二 解决加载冲突的问题
- ACE进程管理
- IO端口和IO内存
- 开源License学习总结