Ubuntu、Centos7安装clamav
CentOS安装ClamAV
1、安装epel
yum -y install epel-release
2、安装ClamAV
yum install –y clamav clamav-update
3、更新病毒库
freshclam
4、扫描病毒命令
clamscan –ri / -l /var/log/clamscan.log
Ubuntu安装ClamAV
1、直接apt安装
sudo apt-get update
sudo apt-get install clamav clamav-daemon
clamscan --version
2、停止服务更新病毒库(为了手动更新数据库,需要暂时停止服务,不然不能收到更新。)
sudo systemctl stop clamav-freshclam
3、运行freshclam
freshclam
4、重启服务
sudo systemctl start clamav-freshclam
5、扫描
clamscan -r -i /home -l /var/log/clamscan.log
6、定时任务
crontab -e
30 23 * * * sh /usr/local/crontab/clamav_scan.sh > /dev/null 2>&1
7、clamav_scan.sh内容
clamscan -r -i /home -l /var/log/clamscan.log