安裝clamav殺毒軟件,并在貴州節(jié)點上掃描查殺看是否存在病毒。
成都創(chuàng)新互聯(lián)專注于企業(yè)營銷型網(wǎng)站建設(shè)、網(wǎng)站重做改版、臨淄網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、H5場景定制、商城系統(tǒng)網(wǎng)站開發(fā)、集團公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為臨淄等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。
編譯ClamAV時應(yīng)包括zlib庫,用于壓縮和解壓縮函數(shù)
軟件:zlib-1.2.7.tar.gz clamav-0.97.6.tar.gz
軟件下載地址:
http://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.7/zlib-1.2.7.tar.gz
http://nchc.dl.sourceforge.net/project/clamav/clamav/0.97.6/clamav-0.97.6.tar.gz
[root@ts181test]#wgethttp://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.7/zlib-1.2.7.tar.gz
[root@ts181test]#wget
http://nchc.dl.sourceforge.net/project/clamav/clamav/0.97.6/clamav-0.97.6.tar.gz
[root@ts181 test]# tar xfzlib-1.2.7.tar.gz
[root@ts181 test]# cd zlib-1.2.7
[root@ts181 zlib-1.2.7]# ./configure
[root@ts181 zlib-1.2.7]# make &&make install
[root@ts181 zlib-1.2.7]# cd ..
添加用戶組clamav和組成員clamav(注:在安裝clamav-0.97.6.tar.gz前必須先添加用戶)
[root@ts181 test]# groupadd clamav
[root@ts181 test]# useradd -g clamav -s/bin/false -c "Clam AntiVirus" clamav
[root@ts181 test]# tar xfclamav-0.97.6.tar.gz
[root@ts181 test]# cd clamav-0.97.6
[root@ts181 clamav-0.97.6]# ./configure--prefix=/opt/clamav --disable-clamav
[root@ts181 clamav-0.97.6]# make&& make install
mkdir /opt/clamav/logs (日志存放目錄)
mkdir /opt/clamav/updata (clanav病毒庫目錄)
在/var/log目錄下添加兩個logs文件:clamd.log和freshclam.log,將所有者改為新加的clamav用戶,并設(shè)置相應(yīng)的文件讀寫權(quán)限
touch /opt/clamav/logs/freshclam.log
touch /opt/clamav/logs/clamd.log
[root@ts181 clamav-0.97.6]# cd/opt/clamav
[root@ts181 clamav]# vim etc/clam.conf
# Example注釋掉這一行.第8行
LogFile /opt/clamav/logs/clamd.log
PidFile /opt/clamav/updata/clamd.pid
DatabaseDirectory /opt/clamav/updata
[root@ts181 clamav]# vimetc/freshclam.conf
#Example注釋掉這一行
DatabaseDirectory /opt/clamav/updata
UpdateLogFile/opt/clamav/logs/freshclam.log
PidFile/opt/clamav/updata/freshclam.pid
[root@ts181 clamav]# chown clamav:clamav/opt/clamav -R
[root@ts181 clamav]#/opt/clamav/bin/freshclam
##升級病毒庫
[root@ts181 clamav]#/opt/clamav/bin/clamscan --查殺當(dāng)前目錄下的文件
[root@ts181 clamav]#/opt/clamav/bin/clamscan -r --查殺當(dāng)前目錄的所有文件及目錄
[root@ts181 clamav]#/opt/clamav/bin/clamscan /home/leng --查殺dir目錄
[root@ts181 clamav]# /opt/clamav/bin/clamscan-r /home/leng --查殺目錄dir下的所有文件及目錄
[root@ts181 clamav]#/opt/clamav/bin/clamscan --help
后臺運行/opt/clamav/bin/freshclam-d
計劃任務(wù):
[root@ts181 clamav]# crontab -e
1 3 * * * /usr/local/clamav/bin/freshclam--quiet
20 3 * * * /usr/local/clamav/bin/clamscan -r/home --remove -l /var/log/clamscan.log