修复编译rsync缺少组件
报错如下:
Configure found the following issues:
解决方法办法如下:
cd ~/Desktop;
curl -OL https://github.com/Cyan4973/xxHash/archive/v0.8.0.tar.gz;
tar -xvf v0.8.0.tar.gz;
cd xxHash-0.8.0;
make -j4;
sudo make install;
cd ~/Desktop;
curl -OL https://github.com/lz4/lz4/archive/v1.9.3.tar.gz;
tar -xvf v1.9.3.tar.gz;
cd lz4-1.9.3;
make -j4;
sudo make install;
cd ~/Desktop;
curl -OL https://www.openssl.org/source/openssl-1.1.1k.tar.gz;
tar -xvf openssl-1.1.1k.tar.gz;
cd openssl-1.1.1k ;
./config;
make -j4;
sudo make install;
cd ~/Desktop;
curl -OL https://github.com/facebook/zstd/archive/v1.5.0.tar.gz;
tar -xvf v1.5.0.tar.gz;
cd zstd-1.5.0 ;
make -j4;
sudo make install;
cd ~/Desktop;
curl -OL https://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz;
tar -xvf rsync-3.2.3.tar.gz;
cd rsync-3.2.3;
./configure;
make -j4;
sudo make install;
安装完成后,查看rsync版本:
cd /usr/local/bin;
./rsync...
解决inotify编译出错
信创电脑编译inotify的时候报错:
configure: error: cannot guess build type; you must specify one.
解决办法:
./configure --build=arm-linux (指定arm,系统是arm的)
说明:
--build=编译该软件所使用的平台
--host=该软件将运行的平台
--target=该软件所处理的目标平台
解决No module named util错误
安装:
pip install python_utils
pip install opencv-python
注意版本问题 如果出现:
TypeError: ‘NoneType’ object is not iterable
则需要安装指定版本opencv-python:
pip install opencv-python==4.2.0.32
zabbix通过dmwatcher日志监控达梦集群状态
脚本首先检查日志文件是否存在,不存在则创建文件。 然后检索日志文件最后20行,匹配到关键字则报警。
logfile=/opt/dmdbms/log/dm_dmwatcher_V3X8_$(date +%Y%m).log
if [ ! -f "$logfile" ];then
touch $logfile
chmod -R 777 $logfile
fi
format_date=$(date +%s -r $logfile)
now_date=$(date +%s)
result=$(tail -n 20 $logfile)
if [ $(($now_date-$format_date)) -gt 600 ];then
echo 'Normal'
else
if [[ ${result} =~ '实例状态(MOUNT)' ]];then
echo 'MountError'
elif [[ ${result} =~ '没有收到远程守护进程' ]];then
echo 'NetworkError'
elif [[ ${result} =~ '原状态是' ]];then
echo 'ChangeError'
else
echo 'Normal'
fi
fi
Failed building wheel for pyinstaller
需要更换使用的pytinstaller版本:
pip3 install pyinstaller==4.1
升级glibc失败导致Linux系统崩溃
错误操作: 在root用户下将/lib64/libc.so.6的覆盖,导致系统瘫痪,所有用户均被强制退出。 如下示例:
cp libc-2.12.1.so /lib64/libc.so.6
一旦执行了错误操作,千万不要断开当前ssh,会导致无法登录该服务器,更不要重启系统,会导致系统无法开机。 执行如下操作系统可以恢复正常(路径及具体文件名要根据系统当前情况决定)。
LD_PRELOAD=/lib64/libc-2.12.so && ln -s -f /lib64/libc-2.12.so /lib64/libc.so.6
如果已经重启系统,就只能使用livecd的方式进入系统将原系统根分区挂载到livecd系统,拷贝一个libc.so.6。
cp /mnt/sysimage/lib64/libc-2.12.so /mnt/sysimage/lib64/libc.so.6
或从同类操作系统拷贝一个libc.so.6,覆盖到当前原系统目录,重启原系统,故障恢复。