clamav免费病毒软件安装、使用

yum -y install epel-release
yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd
//
cp /etc/freshclam.conf /etc/freshclam.conf.bak
sed -i -e "s/^Example/#Example/" /etc/freshclam.conf
cp /etc/clamd.d/scan.conf /etc/clamd.d/scan.conf.bak
sed -i -e "s/^Example/#Example/" /etc/clamd.d/scan.conf
//添加
vim /etc/clamd.d/scan.conf
LocalSocket /var/run/clamd.scan/clamd.sock
//关闭病毒库更新,默认情况下是禁止了自动更新功能,需要移除文件/etc/sysconfig/freshclam最后一行的配置才能启用
vim /etc/sysconfig/freshclam

FRESHCLAM_DELAY=

//下载病毒库 https://www.clamav.net/downloads
将main.cvd\daily.cvd\bytecode.cvd三个文件下载后上传到/var/lib/clamav目录下
wget http://database.clamav.net/main.cvd
wget http://database.clamav.net/daily.cvd
wget http://database.clamav.net/bytecode.cvd
vim /etc/freshclam.conf
DatabaseDirectory /var/lib/clamav #将注释#号去掉
systemctl enable [email protected]
ln -s '/usr/lib/systemd/system/[email protected]' '/etc/systemd/system/multi-user.target.wants/[email protected]'
//启动服务
systemctl start [email protected]
//查收病毒
clamscan -r /home

你可能感兴趣的:(clamav免费病毒软件安装、使用)