linux install clamav
2024-11-12Clam AntiVirus是一个Linux系统上使用的反病毒软件包。
1、安装clamav
apt -y install clamAV clamav-freshclam
或者
yum -y install epel-release
yum -y install clamav clamav-freshclam
2、clamscan -r / --max-dir-recursion=5 -l /root/rootscan.log
grep -i FOUND rootscan.log
3、freshclam是ClamAV的自动更新工具,用于更新病毒数据库。可以通过以下命令手动更新病毒数据库: freshclam 为了确保病毒数据库始终是最新的,可以将freshclam配置为定期自动更新。
yum -y install clamav clamav-freshclam
systemctl enable clamav-freshclam
4、运行freshclam
ClamAV update process started at Tue Nov 12 14:18:55 2024
daily database available for download (remote version: 27455)
Time: 47.0s, ETA: 57.3s [==========> ] 27.59MiB/61.23MiB
5、查看版本
clamscan --version
ClamAV 1.0.7/27455/Mon Nov 11 17:58:33 2024
clamscan
----------- SCAN SUMMARY -----------
Known viruses: 8699566
Engine version: 1.0.7
Scanned directories: 1
Scanned files: 901
Infected files: 0
Total errors: 5
Data scanned: 121.45 MB
Data read: 122.11 MB (ratio 0.99:1)
Time: 47.817 sec (0 m 47 s)
Start Date: 2024:11:12 14:41:56
End Date: 2024:11:12 14:42:44
6、ll /var/lib/clamav
total 366104
-rw-r--r-- 1 clamupdate clamupdate 289733 Nov 12 14:25 bytecode.cvd
-rw-r--r-- 1 clamupdate clamupdate 204107264 Nov 12 14:20 daily.cld
-rw-r--r-- 1 clamupdate clamupdate 69 Nov 12 14:18 freshclam.dat
-rw-r--r-- 1 clamupdate clamupdate 170479789 Nov 12 14:25 main.cvd
7、crontab
8、centos8
冷备方式安装
IP=172.16.181.1
scp -P54422 /lib64/libjson-c.so.4 root@${IP}:/lib64
scp -P54422 /usr/bin/clam* root@${IP}:/usr/bin
scp -P54422 /usr/lib64/libclam* root@${IP}:/usr/lib64
scp -r /var/lib/clamav/ root@${IP}:/var/lib
################
9、wget -c https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d
或者
vi /etc/yum.repos.d/CentOS-epel.repo
baseurl=http://mirrors.cloud.aliyuncs.com/epel-archive/8/Everything/$basearch
yum install clamav clamav-update
rpm -qf /usr/bin/freshclam
clamav-update-0.102.2-4.el8.x86_64
10、rockylinux9
yum -y install epel-release
yum -y install clamav clamav-freshclam
cat /etc/freshclam.conf |egrep -v '^#|^$'
DatabaseMirror database.clamav.net
cat /etc/clamd.conf |egrep -v '^#|^$'
11、crontab -l
1 3 * * * /usr/bin/freshclam --quiet
20 3 * * * /usr/bin/clamscan -r /home --remove -l /var/log/clamscan.log
/usr/bin/freshclam --version
分类:Linux | 标签: |