بسم الله الرحمن الرحيم
شرح طريقة تركيب برنامج مكافح الفيروسات على السيرفر بالطريقة الصحيحة ومضمونة ومجربة 100%
الطريقة سهلة جدا فقط اتبع الشرح والأوامر التي سوف تطرح في الشرح وراح يتنصب في سيرفرك بشكل سليم
الشرح تم تطبيقه على CentOS5 و الأصدار CentOS4
: : : نـبداء الشرح : : :
في البداية اذا كان نظام CentOS5
تركيب البرامج اللازمة للبرنامج rpmforge
PHP:
wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
PHP:
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
PHP:
rm -f rpmforge-release-0.3.6-1.el5.rf.i386.rpm
PHP:
wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
PHP:
rpm -Uvh rpmforge-release-0.3.6-1.el4.rf.i386.rpm
PHP:
rm -f rpmforge-release-0.3.6-1.el4.rf.i386.rpm
PHP:
sed -i 's/enabled = 1/enabled = 0/g' /etc/yum.repos.d/rpmforge.repo
PHP:
yum -y --enablerepo=rpmforge install clamd
PHP:
pico /etc/clamd.conf
PHP:
User clamav
PHP:
#User clamav
وابحث عن :
PHP:
TCPSocket 3310
PHP:
#TCPSocket 3310
PHP:
pico /etc/freshclam.conf
PHP:
# Uncomment the following line and replace XY with your country
PHP:
# Uncomment the following line and replace XY with your country
# code. See http://www.iana.org/cctld/cctld-whois.htm for the full list.
#DatabaseMirror db.XY.clamav.net
DatabaseMirror db.us.clamav.net
PHP:
DatabaseOwner clamav
PHP:
DatabaseOwner root
كود:
# Run command when freshclam reports outdated version.
PHP:
# Run command when freshclam reports outdated version.
# In the command string %v will be replaced by the new version number.
# Default: disabled
#OnOutdatedExecute command
PHP:
# Run command when freshclam reports outdated version.
# In the command string %v will be replaced by the new version number.
# Default: disabled
#OnOutdatedExecute command
OnOutdatedExecute /usr/local/bin/clamav-update.pl --config /usr/local/etc/clamav-update.conf
PHP:
/etc/rc.d/init.d/clamd start
PHP:
chkconfig clamd on
PHP:
chkconfig --list clamd
PHP:
sed -i 's/Example/#Example/g' /etc/freshclam.conf
PHP:
freshclam
PHP:
ClamAV update process started at Tue Nov 22 00:07:58 2005
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.87 Recommended version: 0.87.1
DON'T PANIC! Read http://www.clamav.net/faq.html
main.cvd is up to date (version: 34, sigs: 39625, f-level: 5, builder: tkojm)
Downloading daily.cvd
[*]
daily.cvd updated (version: 1181, sigs: 1633, f-level: 6, builder: tomek)
Database updated (41258 signatures) from db.jp.clamav.net (IP: 59.87.0.36)
Clamd successfully notified about the update.
PHP:
clamscan --infected --remove --recursive
PHP:
----------- SCAN SUMMARY -----------
Known viruses: 261313
Engine version: 0.93
Scanned directories: 1
Scanned files: 14
Infected files: 0
Data scanned: 0.02 MB
Time: 2.797 sec (0 m 2 s)
نجي نحمل هذه الحين :
PHP:
wget http://www.eicar.org/download/eicar.com
wget http://www.eicar.org/download/eicar.com.txt
wget http://www.eicar.org/download/eicar_com.zip
wget http://www.eicar.org/download/eicarcom2.zip
PHP:
clamscan --infected --remove --recursive
PHP:
/root/eicarcom2.zip: Eicar-Test-Signature FOUND
/root/eicarcom2.zip: Removed
/root/eicar.com.txt: Eicar-Test-Signature FOUND
/root/eicar.com.txt: Removed
/root/eicar_com.zip: Eicar-Test-Signature FOUND
/root/eicar_com.zip: Removed
/root/eicar.com: Eicar-Test-Signature FOUND
/root/eicar.com: Removed
----------- SCAN SUMMARY -----------
Known viruses: 116966
Engine version: 0.90.2
Scanned directories: 5
Scanned files: 39
Infected files: 4
Data scanned: 0.24 MB
Time: 29.437 sec (0 m 29 s)
طبعا الي يبي يفحص مجلد home كامل ويشوف هل في شيلات او لا يطبق الأمر التالي :
اكتب الأمر التالي :
PHP:
clamscan --infected --remove --recursive /home/
PHP:
/home
ويفضل استخدام الأمر :
PHP:
clamscan --infected --remove --recursive
PHP:
clamscan --version
PHP:
ClamAV 0.94/8347/Sun Sep 28 02:35:46 2008