selinux

DRBD分布式块设备复制

ⅰ亾dé卋堺 提交于 2020-11-27 09:47:29
作者: 独笔孤行@TaoCloud DRBD(Distributed Replicated Block Device)是一个用软件实现的、无共享的、服务器之间镜像块设备内容的存储复制解决方案。可以简单的理解为网络RAID。 DRBD的核心功能通过Linux的内核实现,最接近系统的IO栈,DRBD的位置处于文件系统以下,比文件系统更加靠近操作系统内核及IO栈。 一、准备环境 节点 主机名 IP地址 磁盘 操作系统 节点1 node1 172.16.201.53 sda,sdb centos7.6 节点2 node2 172.16.201.54 sda,sdb centos7.6 关闭防火墙和selinux #2节点都需要配置 systemctl stop firewalld systemctl disable firewalld setenforce 0 sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config 配置epel源 #2节点都需要配置 yum install epel-release 二、安装drbd 如果yum源中有完整的drbd软件,可直接通过yum进行安装,如果yum无法找到部分软件包,可通过编译安装。以下2中方法二选一即可。 1.yum安装drbd yum install drbd

cups 报错一例: Unable to open listen socket for address [v1.::1]:631

牧云@^-^@ 提交于 2020-11-26 11:28:01
最近遇到cups 无法连接成功,查/var/log/cups下的error_log,有看到如下出错信息: Unable to open listen socket for address [v1.::1]:631 - Permission denied. 经反复查,是由于apparmor这个类似centos的selinux安全限制引起。卸载,或用aa-complaint /etc/apparmor.d/下的cups关闭即可。 来源: oschina 链接: https://my.oschina.net/u/2503743/blog/4748853

大数据环境安装前准备

断了今生、忘了曾经 提交于 2020-11-26 01:03:16
修改ip地址 vi /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO="static" IPADDR=192.168.52.100 NETMASK=255.255.255.0 GATEWAY=192.168.52.1 DNS1=8.8.8.8 关闭防火墙 systemctl stop firewalld systemctl disable firewalld 关闭selinux vi /etc/selinux/config #关闭selinux SELINUX=disabled 修改主机名 vi /etc/hostname node01 改主机名与IP地址映射 192.168.46.100 node01 配置时区 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 同步时间 yum -y install ntpdate crontab -e */1 * * * * /usr/sbin/ntpdate time1.aliyun.com 配置jdk [root@localhost ~]# vi .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/

SELinux安装及启动、关闭和查看状态方法详解

一世执手 提交于 2020-11-26 00:54:39
在 CentOS 6.x 中,SELinux 是整合到 Linux 的内核当中的,并且是启动的,所以不需要单独安装。不过,现在不再像在 CentOS 5.x 中,所有的 SELinux 工具都是已经安装和配置好的,在 CentOS 6.x 中,虽然 SELinux 的主程序默认已经安装,但是很多的 SELinux 管理工具需要我们手工安装。 SELinux 安装命令如下: [root @localhost ~]# yum -y install setroubleshoot [root @localhost ~]# yum -y install setools-console 这两条命令要想正确运行,需要搭建正确的 yum 源。这两个软件包在安装时会依赖安装一系列的软件包,这些软件包中包含了 SELinux 的常用工具。 SELinux的启动管理 在 CentOS 6.x 中,setup 工具已经不能支持 SELinux 的调整了,只能通过 SELinux 配置文件来进行 SELinux 的启动与关闭。 我们打开 SELinux 配置文件来查看一下,如下: [root @localhost ~]# vi /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can

从零开始搭建 Zabbix 4.0

末鹿安然 提交于 2020-11-25 14:38:36
系统版本 LInux:CentOS 7 硬件: 内存,最小128MB; 磁盘,最小256MB; CPU,可能需要大量CPU资源; 升级系统组件到最新版本 sudo yum -y update 更新的太多了我就不全部截图了 关闭 SELinux setenforce 0 永久关闭: vi /etc/selinux/config 按字母键 " i " 进行编辑,将 SELINUX=enforcing 改为 SELINUX=disabled 设置后需要重启才能生效 重启 检测selinux是否关闭,Disabled 为关闭 reboot 关闭防火墙 systemctl stop firewalld.service firewall-cmd --state 查看默认防火墙状态,关闭后显示not running,开启后显示running 临时关闭 firewall systemctl stop firewalld.service 禁止firewall开机启动 systemctl disable firewalld.service 搭建LAMP环境 安装所需所有软体仓库 yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php

安装testlink时,出现”testlink/gui/templates_c、testlink/logs、testlink/upload_area不可写‘解决办法

烂漫一生 提交于 2020-11-25 05:35:58
在Testlink安装到最后,'...目录是否可写(由于用户运行webserver进程)’过程出错,如下图所示 1.首先想到/var/www/html/testlink/gui/templates_c、/var/www/html/testlink/logs、/var/www/html/testlink/upload_area这些目录没有写权限 所以先去给赋了些权限 chmod -R 777 /var/www/html/testlink/gui/ templates_c chmod -R 777 /var/www/html/testlink/ logs chmod -R 777 /var/www/html/testlink/upload_area 然鹅!!!所有目录都有了写权限,仍然没有解决这个问题,又陷入了深深的思考中..... 2. 最终,经过探索,原来是SELinux阻止/usr/sbin/httpd 对/var/www/html/testlink/gui/templates_c进行写操作,以前只知道有SELlinx,最多也是接触过SELinx的关闭.所以最简单的方法就是关闭SELinux。 那如果不关闭SELinux又该怎样做呢? SELinux极大的增强了Linux系统的安全性,能将用户权限关在笼子里,如httpd服务,因此能有效的防范0-day类的攻击。 a

centos7安装docker及运行springboot项目

好久不见. 提交于 2020-11-22 07:45:48
一.准备 1.检查linux版本:>=centos7 linux内核3.8以上 uname -r 2.卸载旧版本(之前没装过就不用执行了): yum remove docker docker-common docker-selinux docker-engine yum remove docker-ce rm -rf /var/lib/docker 3.更新yum包 yum update 如果报出[Errno 256] No more mirrors to try错误,则解决方案为:执行命令yum clean all 清理客户端yum源配置的缓存,重新运行之前的安装命令进行安装 二.安装依赖软件包 yum install -y yum-utils device-mapper-persistent-data lvm2 三.设置yum包源 yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo(中央仓库) yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo(阿里仓库)(推荐) 四.更新yum软件索引 yum makecache fast 五

如何关闭 CentOS7 SELinux

喜夏-厌秋 提交于 2020-11-21 04:30:43
首先检查SELinux状态。如下所示: #开启状态 #SELinux status: enabled [root@localhost ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 31 [root@localhost ~]# sestatus -v SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy

CentOS7关闭SELINUX

為{幸葍}努か 提交于 2020-11-21 04:30:01
安全增强型Linux(Security-Enhanced Linux)简称SELinux,它是一个 Linux 内核模块,也是Linux的一个安全子系统。为了避免安装过程出现各种错误,建议关闭,有如下两种关闭方法: 1)临时关闭(不建议使用) [root@hadoop101 ~]# setenforce 0 但是这种方式只对当次启动有效,重启机器后会失效。 2)永久关闭(建议使用) 修改配置文件/etc/selinux/config [root@hadoop101 ~]# vim /etc/selinux/config 将SELINUX=enforcing 改为SELINUX=disabled # This file controls the state of SELinux on the system. # SELINUX = can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. #SELINUX = enforcing SELINUX = disabled

因为错误关闭Selinux导致CentOS7启动失败(进度条卡死,图形界面加载卡死)

孤人 提交于 2020-11-21 04:21:51
我在CentOS7上安装oracle,非常麻烦,搞半天终于安装完毕,当天我没有发现任何问题,第二天上班打开虚拟机CentOS7就进不去了。 我想起来之前关闭了Selinux,把系统名称改成了redhat,以及一系列未知操作,当我进不了系统,我觉得任何操作都可能导致我启动失败,变得疑神疑鬼。 问了同事,同事让我重装,我可是舍不得Hadoop和oracle环境啊,装了好久呢。此时我快照也没有,因为昨天我为了装oracle给磁盘扩容,必须要删除快照才可以扩容。我只能硬着头皮去解决了。 症状: 表现形式是进度条卡死,我天真的以为等一会就好了,做梦哦。 有图形界面的会卡在图形界面加载 VMWare重启系统,选择第一个,狂按e,输出控制台 我们发现有报错Failed to start Login Service 然而这个错误不是根源,我在百度谷歌搜索良久,没有得到很好的解决方案。最后参考一位博主的方案解决该问题。 解决方案: https://blog.csdn.net/qq_38591756/article/details/84256473?tdsourcetag=s_pctim_aiomsg 参考: https://blog.csdn.net/qq_38591756/article/details/84256473?tdsourcetag=s_pctim_aiomsg https://www