1.安装配置
groupadd clamav useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd -y cp /etc/freshclam.conf /etc/freshclam.conf.bak sed -i -e 's/^Example/#Example/' /etc/freshclam.conf vim /usr/lib/systemd/system/clam-freshclam.service # Run the freshclam as daemon [Unit] Description = freshclam scanner After = network.target [Service] Type = forking ExecStart = /usr/bin/freshclam -d -c 4 Restart = on-failure PrivateTmp = true [Install] WantedBy=multi-user.target
2.启停
systemctl daemon-reload systemctl start clam-freshclam.service systemctl status clam-freshclam.service -l 0 */3 * * * root /usr/share/clamav/freshclam-sleep