因为在集群中我们要保证时间的一致性特使用NTP来作为时间的同步服务,此操作登录到所有节点执行
初学者配置linux服务器时不成功,却没有头绪,那是因为在linux操作系统中默认开启了防火墙,SELinux也处于启动状态,一般状态为enforing。致使很多服务端口默认是关闭的。所以好多服务初学者明明配置文件正确,等验证时有时连ping也ping不通。建议初学者在未学到SELlinux与iptables之前,配置服务器把这两项都关掉。
原因1:/usr/bin/passwd 权限异常 正常情况下的权限: ls -l /usr/bin/passwd -rwsr-xr-x 1 root root 34392 2009-05-22 16:03 /usr/bin/passwd 修复命令: chown root:root /usr/bin/passwd chmod u=rwx,go=rx,u+s /usr/bin/passwd 原因2:SELinux 未关闭 2.1.查看SELinux状态 方法1
启动zabbix,提示报错 [root@hf-01 ~]# systemctl start zabbix-server Job for zabbix-server.service failed because a configured resource limit was exceeded. See "systemctl status zabbix-server.service" and "journalctl -xe" for details. [root@hf-01 ~]# systemctl stat
今天用docker容器做了个映射,在容器内部创建和修改文件的时候都提示没有权限,且创建文件时提示: touch: cannot touch ‘container.txt’: Permission denied
介绍 SELinux 是内置于 Linux 内核中的强制访问控制 (MAC) 执行器。它限制了可能对系统构成威胁的个别服务的权限。 没有 SELinux 的 CentOS 系统依赖于其所有特权软件应用程序的配置。单个错误配置可能会危及整个系统。 为什么禁用 SELinux 并非所有应用程序都支持 SELinux。因此,SELinux 可以在软件包的正常使用和安装过程中终止必要的进程。在这些情况下,我们建议你关闭此服务。 在 CentOS 上禁用 SELinux 的步骤 第 1 步:检查 SELinux 状态
关闭防火墙 #systemctl stop firewalld #systemctl disable firewalld
注:设置完新密码后,如果selinux开启需要执行 touch /.autorelabel,否则密码不生效。未开启selinux忽略此步骤。 我的selinux已经关闭,所以没有创建。
[resource] //共享名称 comment //共享描述 path //之前创建的共享文件夹的路径 public //公开共享,若为no则进行身份验证(只有当security = share 时此项才起作用) writable //为yes时可写入,不以只读方式共享当与read only发生冲突时,无视read only browseable //为yes时可浏览 guest ok //是否公开共享,若为否则进行身份验证(只有当security = share 时此项才起作用) valid users //制定合法samba用户 write list //指定可写入的Samba用户
通过学习和分享的过程,将自己工作中的问题和技术总结输出,希望菜鸟和老鸟都能通过自己的文章收获新的知识,并付诸实施。
在yum安装完keepalived之后,配置keepalived的配置文件 注意点 在master和backup的keepalived的配置文件中,网卡名字为当前机器的网卡名称 VIP的选择为 可用的一个ip,通常在做高可用,局域网环境比较多, 所以这个vip是和两台机器同网段的一个内网ip。 如果用在外网环境下,无所谓在不在一个网段,只要客户端能访问到。 停掉nginx服务,启动keepalived服务,会看到keepalived拉动nginx服务启动 若是无法启动失败,基本都是配置文件和脚本的问题,或
大家好,我是黄啊码,最近在手动安装mysql的时候遇到了一点问题,然后按照网友们的操作,没一次成功,最终在一位大佬的指导下,终于解决了,特地整理如下:
这一步可以参考我之前写的文章《如何在HP dl380 Gen9服务器上安装Redhat 7.2并配置软RAID》、《如何为Hadoop集群服务器绑定双万兆网卡》
/etc/passwd-、/etc/shadow-、/etc/group-和/etc/gshadow- , 这四个文件就是备份文件。当不小心删除了用户或密码信息文件时,可以从备份文件中找回信息。但是最后建立的用户没有在备份文件中)
| 导语 自从Redis未授权问题获取Linux系统root权限的攻击方法的披露后,由于其易用性,利用该问题入侵Linux服务进行挖矿、扫描等的黑客行为一直层出不穷;而在众多利用该问题入侵服务器进行黑产行为的案例中,其中就存在一类利用该问题进行挖矿并且会利用pnscan自动扫描感染其他机器;该类攻击一直存在,不过在近期又呈现数量增加的趋势,在最近捕获到多次,我们针对其做下具体的分析 一、 背景 自从Redis未授权问题获取Linux系统root权限的攻击方法的披露后,由于其易用性,利用该问题入侵Linux
在用户使用CVM的过程中,经常会出现访问外网不通的情况。外网不通的原因从平台到系统都有可能会出现,在排查的时候涉及的方面有很多。基于此,本文提供详细的排查思路帮助各位解决类似的问题。
https://miracle-1306318206.cos.ap-shanghai.myqcloud.com/public/gitblit-1.9.1.tar.gz
1.黑岩客户端 2.服务器启动所需资源 3.1核2G服务器一台(版本centos5.8)(记得开放全部端口)
在linux系统中密码的保存是非常重要的,在企业中的WEB集群环境中,进行统一的版本更新和配置文件的同步免密登录是非常重要的。在自动化运维,统一管理都是离不开Linux的免密登录。
CentOS 7 root密码的重置方式和CentOS 6完全不一样,以进入单用户模式修改root密码为例。
基地新到300台服务器,需要自实施安装CentOS7.6版本操作系统,选择使用PXE进行批量安装。
配置网络时,需要先使用dhcp,获取虚拟机网卡ip,然后再使用static的方式,配置网卡ip。如果直接使用dhcp的方式,可能会导致该ip无法使用,无法ping通。
2.创建私有仓库容器-d表示后台启动 docker run -d -p 5000:5000 -v /opt/data/registry:/var/lib/registry registry
安全增强型 Linux(Security-Enhanced Linux)简称 SELinux,它是 Linux 的一个安全子系统。SELinux 主要作用是最大限度地减小系统中服务进程可访问的资源(最小权限原则)。对资源的访问控制分为两类: DAC和MAC.
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新
第一步:安装samba服务 》yum install samba 第二步:启动samba服务 》systemctl start smb 查看samba的状态 》systemctl status smb 看到Active就说明在运行中了 第三步:关闭防火墙 》systemctl stop firewalld.service //停止服务 》systemctl disable firewalld.service //关闭开机启动 同时还有这一步 设置SELINUX=disabled(需要重启电脑) # vi /etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器。 第四步:需要添加一个用户来访问文件 》useradd lcd //添加用户 》passwd lcd //修改密码 创建samba用户 》smbpasswd -a lcd 第五步:修改samba的配置文件 》vi /etc/samba/smb.conf //进入配置文件 5.1将global中进行一下全局配置更改: workgroup = WORKGROUP//定义工作组,也就是windows中的工作组概念 security = user //安全认证方式采用user方式 ntlm auth = yes //否则windows7访问用户会认证失败 5.2在conf中添加新的用户配置(让4的配置生效) [lcd] path = /cloud/lcd //共享目录 browsable =yes writable = yes //目录可读可写 read only = no 修改后的smb.conf如下: [global] workgroup = WORKGROUP security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw ntlm auth = yes [homes] comment = Home Directories valid users = %S, %D%w%S browseable = No read only = No inherit acls = Yes [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [lcd] path = /cloud/lcd browsable =yes writable = yes read only = no 第六步:设置想要共享目录的文件权限 给共享目录添加写权限,这样可以从windows向linux中写入文件。比如我这里设置\home为共享目录,那在终端输入以下命令即可 chmod -R 777 /cloud/lcd (可写 w=4 可读 r=2 可执行 x=1 ) 第七步:重启samba服务 》systemctl restart smb
Nextcloud13.0.5:链接:https://pan.baidu.com/s/1-uR0eS4vSmgspnIv3wvImw
Openssh升级操作步骤(此方法仅供参考) 1 、开启telnet服务 未避免openssh升级失败,导致ssh无法连接,在升级前首先开启telnet服务。 首先要确定是否安装了telnet 修改配置文件vi /etc/xinetd.d/telnet disable=no (yes改为no) 有的机子不允许root直接登录telnet可在 默认情况不能用root身份登陆!!! 修改 /etc/securetty文件可以以root身份登陆 在tty11下加入 pts/0 pts/1 pts/2 pt
今天在CentOS7.4.1708上实践Docker挂载volume,一切按照正常流程进行操作,无论是创建目录、创建文件、还是查看、编辑主机上创建好的文件,都报“Permission denied”,具体如下:
yum -y install httpd-devel automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig pcre 我是直接运行的这个,没有用下面命令那些安装
版权声明:本文为耕耘实录原创文章,各大自媒体平台同步更新。欢迎转载,转载请注明出处,谢谢
在实际的项目开发中,大家经常使用的还是http连接的方式。下面我们为svn配置http访问。svn的http访问时依赖apache的dav_svn模块,然后赋予www-data访问权限,进行版本控制。
环境: 在centos 7上 自定义创建systemd管理的服务,在启动该服务的时候,无法启动。查看日志,只显示出
现在,我们的两块网卡都是在public区域中。下面我们来给public区域配置规则,让其允许某些服务被访问。
自从Android 4.4强制开启SELinux以后,在开发中我们经常会遇到avc denied的问题,为了方便开发调试我们会将SELinux关闭,那么本章将带领读者怎么临时和永久关闭Android的SELinux。
这个功能是CentOS系统中的安全策略(大概了解了一下,没有深入了解这个selinux)
在linux环境下执行某些程序时,偶尔会遇到来一个关于selinux的强制模式不可执行的情况,这种情况下需要关闭selinux或者将enforcing改为permissive模式后才能进行执行。selinux是Linux内核中提供的强制访问控制(MAC)系统,下面就对selinux的几种模式及其转换进行总结: selinux的启动、关闭与查看 1)目前selinux支持三种模式,分别如下: •enforcing:强制模式,代表selinux运作中,且已经正确的开始限制 domain/type 了; •pe
1、查看[root@dev-server~]#getenforceDisabled[root@dev-server~]#/usr/sbin/sestatus-vSELinuxsta
随着企业账户资源分散管理难度越来越大,很多企业选择集中资源管理,或者跨账户资源迁移,实现降本增效,那么介绍使用在线迁移控制台将源服务器上的系统、应用程序等从自建机房(IDC)或云平台等源环境迁移至腾讯云的操作步骤。可方便实现企业上云、跨云平台迁移、跨账号/区域迁移或部署混合云等业务需求,持续更新。。。
前面已经讲了很多关于 Zabbix 安装的内容,相信对 Zabbix 已经有了一定的了解了,今天来讲讲如何监控网络设备。
Linux防火墙-netfilter selinux临时关闭 setenforce 0 selinux永久关闭 vi /etc/selinux/config centos7之前使用netfilter防火墙 centos7开始使用firewalld防火墙 关闭firewalld开启netfilter方法 systemctl stop firewalld systemctl disable firewalled yum install -y iptables-services systemctl enable
1.查看SELinux状态 1.1 getenforce getenforce 命令是单词get(获取)和enforce(执行)连写,可查看selinux状态,与setenforce命令相反。 setenforce 命令则是单词set(设置)和enforce(执行)连写,用于设置selinux防火墙状态,如: setenforce 0用于关闭selinux防火墙,但重启后失效
Ceph支持两种客户端挂载方式:使用Linux内核支持的mount命令进行的挂载方式。使用用户空间文件系统FUSE(Filesystem in Userspace)进行的网络磁盘挂载方式。
分区方式一般有三种 第一种:数据不是很重要 /boot(系统的引导分区): 系统引导的信息/软件 系统的内核 200M swap( 交换分区): 为了避免系统内存用光了导致系统 宕机 如果系统内存不够了,系统会临时使用swap(交换分区) 大小:如果你的内存小于8G 则swap 给内存的1.5倍 以后使用的时候给512M 如果你的内存大于8G 则swap 给8G即可。 / (根分区): 剩余多少给多少 第二种:数据很重要 /boot(系统的引导分区): 系统引导的信息/软件 系统的内核 200
可怜我那 1 核 2 G 的服务器,又弱又小,却还免除不了被拉去当矿工的命运,实在是惨啊惨。
如果觉得 Packages 方式安装比较复杂,可以尝试 Docker 版本的安装方式,相比 Docker 方式其实还有更简单的,就是 Appliance 方式,这个方式的原理其实就是下载一个集成 Zabbix 的镜像,大家可以自行尝试。
领取专属 10元无门槛券
手把手带您无忧上云