15 WordPress 安装 Google Authenticator登录验证 [教程: https://www.freehao123.com/google-authenticator/] 后台 – Plugins – add new – Google Authenticator By Henrik Schack – Install Now – 安装成功 [安装] Plugins – 选中全部 [包含Google Authenticator] – Activate – Apply [激活] Users – Your Profile – Google Authenticator Settings – Active 打勾 [用户有被要求二步验证] APP Store 下载 google authenticator – 打开 google […]
Author Archives: Administrator
7-1 打开phpMyAdmin提示 配置文件权限错误,不应任何用户都能修改 原因phpMyAdmin目录权限过高,设置了777访问权限 7-2 解决办法 12cd /home/wwwroot/default/ sudo chmod -R 755 phpmyadmin 7-3 重启sshd服务 1systemctl restart sshd.service
『精品』如何在phpMyAdmin中禁用root登录? 1https://www.howtoing.com/how-to-disable-root-login-in-phpmyadmin 1. 创建test账号,赋予全所权限 2. 禁用 root 登陆 12cd /home/wwwroot/phpmyadmin vi config.inc.php 加到这行下面 $cfg[‘Servers’][$i][‘AllowNoPassword’] = false; 12$cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’; $cfg[‘Servers’][$i][‘AllowRoot’] = FALSE;
37 sersync命令详解 123官方: https://github.com/wsgzao/sersync https://blog.51cto.com/gm100861/949094 https://www.jianshu.com/p/05ead9e7638d 备注: 传输大量小文件: 用 rsync + inotify-tools 传输 传输大量大文件: 用 rsync + inotify-tools + sersync 传输 1. 安装配置好 Rsync : https://www.versca.cn/?p=1245 [3-5步骤就好] 2. 安装配置好 Inotify-tools : https://www.versca.cn/?p=1309 [5-2步骤就好] 3. 安装配置好 Sersync 1-1. 安装 sersync 123wget https://linuxsoft.versca.cn/sersync/sersync2.5.4_64bit_binary_stable_final.tar.gz //下载 https://linuxsoft.versca.cn/sersync/sersync2.5.4_64bit_binary_stable_final.tar.gz tar -zxvf sersync2.5.4_64bit_binary_stable_final.tar.gz //解压 sersync2.5.4_64bit_binary_stable_final.tar.gz mv GNU-Linux-x86/ /usr/local/sersync/ //移动 2-1. […]
36. inotifywatch命令详解 1https://www.cnblogs.com/ilanni/p/4231235.html inotifywatch使用详解 除了inotifywatit命令之外,inotify-tools还有一个命令inotifywatch。 inotifywatch主要用于收集被监控的文件系统统计数据,包括每个inotify事件发生多少次等信息 1-1. 查看 inotifywatch 位置 1/usr/local/inotify/bin/inotifywatch 2-1. 帮助 – 简写 1-h 2-2. 帮助 – 全写 1–help 3-1. 排除不需要监视的文件,可以是相对路径,也可以是绝对路径 – 简写 1@ <file> 3-1-1. 忽略对 /home/wwwroot/default/tongbu/ignore/ 目录的事件监听 1@ ‘/home/wwwroot/default/tongbu/ignore/’ 3-2. 正则匹配需要排除的文件,大小写敏感 – 全写 1–exclude <pattern> 3-2-1. 忽略对 /home/wwwroot/default/tongbu/ignore/ 目录的事件监听 1–exclude ‘/home/wwwroot/default/tongbu/ignore/’ 4-2. 与–exclude相同,正则匹配需要排除的文件,忽略大小写 1–excludei <pattern> 5-2. 从文件读取需要监视的文件或排除的文件,一个文件一行,排除的文件以@开头 1–fromfile <file> 6-1. 监视一个目录下的所有子目录 […]
35. inotifywait命令详解 1https://www.cnblogs.com/martinzhang/p/4126907.html 1-1. 查看 inotifywait 位置 1/usr/local/inotify/bin/inotifywait 2-1. 帮助 – 简写 1-h 2-2. 帮助 – 全写 1–help 3-1. 排除要监控的内容–这个内容排除在监控之外 – 简写 1@ <file> 3-1-1. 忽略对 /home/wwwroot/default/tongbu/ignore/ 目录的事件监听 1@ ‘/home/wwwroot/default/tongbu/ignore/’ 3-2. 排除要监控的内容–这个内容排除在监控之外 – 全写 1–exclude <pattern> 3-2-1. 忽略对 /home/wwwroot/default/tongbu/ignore/ 目录的事件监听 1–exclude ‘/home/wwwroot/default/tongbu/ignore/’ 4-2. 与–exclude相同,区别是此选项正则表达式忽略大小写 1–excludei <pattern> 5-1. 表示始终保持事件监听状态 (如果不加此选项,则监听到一次后便退出) – 简写 1-m 5-2. 表示始终保持事件监听状态 (如果不加此选项,则监听到一次后便退出) […]
34 inotify安装并与rsync集成实现数据实时同步更新 12[https://www.cnblogs.com/ilanni/p/4231235.html] [https://www.cnblogs.com/gpfeisoft/p/6112847.html] 1. 首先确保两台服务器rsync可以同步. 步骤可以参考: https://www.versca.cn/?p=1245 [到步骤3-5 就可以了] 1234kvm12 192.168.122.37 kvm12 192.168.122.73 rsync -vzrtopg –progress /home/wwwroot/default/tongbu/ root@192.168.122.73::web –password-file=/etc/rsyncd.secrets 2. 检测OS是否支持inotify 123cat /etc/system-release //查看centos版本 uname -r […]
33 rsync 实战训练 12http://www.ruanyifeng.com/blog/2020/08/rsync.html http://blog.chinaunix.net/uid-10362953-id-2961174.html 1. -r 参数 1-1. 源文件source 同步到 目标文件destination ,递归同步 1rsync -r source destination 1-2. 如果有多个文件(source1,source2)或目录需要同步 1rsync -r source1 source2 destination 2. -a 参数 2-1. -a参数可以替代-r , 而且-a 更常用 1rsync -a source destination 目标目录destination如果不存在,rsync 会自动创建。 执行上面的命令后,源目录source被完整地复制到了目标目录destination下面,即形成了destination/source的目录结构 2-2. 如果只想同步源目录source里面的内容到目标目录destination,则需要在源目录后面加上斜杠 1rsync -a source/ destination 3. -n 参数 3-1. 如果不确定 rsync 执行后会产生什么结果,可以先用-n或–dry-run参数模拟执行的结果 1rsync -an source/ […]
32 rsync 命令全面详解 – 下 1http://www.senra.me/rsync-documents-parameters-description-and-usage-examples/ 37-1. 添加一个文件过滤规则 – 简写 1-f 37-2. 添加一个文件过滤规则 – 全写 1–filter=RULE 38-1. 等于 –filter=’dir-merge /.rsync-filter’ — 简写 1-F 38-2. 等于 -F — 全写 1–filter=’dir-merge /.rsync-filter’ 38-3-1. 指定排除不需要传输的文件模式。 1–exclude=PATTERN 38-3-2. 排除 文件夹 verscacomphpmyadmin 1–exclude=’verscacomphpmyadmin’ 38-4. 排除FILE中指定模式的文件。 1–exclude-from=FILE 38-5. 指定不排除而需要传输的文件模式。 1–include=PATTERN 38-6. 不排除FILE指定模式匹配的文件。 1–include-from=FILE 38-7. 从指定文件中读取SRC源文件列表 1–files-from=FILE 39-1. 从文件中读取的文件名以’\0’终止 – 简写 1-0 […]
31 rsync 命令全面详解 – 中 1http://www.senra.me/rsync-documents-parameters-description-and-usage-examples/ 24-1. 对稀疏文件进行特殊处理以节省DST的空间。- 简写 1-S 24-2. 对稀疏文件进行特殊处理以节省DST的空间。- 全写 1–sparse 24-3. 使用xattrs来存储和恢复权限属性 1–fake-super 25-1. 参数模拟命令执行的结果,并不真的执行命令。- 简写 1-n 25-2. 参数模拟命令执行的结果,并不真的执行命令。- 全写 1–dry-run 26-1. 拷贝文件,不进行增量检测。- 简写 1-W 26-1. 拷贝文件,不进行增量检测。- 全写 1–whole-file 27-1. 不要跨越文件系统边界。 – 简写 1-x 27-2. 不要跨越文件系统边界。 – 全写 1–one-file-system 28-1. 检验算法使用的块尺寸,默认是700字节。- 简写 1-B 28-2. 检验算法使用的块尺寸,默认是700字节。 – 全写 1–block-size=SIZE 29-1. 指定使用rsh、ssh方式进行数据同步. – […]