随笔:120 文章:0 评论:7 阅读: 35156

05 2024 档案

 
centos获取所有用户的定时任务,没有定时任务的就不打印了
摘要:cat check_crontab.sh #!/bin/bash users=`cat /etc/passwd|awk -F: '{print $1}'` for u in $users do # echo $u crontab -l -u $u >>/dev/null 2>&1 && echo " 阅读全文
posted @ 2024-05-20 11:43 lzjasd 阅读(10) 评论(0) 推荐(0) 编辑
expect3
摘要:vim ip_pass.txt 192.168.40.131 1234 192.168.40.132 1234 192.168.40.133 1234 cat ssh5.exp #!/usr/bin/expect set ipaddr [lindex $argv 0] set name "root" 阅读全文
posted @ 2024-05-19 09:49 lzjasd 阅读(5) 评论(0) 推荐(0) 编辑
expect2
摘要:cat ssh4.exp #!/usr/bin/expect #set timeout 40 set a1 [lindex $argv 1] set a2 [lindex $argv 2] set a0 [lindex $argv 0] spawn echo $a1 $a2 # expect eof 阅读全文
posted @ 2024-05-19 09:42 lzjasd 阅读(4) 评论(0) 推荐(0) 编辑
expect1
摘要:#!/usr/bin/expect set ipaddr "192.168.40.132" set name "root" set passwd "1234" set timeout 30 spawn ssh-keygen expect { "continue connecting (yes/no) 阅读全文
posted @ 2024-05-19 08:41 lzjasd 阅读(10) 评论(0) 推荐(0) 编辑
OpenSSH 9.7
摘要:OpenSSH 9.7 参考文档 https://www.cnblogs.com/williamzheng/p/18057229 https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/ https://www.linuxcool.com/sshd 阅读全文
posted @ 2024-05-18 01:50 lzjasd 阅读(161) 评论(0) 推荐(0) 编辑
md5-sha1-哈希算法使用方法
摘要:md5-sha1-哈希算法使用方法 常见的哈希算法有:MD5 和 SHA1 MD5 ,SHA1 的区别: MD5的全称是Message-Digest Algorithm 5(信息-摘要算法)。MD5 算法的哈希值大小为 128 位。是一种不可逆的算法。 SHA1的全称是Secure Hash Alg 阅读全文
posted @ 2024-05-15 16:08 lzjasd 阅读(130) 评论(0) 推荐(0) 编辑
su和sudo不需要输入密码
摘要:Linux 中使普通用户使用Sudo不需要输入密码 [root@hcss-ecs-c16f ~]# useradd lzj [root@hcss-ecs-c16f ~]# echo 1234|passwd --stdin lzj 更改用户 lzj 的密码 。 passwd:所有的身份验证令牌已经成功 阅读全文
posted @ 2024-05-15 08:54 lzjasd 阅读(299) 评论(0) 推荐(0) 编辑
des3对称加密
摘要:加密 openssl enc -e -des3 -a -in /etc/passwd -out /passwd.des3 解密 openssl enc -d -des3 -a -in /passwd.des3 -out /root/passwd options are -in <file> inpu 阅读全文
posted @ 2024-05-15 05:41 lzjasd 阅读(10) 评论(0) 推荐(0) 编辑
使用RSA算法进行非对称加密
摘要:[root@hcss-ecs-c16f ~]# gpg --list-key /root/.gnupg/pubring.gpg pub 2048R/0DE16E33 2024-05-14 uid lzj12 (lzj12) <l@163.com> sub 2048R/56D087AB 2024-05 阅读全文
posted @ 2024-05-15 05:31 lzjasd 阅读(33) 评论(0) 推荐(0) 编辑
gpg生成密钥对
摘要:[root@hcss-ecs-c16f ~]# gpg --gen-key gpg (GnuPG) 2.0.22; Copyright (C) 2013 Free Software Foundation, Inc. This is free software: you are free to cha 阅读全文
posted @ 2024-05-15 05:28 lzjasd 阅读(48) 评论(0) 推荐(0) 编辑
nginx
摘要:nginx https://nginx.org/ https://nginx.org/en/download.html wget https://nginx.org/download/nginx-1.26.0.tar.gz tar -zxvf nginx-1.26.0.tar.gz Nginx编译前 阅读全文
posted @ 2024-05-14 02:40 lzjasd 阅读(17) 评论(0) 推荐(0) 编辑
varnish yum安装
摘要:varnish yum安装 https://packagecloud.io/varnishcache/varnish60lts/packages/el/7/varnish-6.0.13-1.el7.x86_64.rpm?distro_version_id=140 repo : curl -s htt 阅读全文
posted @ 2024-05-13 00:20 lzjasd 阅读(25) 评论(0) 推荐(0) 编辑
varnish源码编译以及简单配置
摘要:varnish安装 系统centos7 ip 192.168.40.131 禁止透明大页 echo never > /sys/kernel/mm/transparent_hugepage/enabled 减少最大堆栈大小 ulimit -s 256 安装nginx yum list | grep ^ 阅读全文
posted @ 2024-05-12 21:17 lzjasd 阅读(18) 评论(0) 推荐(0) 编辑
redis-sentinel
摘要:首先搭建1主两从的redis主从服务 mkdir -pv /etc/redis/ mkdir -pv /redis/db{2,3} cd /etc/redis/ redis 主配置不变 vim /usr/local/redis-6.2.6/bin/redis.conf requirepass "lz 阅读全文
posted @ 2024-05-10 10:46 lzjasd 阅读(16) 评论(0) 推荐(0) 编辑
redis持久化
摘要:redis持久化 rdb aof vim redis.conf protected-mode yes port 6379 tcp-backlog 511 timeout 0 tcp-keepalive 300 daemonize yes pidfile /var/run/redis_6379.pid 阅读全文
posted @ 2024-05-10 08:32 lzjasd 阅读(6) 评论(0) 推荐(0) 编辑
redis主从
摘要:redis主从 host1: master 192.168.40.130 host2: slave 192.168.40.132https://download.redis.io/releases/redis-6.2.6.tar.gz 编译: mkdir -p /usr/local/redis-6. 阅读全文
posted @ 2024-05-10 05:25 lzjasd 阅读(4) 评论(0) 推荐(0) 编辑
udev 在应用服务器上使用udev规则为target创建固定名字的软链接
摘要:systemctl stop multipathd yum remove device-mapper-multipath -y 查看共享磁盘设备的uu_id [root@host3 ~]# /usr/lib/udev/scsi_id -g -u /dev/sdb 360000000000000000 阅读全文
posted @ 2024-05-08 04:23 lzjasd 阅读(29) 评论(0) 推荐(0) 编辑
iscsi多路径
摘要:环境 服务端: host1 192.168.40.130 192.168.211.130 客户端 host2 192.168.40.131 192.168.211.131 host3 192.168.40.132 192.168.211.132 echo "nameserver 114.114.11 阅读全文
posted @ 2024-05-08 04:05 lzjasd 阅读(17) 评论(0) 推荐(0) 编辑
实战: 配置一个IP SAN 存储服务器
摘要:IP-SAN的运行模式:C/S模式,工作端口3260 服务端:host1 客户端:host2,host3 base环境配置 hostnamectl set-hostname host1 hostnamectl set-hostname host2 hostnamectl set-hostname h 阅读全文
posted @ 2024-05-07 07:42 lzjasd 阅读(188) 评论(0) 推荐(0) 编辑
ssh小技巧:找不到匹配的host key算法
摘要:vim /etc/ssh/sshd_config #找不到匹配的host key算法 HostKeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa # 允许root用户登陆 PermitRootLogin yes PasswordAuthent 阅读全文
posted @ 2024-05-07 07:30 lzjasd 阅读(2208) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示