摘要: 首先要说明的是,不要使用which来进行判断,理由如下: 1、which非SHELL的内置命令,用起来比内置命令的开销大,并且非内置命令会依赖平台的实现,不同平台的实现可能不同。 type type type is a shell builtin type command command is a 阅读全文
posted @ 2020-10-24 14:56 helloweifa 阅读(156) 评论(0) 推荐(0)
摘要: /dev/shm是物理内存的入口,大小为物理内存的一半,参考说明:https://www.cnblogs.com/tinywan/p/10550356.html 在/dev/shm下发现下面的文件 -rw 1 root root 1052672 Jul 8 09:53 qb-pve2-respons 阅读全文
posted @ 2020-10-23 23:00 helloweifa 阅读(209) 评论(0) 推荐(0)
摘要: losetup 例子1:虚拟一个linux目录进行磁盘空间容量的限制 1) dd if=/dev/zero off=/root/video.img bs=1G count=200 此时生成了大小为200G的/root/vedio.img文件(file /root/vedio.img),这个文件需要和 阅读全文
posted @ 2020-10-23 21:00 helloweifa 阅读(410) 评论(0) 推荐(0)
摘要: 硬件--向日葵控控 使用场景:硬件不方便安装 向日葵软件 使用方法: 1)接线方法:将向日葵控控 接上usb接口 ,vga输入(被控制的设备的vga输出 接到 控控的vga输入),vga输出(可以接显示屏直接在本地输出被控制设备的vga画面,前提是控控的vga输入有输入信号)。 2)手机端安装好向日 阅读全文
posted @ 2020-10-23 16:55 helloweifa 阅读(1140) 评论(0) 推荐(0)
摘要: 修改pve banner 参考http://blog.jason.tools/2019/05/proxmox-ve-ip-banner.html /etc/systemd/system/getty.target.wants/pvebanner.service 内容如下: [Unit] Descrip 阅读全文
posted @ 2020-10-20 13:26 helloweifa 阅读(1409) 评论(0) 推荐(0)
摘要: hacked的表象:top发现cpu占用100%,centos7的web应用访问缓慢 以下是零零散散的后续记录: 通过lastb发现massive的ssh可疑登陆,抓其中的典型,毙掉,如下: firewall-cmd --permanent --zone=public --add-rich-rule 阅读全文
posted @ 2020-10-20 13:25 helloweifa 阅读(972) 评论(0) 推荐(0)
摘要: 第1种情况: 将本机的端口转发到本机的另外不同的端口上 使用场景:比如将本机的18006端口转发 到 本机的8006端口上,8006端口(真正服务所在的监听端口)只允许本地localhost访问,而18006端口可以在外部访问时,这种方式很管用。 iptables -t nat -I PREROUT 阅读全文
posted @ 2020-10-20 11:53 helloweifa 阅读(2378) 评论(0) 推荐(1)
摘要: 参考:Proxmox VE 5的SPICE控制台和虚拟机声音设置 http://www.jeepxie.net/article/327681.html 阅读全文
posted @ 2020-09-29 17:25 helloweifa 阅读(1831) 评论(0) 推荐(0)
摘要: 参考文档:https://www.webat.top/post/14.html 无状态虚机: 1、操作: 基于kvm的虚机,可以在配置文件中直接加上参数-snapshot qm set 100 -args -snapshot或直接在配置文件中加入-args: snapshot 2、验证:2种方式,先 阅读全文
posted @ 2020-09-29 16:19 helloweifa 阅读(331) 评论(0) 推荐(0)
摘要: 1、可以在grep中加入--color=auto来将过滤条件以字体颜色来显示 2、 阅读全文
posted @ 2020-09-29 15:56 helloweifa 阅读(110) 评论(0) 推荐(0)