3月 232011
 

HOWTO : Home made NAS server with Ubuntu 8.04.1 – Part VI
[HOWTO] 用Ubuntu 8.04.1搭建NAS服务器 – Part VI

This part is also optional. The Samba is shared with Windows desktops that files stored in the Samba will be infected by virus. To prevent this, you should install the ClamAV, the open source anti-virus program for Linux that kills Windows virus.
这部分也是可选的。Samba为Windows客户端提供共享,保存的文件会感染病毒。可以安装ClamAV防病毒,Linux版本的开源防病毒系统,可以杀Windows病毒。

ClamAV

Edit /etc/apt/sources.list and append the following lines at the end of the file :
编辑/etc/apt/sources.list,并在最后增加以下行:

sudo nano /etc/apt/sources.list

# ClamAV PPA
deb http://ppa.launchpad.net/ubuntu-clamav/ubuntu hardy main
deb-src http://ppa.launchpad.net/ubuntu-clamav/ubuntu hardy main

sudo apt-get update
sudo apt-get install clamav clamav-daemon arj unzoo lha unrar

Make sure clamav-daemon is running :
确保clamav-daemon运行中:
ps ax | grep clamd

If not :
sudo /etc/init.d/clamav-daemon start
sudo /etc/init.d/clamav-freshclam start

Scan and kill virus if found at 03:00am on every day :
扫描和杀毒定义在每天夜里3点:
sudo crontab -e

0 3 * * * clamscan -r -i –remove /home > /home/samiux/scan.txt

Remember to configure the ClamAV’s 15 threads to 3 or less in order to reduce the consumption of CPU resources but the con is that it take a longer time to complete the virus scan of the whole system :
为减少CPU资源的消耗,把ClamAV配置文件中的15线程,改为不多于3个。因此整个系统的病毒扫描需要更多的完成时间。
sudo dpkg-reconfigure clamav-base

Remarks : The current version of ClamAV at the time of this writing cannot scan RAR files. It is a bug and it will be fixed later.
说明:ClamAV当前版本不能扫描RAR文件。这个bug将来会补上。

 回复

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>