linux病毒库离线升级,更新clamav病毒库的方法

# Linux CentOS Server Shell Tools

# !/bin/bash

# qing chu duo yu wen jian he la ji wen jian .

rm -rf /var/clamav/safebrowsing.cvd

rm -rf /var/clamav/bytecode.cvd

echo ‘******************zheng zhai shan chu*******************’;

rm -rf /var/lib/clamav/daily.cvd

rm -rf /var/lib/clamav/main.cvd

rm -rf /var/lib/clamav/safebrowsing.cvd

echo ‘******************di we chi shan chu********************’;

wget http://db.cn.clamav.net/safebrowsing.cvd

wget http://db.cn.clamav.net/bytecode.cvd

wget http://db.cn.clamav.net/daily.cvd

wget http://db.cn.clamav.net/main.cvd

echo ‘******************xia zhai wan bi***********************’;

cp safebrowsing.cvd /var/clamav/

mv safebrowsing.cvd /var/lib/clamav/

mv bytecode.cvd /var/clamav/

mv daily.cvd /var/lib/clamav/

mv main.cvd /var/lib/clamav/

echo ‘*********************************************************’;

echo ‘**** ****’;

echo ‘**** cao zuo jie shu ****’;

echo ‘**** ming ling yi jing zhi xing wan cheng . ****’;

echo ‘**** ****’;

echo ‘**** http://www.myzhenai.com.cn ****’;

将以上内容复制到文本编辑器里保存为 clamav.sh 文件,然后运行脚本可以自动更新.将脚本丢到计划任务里就能实现自动更新了.

#sh clamav.sh

你可能感兴趣的:(linux病毒库离线升级)