semanage命令的安装

支持原创:https://blog.csdn.net/capricorn90/article/details/52577880

semanage命令的安装

实验环境:CentOS 7 Minimal Installation 64bit(1511) 
semanage命令是用来查询与修改SELinux默认目录的安全上下文。命令介绍这里推荐最为完整的在线中文版man手册 http://man.linuxde.net/semanage 
CentOS系统自带的chcon工具只能修改文件、目录等的文件类型和策略,没法对端口、消息接口和网络接口等进行管理,semanage能有效胜任SELinux的相关配置工做。python

[root@localhost ~]# semanage 
-bash: semanage: command not found 
[root@localhost ~]# yum install semanage 
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: mirror.bit.edu.cn 
* extras: mirrors.btte.net 
* updates: mirrors.btte.net 
No package semanage available. 
Error: Nothing to do 
[root@localhost ~]# yum provides semanage 
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: mirror.bit.edu.cn 
* extras: mirrors.btte.net 
* updates: mirrors.btte.net 
policycoreutils-python-2.2.5-20.el7.x86_64 : SELinux policy core python utilities 
Repo : base 
Matched from: 
Filename : /usr/sbin/semanagelinux

安装,这里直接使用tab键补全功能能够方便的找到要安装的包。tab补全功能参考http://blog.csdn.net/capricorn90/article/details/52558280安全

[root@localhost ~]# yum -y install policycoreutils-python.x86_64bash

命令经常使用格式网络

#管理登陆linux的用户和SELinux局限的用户之间的映射ide

semanage login [-S store] -{a|d|m|l|n|D} [-sr] login_name | %groupname工具

#管理策略模块spa

semanage module [-S store] -{a|d|l} [-m [–enable | –disable] ] module_name.net

管理网络端口类型定义orm

semanage port [-S store] -{a|d|m|l|n|D} [-tr] [-p proto] port | port_range

相关文章
相关标签/搜索