Many anti-virus software in UNIX/Linux are commercial versions. However, in Windows systems, the quality of anti-virus software depends on the quantity of virus databases and the update speed. Here, we use the free software Clam AntiVirus to establish a virus detection and removal system in Linux. To eliminate future risks, we recommend that you build a virus detection and removal system before the server becomes public. Note: The system must install the ntp service, and the time must be the same as that of Beijing time; otherwise, the clam may be unavailable. As follows: yum-y install ntp/usr/sbin/ntpdate pool.ntp.org (1) Because Clam Antivirus does not exist in the official yum library of CentOS, therefore, to install Clam Antivirus using yum, You need to define unofficial libraries. Add vim/etc/yum. repos. d/dag. repo as follows: [dag] name = Dag RPM Repository for Red Hat Enterprise Linuxbaseurl = http://apt.sw.be/redhat/el $ Releasever/en/$ basearch/daggpgcheck = 1 enabled = 1 (2) rpm-Uvh http://apt.sw.be/redhat/el 5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm # Key Authentication For dag. (3) yum-y install clamd # install Clam AntiVirus online (4) freshclam # update the clam virus database (5) chkconfig clamd on # Set it to start service clamd start after the system is started (6) # start clamd anti-virus software (7) clamdscan # scan for antivirus testing: download the software with viruses: wget http://www.eicar.org/download/eicar.comwget http://www.eicar.org/download/eicar_com.zip [Root @ MYSQL-01 opt] # lltotal 24-rw-r -- r -- 1 root 68 Jul 19 eicar.com-rw-r -- 1 root 184 Jul 19 eicar_com.zip-rw-r -- r -- 1 root root 3676 Jul 13 linux. sh [root @ MYSQL-01 opt] # clamdscan */opt/eicar_com.zip: Eicar-Test-Signature FOUND # discover infected files/opt/eicar.com: eicar-Test-Signature FOUND # virus infected file/opt/linux. sh: OK ----------- SCAN SUMMARY ----------- Infected files: 2 T Ime: 0.005 sec (0 m 0 s) [root @ MYSQL-01 opt] # clamdscan -- remove # virus scan again with/opt/eicar_com.zip: eicar-Test-Signature FOUND/opt/eicar_com.zip: Removed. # uninstall Delete the infected file/opt/eicar.com: Eicar-Test-Signature FOUND/opt/eicar.com: Removed. # deleting Infected files ----------- scan summary --------- Infected files: 2 Time: 0.007 sec (0 m 0 s) [root @ MYSQL-01 opt] # clamdscan * # No virus file is available now. /Opt/linux. sh: OK ----------- SCAN SUMMARY ----------- Infected files: 0 Time: 0.001 sec (0 m 0 s)