随笔分类 -  Linux

CentOS7
摘要:# 安装环境 CentOS Linux release 7.8.2003 (Core) # 下载yum源 wget http://mirrors.ustc.edu.cn/mysql-repo/mysql57-community-release-el7-8.noarch.rpm rpm -ivh my 阅读全文
posted @ 2021-05-22 09:39 LeoShi2020 阅读(27) 评论(0) 推荐(0)
摘要:[root@vue ~]# rpm -qa | grep MariaDB MariaDB-compat-10.3.22-1.el7.centos.x86_64 MariaDB-common-10.3.22-1.el7.centos.x86_64 [root@vue ~]# rpm -e --node 阅读全文
posted @ 2021-05-22 09:23 LeoShi2020 阅读(784) 评论(0) 推荐(0)
摘要:快速扫描存货主机 # nmap -sP --min-hostgroup 1024 --min-parallelism 1024 192.168.0.1/24 列表显示 # nmap -sP --min-hostgroup 1024 --min-parallelism 1024 192.168.0.1 阅读全文
posted @ 2021-04-28 22:51 LeoShi2020 阅读(325) 评论(0) 推荐(0)
摘要:安装 yum install -y p7zip 压缩 7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on <压缩后的文件名>.7z <目标文件> 解压 7za x elasticsearch.7z END 阅读全文
posted @ 2020-11-04 00:34 LeoShi2020 阅读(218) 评论(0) 推荐(0)
摘要:Linux系统安全 我们一般不会使用root账户去操作我们系统,root在Linux中有至高无上的权利 我们一般会开通一个普通用户的权限并赋予sudo的权限 普通用户在操作系统时可临时提权 创建普通用户 # 创建用户 useradd -m -s /bin/bash dbuser # 修改密码 pas 阅读全文
posted @ 2020-09-27 22:52 LeoShi2020 阅读(6840) 评论(0) 推荐(0)
摘要:tar常用命令: 主选项: -x 从档案文件中释放文件。 -c 创建新的档案文件。如果用户想备份一个目录或是一些文件,就要选择这个选项。 -r 把要存档的文件追加到档案文件的末尾。例如用户已经做好备份文件,又发现还有一个目录或 是一些文件忘 记备份了,这时可以使用该选项,将忘记的目录或文件追加到备份 阅读全文
posted @ 2020-09-18 17:47 LeoShi2020 阅读(774) 评论(0) 推荐(0)
摘要:交换机管理 登录账号密码很长输入很不方便 cat > tl.sh <<'EOF' #!/usr/bin/expect #set passwd "12345678\n" set timeout 20 # 外部传递参数 set host [lindex $argv 0] spawn telnet $ho 阅读全文
posted @ 2020-09-16 10:56 LeoShi2020 阅读(196) 评论(0) 推荐(0)
摘要:# 正常卸载报错 [root@DB1 ~]# umount /mnt/iscsi umount: /mnt/iscsi: target is busy. (In some cases useful info about processes that use the device is found b 阅读全文
posted @ 2020-09-08 14:16 LeoShi2020 阅读(612) 评论(0) 推荐(0)
摘要:# 需要删除 -filename= [root@DB1 iscis]# ls -li total 0 67 drw 3 root root 17 Sep 6 22:35 -filename= [root@DB1 iscis]# find . -inum 67 | xargs rm -rf [root 阅读全文
posted @ 2020-09-07 10:10 LeoShi2020 阅读(633) 评论(0) 推荐(0)
摘要:报错 [root@node-3 dev]# lsblk lsblk: dm-3:获取设备路径失败 lsblk: dm-3:获取设备路径失败 查看映射信息并删除 [root@node-3 dev]# dmsetup ls ceph--adb6548e--8602--44c9--9ba7--234795 阅读全文
posted @ 2020-09-02 20:56 LeoShi2020 阅读(1963) 评论(1) 推荐(0)
摘要:删除sdc [root@node-3 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 20G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 19G 0 part ├─cento 阅读全文
posted @ 2020-09-02 20:54 LeoShi2020 阅读(1648) 评论(0) 推荐(0)
摘要:for i in {1..276} do var=`echo $i|awk '{printf("%04d\n",$0)}'` shell="rm -rf sysbackup.${var}.zip" echo $shell $shell done END 阅读全文
posted @ 2020-08-31 09:04 LeoShi2020 阅读(235) 评论(0) 推荐(0)
摘要:echo 3 > /proc/sys/vm/drop_caches [root@worker1 ~]# free total used free shared buff/cache available Mem: 8173856 1026588 226660 52052 6920608 6782868 阅读全文
posted @ 2020-08-23 22:22 LeoShi2020 阅读(604) 评论(0) 推荐(0)
摘要:1.1 安装NFS-Server 操作命令 yum install -y nfs-u* 1.2 创建目录 操作命令 mkdir /nfs 1.3 启动服务 操作命令 systemctl enable nfs-server --now 1.4 修改配置文件 配置文件 cat >/etc/exports 阅读全文
posted @ 2020-08-18 09:15 LeoShi2020 阅读(233) 评论(0) 推荐(0)
摘要:关闭linux命令屏幕保护 操作命令 setterm -blank 0 END 阅读全文
posted @ 2020-08-14 11:23 LeoShi2020 阅读(1069) 评论(0) 推荐(0)
摘要:修改配置文件 vi /etc/yum.conf # 增加超时为5秒 timeout=5 END 阅读全文
posted @ 2020-08-14 10:25 LeoShi2020 阅读(2784) 评论(0) 推荐(0)
摘要:命令 作用 D 删除到行位 r 替换字符 END 阅读全文
posted @ 2020-08-13 15:58 LeoShi2020 阅读(196) 评论(0) 推荐(0)
摘要:\cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak sed -i '/UseDNS/cUseDNS no' /etc/ssh/sshd_config sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentica 阅读全文
posted @ 2020-08-05 07:47 LeoShi2020 阅读(187) 评论(0) 推荐(0)
摘要:vi config/config.php # 添加如下这行 'allow_local_remote_servers' => true, END 阅读全文
posted @ 2020-07-27 16:24 LeoShi2020 阅读(2658) 评论(0) 推荐(0)
摘要:CentOS Linux release 7.8.2003 (Core) yum -y install deltarpm END 阅读全文
posted @ 2020-07-13 23:30 LeoShi2020 阅读(1540) 评论(0) 推荐(0)