03 2023 档案
摘要:例如: # ifconfig eth4:0 10.154.X.X netmask 255.255.255.224 up
阅读全文
摘要:- name: add libin sudo config hosts: task gather_facts: no tasks: - name: jiesuo shell: pam_tally2 -u libin -r - name: one user: name: "{{ item.user }
阅读全文
摘要:创建一个命名空间test [root@cka-master ~]# kubectl create ns test 创建pod为web-test并指定命名空间test [root@cka-master ~]# kubectl create deployment web-test --image=ngi
阅读全文
摘要:[root@libin3]# cat libin.yml - hosts: task gather_facts: no tasks: - name: fetch shell: | for i in `awk -F':' '{if( 1 }' /etc/passwd |
阅读全文
摘要:[root@libin3]# cat libin.yml - hosts: task gather_facts: no tasks: - name: fetch shell: | for i in `awk -F':' '{if( 1 }' /etc/passwd `;d
阅读全文
摘要:[root@nf5-1000 ~]# awk -F ":" '{print $1}' /etc/passwd | xargs -I {} crontab -l -u {} [root@nf5-1000 ~]# cat /etc/passwd | cut -f 1 -d : |xargs -I {}
阅读全文
摘要:说明: 可以配合ansible进行批量实现 例1: 判断ntp是否启动 systemctl is-active ntpd.service &>/dev/null; if [ $? == 0 ]; then echo "ntp-ok"; else echo "ntp-no" | xargs ;fi s
阅读全文
摘要:问题:Linux kernel: hpet1: lost 18 rtc interrupts 报错 解决方案:在 GRUB_CMDLINE_LINUX_DEFAULT="quiet hpet=disable" 添加hpet=disable # cat /etc/default/grub GRUB_T
阅读全文
摘要:内网yum源案例: 问题现象: 解决方案: 将enable=1 修改为enabled=0 问题即可解决 [root@localhost cloudman]# vi /etc/yum/pluginconf.d/license-manager.conf [main]enabled=0
阅读全文
摘要:1、过滤一个文件信息时,不要空格和#开头 # grep -Ev '^ ' /etc/ntp.conf | grep "server" | xargs grep -Ev '^#|^$' /etc/chrony.conf | grep "server" |
阅读全文
摘要:1、查找/下 以.out结尾的文件 # find /* -type f -name "*.out" 2、查看 / 下所有 的含有 zookeeper的文件 # find /* -name "zookeeper" 3、不查看 / 下所有 的含有 zookeeper的文件 # find /* ! -na
阅读全文
摘要:# crontab -l# 查看现有的时间服务器* * * * * chronyc sources -v >>/tmp/time.log 2>&1# 查看时间服务器状态#* * * * * chronyc sourcestats -v >>/tmp/time.log 2>&1# 每隔2秒,使用 nt
阅读全文