1. 安装
1.1 ubuntu
apt-get update
apt-get -y install clamav clamav-daemon
freshclam
报错:
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
解决方法:
1. 删除日志文件:
rm -f /var/log/clamav/freshclam.log
2. 停止服务
systemctl stop clamav-freshclam
freshclam
systemctl start clamav-freshclam
1.2 centos
yum install -y epel-release
yum update -y
yum install -y clamav clamav-update
freshclam
chown clamupdate:clamupdate
/var/log/clamav/freshclam.log
freshclam
sed -i -e "s/^Example/#Example/" /etc/freshclam.conf
systemctl enable clamav-freshclam.service
systemctl start clamav-freshclam.service
2.使用方式
clamscan -r --bell -i /
clamscan myfile.txt
clamscan -r /home
clamscan -r -i /home
clamscan -r --remove /home