Centos Linux 安装杀病毒扫描软件 clamAV
时间:06-28来源:作者:点击数:27
clamAV安装脚本
- #!/bin/bash
- echo "install ClamAV"
- yum -y update
- yum -y install wget
-
-
-
- wget -U NoSuchBrowser/1.0 https://www.clamav.net/downloads/production/clamav-0.104.1.linux.x86_64.rpm
- yum -y install clamav-0.104.1.linux.x86_64.rpm
-
-
- groupadd clamav
- useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
-
- sudo chown -R clamav /usr/local/share/clamav
-
-
- clamconf -g clamd.conf > /usr/local/etc/clamd.conf
- clamconf -g freshclam.conf > /usr/local/etc/freshclam.conf
- clamconf -g clamav-milter.conf > /usr/local/etc/clamav-milter.conf
-
-
- sed -i 's/^Example.*$/#Example/g' /usr/local/etc/clamd.conf
- sed -i 's/^Example.*$/#Example/g' /usr/local/etc/freshclam.conf
- sed -i 's/^Example.*$/#Example/g' /usr/local/etc/clamav-milter.conf
-
- sed -i 's/^#DatabaseMirror.*$/DatabaseMirror db.cn.clamav.net/g' /usr/local/etc/freshclam.conf
-
- freshclam
-
-
- freshclam -d
- echo '/usr/bin/freshclam -d' >> /etc/rc.local
-
-
- clamscan -rzi --quiet -l /tmp/clamscan_$(date +%s).log /boot
-
-
- rm -f clamav-0.104.1.linux.x86_64.rpm
-