useradd clamav #增加用户
wget http://mirror.cnop.net/security/clamav-0.99.2.tar.gz
tar zxvf clamav-0.99.2.tar.gz
cd clamav-0.99.2
./configure --prefix=/usr/local/clamav --disable-clamav
make & make install
whereis clamav #查看是否安装成功
mkdir /usr/local/clamav/logs (日志存放目录)
touch /usr/local/clamav/logs/clamd.log
touch /usr/local/clamav/logs/freshclam.log
mkdir /usr/local/clamav/updata (clanav 病毒库目录)
chown -R clamav.clamav /usr/local/clamav/
chown -R clamav.clamav /usr/local/clamav/updata/
chown clamav.clamav /usr/local/clamav/logs/clamd.log
chown clamav.clamav /usr/local/clamav/logs/freshclam.log
cd /usr/local/clamav/etc
cp clamd.conf.sample clamd.conf
cp freshclam.conf.sample freshclam.conf
vim clamd.conf
#Example 注释掉这一行.
LogFile /usr/local/clamav/logs/clamd.log
PidFile /usr/local/clamav/updata/clamd.pid
DatabaseDirectory /usr/local/clamav/updata
vim freshclam.conf
#Example 注释掉这一行.
DatabaseDirectory /usr/local/clamav/updata
UpdateLogFile /usr/local/clamav/logs/freshclam.log
PidFile /usr/local/clamav/updata/freshclam.pid
/usr/local/clamav/bin/freshclam
/usr/local/clamav/bin/clamscan -r /home/jjzb/vol1/tomee #递归模式查杀该目录