分类目录归档:Linux
systemd 配置目录介绍
pt-table-sync使用latin1编码格式无损同步
pt-table-sync --databases=db01 h=127.0.0.1,u=xxxx,p=xxx,A=latin1 h=8.8.8.8,u=xxxx,p=xxx,A=latin1 --lock=0 --charset=latin1 --no-bin-log --no-transaction --execute --print
.sql.gz 直接解压导入MySQL,不创建临时sql文件
Linux普通分区挂载
sed
sed 是一种流编辑器,用于对输入流(文件或管道)进行基本的文本转换。它是 Unix/Linux 系统下的一个非常强大的文本处理工具。以下是 sed 的一些常见用法:
- 替换文本:
sed 's/旧字符串/新字符串/' 文件名
这会将文件中的第一个匹配到的“旧字符串”替换为“新字符串”。
- 替换所有匹配项:
sed 's/旧字符串/新字符串/g' 文件名
这会将文件中所有匹配到的“旧字符串”替换为“新字符串”。
- 在特定行替换:
sed '2s/旧字符串/新字符串/' 文件名
这只会替换第 2 行中的第一个匹配项。
- 删除行:
sed '2d' 文件名
这会删除第 2 行。
- 打印特定行:
sed -n '2p' 文件名
这只会打印第 2 行。
- 保存更改到文件:
sed -i 's/旧字符串/新字符串/g' 文件名
这会直接修改原文件内容。
如果你有具体的 sed 使用场景或问题,请提供更多信息,我可以给出更详细的帮助。
Linux 递归删除空目录
find /pathforyoupath/ -type d -empty -delete -print
Linux swap使用率为0
Linux 中 Swap 交换分区设置教程,以及 Swap 大小与内存的关系 – 知乎
系统配置:Linux有一个swappiness参数,决定了系统使用swap的频率。默认值通常为60,值越低,越不容易使用swap。可以通过以下命令查看当前值:
cat /proc/sys/vm/swappiness
如果你希望系统更倾向于使用swap,可以将其设置为一个更高的值,例如:
sudo sysctl vm.swappiness=80
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/sunyuhua_keyboard/article/details/14248714
nginx restart failed:nginx: [alert] OPENSSL_init_ssl() failed (SSL: error:12800067:DSO support routines::could not load the shared library:filename(/snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/fips.so): /snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/fips.so: cannot open shared object file: No such file or directory error:12800067:DSO support routines::could not load the shared library error:07880025:common libcrypto routines::reason(37):name=fips error:0700006D:configuration file routines::module initialization error:module=providers, value=provider_sect retcode=-1 ) 解决办法
nginx restart failed:
nginx: [alert] OPENSSL_init_ssl() failed (SSL: error:12800067:DSO support routines::could not load the shared library:filename(/snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/fips.so): /snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/fips.so: cannot open shared object file: No such file or directory error:12800067:DSO support routines::could not load the shared library error:07880025:common libcrypto routines::reason(37):name=fips error:0700006D:configuration file routines::module initialization error:module=providers, value=provider_sect retcode=-1 )
解决办法:
nginx restart failed:
nginx: [alert] OPENSSL_init_ssl() failed (SSL: error:12800067:DSO support routines::could not load the shared library:filename(/snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/fips.so): /snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/fips.so: cannot open shared object file: No such file or directory error:12800067:DSO support routines::could not load the shared library error:07880025:common libcrypto routines::reason(37):name=fips error:0700006D:configuration file routines::module initialization error:module=providers, value=provider_sect retcode=-1 )
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
[root@ooops ~]# find / -name fips.so
/usr/lib64/ossl-modules/fips.so
[root@ooops ~]# mount --bind /usr/lib64/ossl-modules/ /snap/certbot/4325/usr/lib/x86_64-linux-gnu/ossl-modules/
4325注意替换为你的id
Could not find rpcgen / rockylinux 8 / mysql 5.7 编译
powertools 里面有rpcgen:
dnf install --enablerepo=powertools rpcgen
[root@212d1d5f5e2b mysql-5.7.44]# rm CMakeCache.txt && cmake . -DBUILD_CONFIG=mysql_release -DWITH_BOOST=/root/boost_1_59_0 -DCMAKE_INSTALL_PREFIX=/usr/local