【转自mos文章】检查selinux状态的方法

检查selinux状态的方法:

来源于:

How to Check whether SELinux is Enabled or Disabled (文档 ID 432988.1)

selinux 有3种模式:

Enforcing (or known as enabled), Disabled or Permissive.

Permissive mode loads the SELinux software, but doesn‘t enforce the rules, only logging is performed.

可以使用如下的命令来检查selinux的状态:

[[email protected] ~]# uname -a
Linux servera 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# sestatus
SELinux status:                 disabled
[[email protected] ~]# getenforce
Disabled
[[email protected] ~]#

若是放在程序中判断selinux的状态,请使用如下的命令:

[[email protected] ~]# /usr/sbin/selinuxenabled; if [ $? -ne 0 ]; then echo "DISABLED"; else echo "ENABLED"; fi
DISABLED
时间: 2024-08-08 10:29:16

【转自mos文章】检查selinux状态的方法的相关文章

Android中检查、监听电量和充电状态的方法

Android中检查.监听电量和充电状态的方法 这篇文章主要介绍了Android中检查.监听电量和充电状态的方法,如判断当前充电状态.监听充电状态的改变.判断当前剩余电量等,需要的朋友可以参考下 当你在更改后台更新频率来减少这些更新对电池寿命的影响时,检查当前电量和充电状态是一个好的开始. 电池寿命通过剩余电量和充电状态来影响应用更新的执行.当用交流电充电时,执行更新操作对设备的影响是微不足道的,所以在大多数案例里,你可以把更新频率调到最快.如果设备不在充电,降低更新频率可以帮助延长电池寿命.

【翻译自mos文章】11gR2 OUI 在 PREREQUISITE CHECKS 时 hang住

翻译自mos文章:11gR2 OUI 在 PREREQUISITE CHECKS 时 hang住 适用于: Oracle Server - Enterprise Edition - Version 8.0.6.0 to 11.2.0.2.0 [Release 8.0.6 to 11.2] Information in this document applies to any platform. This can occur on any Unix/Linux platform 症状: 11gR2

【翻译自mos文章】OGG add Supplemental Logging 时失败,报错为 块损坏(Block Corruption)

OGG add Supplemental Logging 时失败,报错为 块损坏(Block Corruption) 来源于: Add Supplemental Logging Fails Due To Block Corruption (文档 ID 1468322.1) 适用于: Oracle Server - Enterprise Edition - Version 10.2.0.5 to 12cBETA1 [Release 10.2 to 12.1] Information in this

【翻译自mos文章】修改被 DB Control 监控的db (10g and 11g)中 dbsnmp密码的方法

修改被 DB Control 监控的db (10g and 11g)中 dbsnmp密码的方法 参考原文: How to Change DBSNMP Password in Database 10g and 11g Monitored by DB Control (Doc ID 259387.1) 适用于: Enterprise Manager for Oracle Database - Version 10.1.0.4 to 11.2.0.3 [Release 10.1 to 11.2] In

查看 SELinux状态及关闭SELinux

查看SELinux状态: 1./usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态 SELinux status:                 enabled 2.getenforce                 ##也可以用这个命令检查 关闭SELinux: 1.临时关闭(不用重启机器): setenforce 0                  ##设置SELinux 成为permissive模式 ##seten

【翻译自mos文章】在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log)

在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log) 参考原文: Retrieve deleted files on Unix / Linux using File Descriptors (Doc ID 444749.1) 适用于: Oracle Database - Enterprise Edition - Version 8.1.7.0 to 11.2.0.3 [Release 8.1.7 to 11.2] Linu

【翻译自mos文章】job 不能自动执行的解决方法

job 不能自动执行的解决方法 参考原文: Jobs do not execute automatically (Doc ID 309945.1) 适用于: Oracle Server - Enterprise Edition - Version: 9.2.0.4 This problem can occur on any platform. 症状: Job 不能自动执行. JOB_QUEUE_PROCESSES 已经设置为大于0的值 你已经检查过 sga 变量kkjsre 的值,该值为0 例子

【翻译自mos文章】rman 备份时报:ORA-02396: exceeded maximum idle time

rman 备份时报:ORA-02396: exceeded maximum idle time 参考原文: RMAN backup faling with ORA-02396: exceeded maximum idle time, please connect again (Doc ID 1446182.1) 适用于: Oracle Server - Enterprise Edition - Version 11.2.0.1 and later Information in this docu

【翻译自mos文章】使用aum( Automatic Undo Management) 时遇到 ORA-01555错误--- 原因和解决方案。

使用aum( Automatic Undo Management) 时遇到 ORA-01555错误--- 原因和解决方案. 参考原文: ORA-01555 Using Automatic Undo Management - Causes and Solutions (Doc ID 269814.1) 适用于: Oracle Database - Enterprise Edition - Version 9.0.1.0 and later Information in this document