autoDevops,CI,CD
Linux命令之passwd、chpasswd批量修改密码(1).命令passwdpasswd [-k] [-l] [-u [-f]] [-d] [-e] [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-S] [--stdin] [username]  passwd程序用于更新用户的身份验证令牌(口令/密码)。此任务是通过调用Linux-PAM和Libuser API实现的。实际上,它将自身初始化为Linux-PAM的”passwd”服务,并利用配置的密码模块进行身份验证,然后更新用户的密码。1)选项12345678910111213-k,--keep 此选项仅用于更新过期的身份验证令牌(口令/密码);用户希望保留没有过期的身份验证令牌(口令/密码)-l,--lock 此选项用于锁定指定账户的密码,仅适用于root用户。通过将加密密码呈现为无效字符串(通过在加密字符串前加上!)来执行锁定。  注意:该账户未完全锁定——用户仍可通过其他身份验证方式登录,例如ssh公钥身份验证。使用”chage –E 0 user(这里面是零)”命令代替完全账户锁定--stdin 此选项用于指示passwd应从标准输入读取新密码,标准输入可以是管道(|)-u,--unlock 这与-l选项相反——它通过删除字首!来解锁账户密码。一样仅适应于root用户。默认情况下,passwd将拒绝创建无密码账户(它不会解锁只有!...
CentOS7/RHEL7最小化安装系统并制作openssh8.4p1的RPM安装包使用rpmbuild将tar包打成rpm包,不喜欢编译升级的,使用RPM升级就方便多了。1,安装依赖环境[root@centos7-31 ~]#  yum install rpm-build zlib-devel openssl-devel gcc perl-devel pam-devel unzip -y[root@centos7-31 ~]#  mkdir -p /root/rpmbuild/{SOURCES,SPECS}[root@centos7-31 ~]#  cd /root/rpmbuild/SOURCES/2,下载相关软件。[root@centos7-31 ~]#  wget https://src.fedoraproject.org/repo/pkgs/openssh/x11-ssh-askpass-1.2.4.1.tar.gz/8f2e41f3f7eaa8543a2440454637f3c3/x11-ssh-askpass-1.2.4.1.tar.gz[root@centos7-31 ~]#    tar zxvf openssh-8.4p1.tar.gz[root@centos7-31 ~]#   cd openssh-8.4p1/3,修改源码包的ssh配置文件,以免系统中安装RPM后还要再修改配置文件。[root@centos7-31 ~]#   vi sshd_configPermitRootLogin yesPasswordAuthentication yes4,将pam信息写到源码包中。[root@centos7-31 ~]#    cat /etc/pam.d/sshd > contrib/redhat/sshd.pam[root@centos7-31 ~]# &nbs...
本文介绍使用Firewall进行端口转发。如果安装过iptables的机器,需要先停止,然后设置开机禁用:[root@localhost ~]#servcie iptables stop --临时关闭防火墙 [root@localhost ~]#chkconfig iptables off --永久关闭防火墙特别注意:请勿使用yum remove iptables来卸载防火墙,因为iptables附带了很多依赖文件,这样卸载会导致机器SSH丢失。安装firewall防火墙yum install firewalld -y设置开机自启systemctl enable --now firewalld开启路由转发echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf sysctl -p开启防火墙的流量伪装功能firewall-cmd --zone=public --permanent --add-masquerade开启TCP流量转发firewall-cmd --add-forward-port=port=8080:proto=tcp:toaddr=2.2.2.2:toport=666 --permanent #将本地8080端口,转发到2.2.2.2的tcp666端口。开启UDP流量转发firewall-cmd --add-forward-port=port=8080:proto=udp:toaddr=2.2.2.2:toport=666 --permanent #将本地8080端口,转发到2.2.2.2的udp666端口。重载配置文件firewall-cmd --reload如何开放端口?开启TCP流量端口firewall-cmd --add-port=8080/tcp --per...
Centos8/RHEL8系统使用nmcli与nmtui配置bridge桥接网卡 在系统中编译安装了qemu5.4-RISCV最新版本,但是模拟机网卡不能访问外网, 在eth1网卡上面配置一个桥接网卡,这样就比较方面了。 1,查看网卡设备信息。 [root@k8s-30 ~]# nmcli device showGENERAL.DEVICE:                         eth0GENERAL.TYPE:                           ethernetGENERAL.HWADDR:                         00:15:5D:5D:94:01GENERAL.MTU:                            1500GENERAL.STATE:      &n...
最近在帮一个研究生弄一个虚拟化环境下的基于Innodb的日志文件的读写优化的实验,实验的具体详细内容就不说了,其中有一个步骤需要将MySQL的日志文件放置在一块单独的硬盘里面,这块硬盘要么是ext2,要么是ext4,ext4的性能据说比前面的ext系列的要高,所以选择了ext4。但是ext4具备有日志的功能,如果开启了这个日志功能的话,到时又会有多个虚拟机同时跑,那么这个ext4的日志功能会对我们的实验数据产生一定的影响,并且我们在实验中并不需要到这个日志功能,所以需要将这个日志功能关闭。具体如下步骤:  下面的vda便是虚拟机所导入的硬盘,我们先对这个硬盘格式化一下: [root@centos7_vm_1 ~]# mkfs.ext4 /dev/vda  mke2fs 1.42.9 (28-Dec-2013) Filesystem label=OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks65536 inodes, 262144 blocks13107 blocks (5.00%) reserved for the super user First data block=1Maximum filesystem ...
 
0

服务器RAID硬盘故障处理

发表者:admin分类:Devops2020-08-18 09:05:30 阅读[2257]
1. 写在前头2. 简介3. 硬盘故障处理流程3.1 故障定位及分析3.1.1 名词解释3.1.2 收集日志及阵列穿孔3.1.3 查看物理磁盘信息3.1.4 物理磁盘故障分析3.1.5 查看磁盘阵列信息3.1.6 磁盘阵列故障分析3.2 业务定位3.3 设备定位3.4 故障处理标签:PC服务器, 硬盘故障1. 写在前头一直以来都想写一些关于服务器硬盘维护的文档,但是由于各种原因,就一直搁置了。而且还有一个原因,我这语文不及格呢,语言该怎么组织?还想着找度娘学习借鉴一下高人写的文档,可惜都没找到我想要的,好吧不多扯,进入正题吧2. 简介大数据时代,如何保证数据安全性,显得更加重要。从简单的定期备份,到备份系统、到灾备解决方案等等,都是为了确保数据安全。而不论何种方案,都必须将数据存放在底层的物理设备(硬盘、磁带等),今天我们主要讲服务器硬盘故障时该如何维护。3. 硬盘故障处理流程一直以来都在一线处理各类设备故障,我把硬盘的故障流程整理成如下五个步骤,四个都缺一不可。故障定位及分析业务定位设备定位故障处理3.1 故障定位及分析3.1.1 名词解释- DSA :IBM日志收集工具- DSET :DELL日志收集工具- TTY :硬盘日志收集工具- Slot Number&n...
服务器RAID硬盘与日志主要检测方法1:对于 Dell 的机器并且配备了 LSI 的 raid 卡,那么 Megacli 自带的命令是最直观最可靠的硬盘检测方法。 #/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall  以其中的一块硬盘为例。 Enclosure Device ID: 32  Slot Number: 2  Enclosure position: 0  Device Id: 2 //ID 号 Sequence Number: 2  Media Error Count: 0 // 如果 error 数值较多 , 那么需要更换硬盘 Other Error Count: 0  Predictive Failure Count: 0 // 可理解为预知性的错误 , 这个数值较多意味着硬盘即将坏 掉, 现场会黄绿灯交叉闪烁 Last Predictive Failure Event Seq Number: 0  PD Type: SAS  Raw Size: 136.732 GB [0x Sectors]  Non Coerced Size: 136.232 GB [0x Sectors]  Coerced Size: 136.125 GB [0x Sectors]  Firmware state: Online, Spun Up // 如 果 硬 盘 坏 了 那 么 会 出 现 Failed 或 者 是 unconfigured(bad) SAS Addres...
ubuntu18.04,ubuntu20.04 安装gnome-desktop桌面环境方法 Instructions Gnome Vanilla Installation on Ubuntu Gnome vanilla installation on Ubuntu 18.04 will leave you with a basic Gnome shell features and minimal pre-installed applications.To perform a vanilla installation of Gnome desktop execute the following linux command: sudo apt install gnome-session gdm3 ...
如何仅在 CentOS/RHEL 8 中使用 dnf 列出或安装安全更新问:是否可能限制 dnf 以便仅列出或安装安全更新?如何仅使用安全勘误表修补系统?本文介绍如何使用 CentOS/RHEL 8 上的 dnf 列出和安装安全更新。列出安全更新1. 列出有关已安装软件包的较新版本(默认) 的建议:# dnf updateinfo list --security或# dnf updateinfo list --security --available2. 要列出有关已安装软件包任何版本的建议:# dnf updateinfo list --security --all3. 要列出有关相同和较旧版本的已安装软件包的建议:# dnf updateinfo list --security --installed4. 根据严重性列出安全更新(严重、重要、中等、低):# dnf updateinfo list --security --sec-severity [Severity]安装安全更新1. 在更新中包括与安全相关的包:# dnf upgrade --security2. 在更新中包括修复给定咨询或建议所需的包:# dnf upgrade --advisory ELSA-xxxx-xxxx或# dnf upgrade --advisories ELSA-xxxx-xxxx,ELSA-yyyy-yyyy3....
How to add a Custom Script to systemd in CentOS/RHEL 7如何在CentOS / RHEL 7中将自定义脚本添加到systemdThe systemd facility replaces the older System-V initialization scripts from earlier releases. The systemd is an event-driven facility which allows non-dependent subsystems to be started, controlled, or stopped in parallel. Here we explain how to add a custom script to the systemd facility.1. Write And Debug The Custom ScriptTypically a systemd script is written as a shell script. Begin by writing your custom script using the normal conventions. We will call our script my-custom-script.sh and is straightforward:#!/bin/sh echo I am a custom script2. The script must be executableLets make the script executable:# chmod 0755 my-custom-script.sh3. Describe The Custom Script To systemdWith the script written and tested manually, the script is ready to be described to the systemd system. To do this, a [name].service file is needed. The syntax uses the INI format commonly used for configurat...
    总共67页,当前第7页 | 页数:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17