safe-rm
safe-rm 看名字就能知道是什么了,安全的rm命令 比rm命令增加的功能,skip Directory or file 这里使用的二进制包 safe-rm.tar.gzhttps://alist.linjiangyu.com/d/Linux/safe-rm-0.12.tar.gz # tar xf safe-rm.tar.gz# cd safe-rm-0.12# chown root. safe-rm# mv safe-rm /usr/local/bin/rm# vim /etc/profileexport PATH=/usr/local/bin:$PATH# source /etc/profile 编写一下禁止删除的文件或文件夹 # touch /opt/t1 // 测试文件# vim /etc/safe-rm.conf // 这个文件是自己创建的, ...
ecy
网页视频素材 Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video ta ...
sesync实时监控同步文件
sesync的实时同步 sesync2https://alist.linjiangyu.com/d/Linux/sersync2.5.4_64bit_binary_stable_final.tar.gz 也要结合rsync和Inotify一起使用 IP HOSTNAME 192.168.222.160 master 192.168.222.161 backup backup的rsyncd的配置 # yum install -y rsync# vim /etc/rsyncd.confuid = rootgid = root#use chroot = yesmax connections = 0pid file = /var/run/rsyncd.pidexclude = lost+found/#transfer logging = yes#timeout = 900#ignore nonreadable = yes#dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2reverse lo ...
hadoop+spark+zookeeper分布式集群搭建
hadoop+spark+zookeeper分布式集群部署1.环境准备 环境的准备基于我写的初始化脚本,自用7.x系列的CentOS,老版本的就支持CentOS/Redhat6,7,8但是有点不完善,需要可以邮箱或者博客留言。 os\ip hostname block centos7.9 192.168.222.226 master rsmanager,datanode,namenode.snamenode,nmanager centos7.9 192.168.222.227 node1 snamenode,nmnager,datanode centos7.9 192.168.222.228 node2 datanode,nmanager # git clone https://github.com/linjiangyu2/K.git //可能会拉不下来,多拉几次就下来了,因为托管代码的服务器是国外的# cd K# cat README.md //不会使用的要看一下这个文件,了解脚本需要输入的配置# ./ksh //依次输入你自己的配置,第一 ...
Web应用之Tomcat
Tomcat二进制安装安装jdk 这里使用的二进制包 jdk-8u212-linux-x64.tar.gzhttps://alist.linjiangyu.com/d/Linux/jdk-8u212-linux-x64.tar.gz # tar xf jdk-8u212-linux-x64.tar.gz# mv jdk-8u212-linux /usr/local/jdk 这里使用的二进制包 apache-tomcat-9.0.65-src.tar.gzhttps://alist.linjiangyu.com/d/Linux/apache-tomcat-9.0.65-src.tar.gztomcat-native-1.2.23-src.tar.gzhttps://alist.linjiangyu.com/d/Linux/tomcat-native-1.2.23-src.tar.gz ...
redis持久化存储切换
分享一个坑 redis数据库的持久化存储有snapshot和aof两种 如果是使用过snapshot之后已经有了存储数据然后要开启aof的话,因为aof比snapshot机制的rdb文件的优先级高,redis默认会去加载第一次生成的aof的空文件,会导致全部数据未能被加载,然后如果这个时候你使用了save或bgsave或者触发了配置中的save机制,那就直接把当前的空数据库覆盖到rdb文件中了,那就可以准备收拾行李连夜坐船转到老挝,缅甸,柬埔寨了 解决方法: 命令行的动态更改,命令行的修改不会和重启服务一般去更新你的数据库,所以在你动态更改为aof机制后再执行重启会连同以前的数据一同备份进aof文件,当然动态更改后你还是需要把配置文件中的参数更改 # redis-cli 127.0.0.1> config set appendonly yesOK# vim redis.confappendonly yes# systemctl restart redis.service
好用的软件
大锤の博客从锤老师那里搬运的 开源软件(持续更新)RSS软件 https://github.com/yang991178/fluent-reader ssh工具windterm https://github.com/kingToolbox/WindTerm 代码片段管理工具massCode https://github.com/massCodeIO/massCode 远程桌面rustdesk https://github.com/rustdesk/rustdesk 局域网网盘alist 在linux发行版搭建服务器,挂载各大网盘或者本地文件,有好看的uihttps://github.com/alist-org/alist 洛雪 懂得都懂 https://github.com/lyswhut/lx-music-desktop 其他软件 卡饭输入法 https://input.kfsafe.cn/ Obsidian(markdown笔记) 这个软件一直在更新就不放链接了https://obsidian.md/ 获取软件下载地址(蓝奏云) windtermhttps:/ ...
xfsdump+xfsrestore.md
xfsdump+xfsrestoreexample # lsblksdb 8:16 0 20G 0 disk# mkdir /{t1,t2,t3} -v# mkfs.xfs -f /dev/sdb# mount /dev/sdb /t1# cp -a /etc/. /t1/开始备份/dev/sdb设备的数据# xfsdump -l 0 -L etc -M etc-dump -f /t2/etc.dump /t1 //完整备份/t1文件系统的数据到/t2/etc.dump# rm -rf /t1# xfsrestore -f /t2/etc.dump /t3 //把文件中的数据备份到/t3目录中去
Btrfs
btrfs1.特性 可由多个块设备组合成一个btrfs文件系统,多物理卷支持 支持RAID(0,1,5,6,10),dup(冗余),single(单盘)和热更新 写时复制更新机制(Cow): 复制、更新及替换指针,而非就地更改源文件 支持元数据校验码机制,一旦文件计算后发现受损会自动尝试修复 支持创建子卷(子卷本质是在btrfs文件系统中由btrfs创建的一个文件夹,可以单独被拿出来挂载到别的某一个目录中) 快照,还支持快照的快照(可以实现快照的增量备份) 透明压缩(无需用户参与) 支持ext4的文件系统转换为btrfs 2.btrfs 2.1 mkfs.btrfs-L label# mkfs.btrfs -L btr1 /dev/sdf /dev/sdg //把/dev/sdf,sdg格式化成btrfs系统并打上btr1的标签-d [type] raid0,1,5,6,10,single-m <profile> raid0,1,5,6,10,single,dup(冗余)-O <feature> ...
pxe-cobbler
Pxe-Cobbler环境 IP HOSTNAME ROLE dhcp t1 dhcp dhcp t2 c1 192.168.222.30,dhcp(192.168.222.201) t3 c2 一、dhcp dhcp是基于rarp,和arp相反,arp是通过对IP来识别物理网卡mac地址,而dhcp是通过识别客户端机器的物理网卡mac地址来判断给予客户端的IP地址 监听在67端口 Server: 67/UDP Client: 68/UDP arp: address resolving protocol IP —> MAC rarp: reverse arp MAC —> IP 工作流程: (1) Client: dhcp discover(2) Server: dhcp offer (IP/mask,gw...) lease time: 租约期限(3) Client: dhcp request(4) Sever: dhcp ack续租: 50%,75%,87.5%, 单播给服务: dhcp request ...





























