码迷,mamicode.com
首页 > 其他好文 > 详细

ClamAV 0.99 反病毒软件自动安装脚本

时间:2016-03-16 19:39:25      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:linux   反病毒   安全   

  Clam AntiVirus(简称 ClamAV) 是一个类UNIX系统上使用的反病毒软件包。主要应用于邮件服务器,采用多线程后台操作,可以自动升级病毒库。


以下 是安装 0.99 版本的脚本:


#!/bin/bash

CLAM_PATH=/opt/clamav-0.99     #安装目录

yum install -y zlib

cd /usr/local/src

wget http://sourceforge.net/projects/clamav/files/clamav/0.99/clamav-0.99.tar.gz

sleep 10

tar xvzf clamav-0.99.tar.gz

groupadd clamav

useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav

cd clamav-0.99

./configure --prefix=$CLAM_PATH --disable-clamav

make

make install

mkdir $CLAM_PATH/logs

mkdir $CLAM_PATH/updata

touch $CLAM_PATH/logs/freshclam.log

touch $CLAM_PATH/logs/clamd.log

chown clamav:clamav $CLAM_PATH/logs/clamd.log 

chown clamav:clamav $CLAM_PATH/logs/freshclam.log 

mkdir -p $CLAM_PATH/share/clamav

chown clamav:clamav $CLAM_PATH/share/clamav

cp $CLAM_PATH/etc/clamd.conf.sample $CLAM_PATH/etc/clamd.conf

cp $CLAM_PATH/etc/freshclam.conf.sample $CLAM_PATH/etc/freshclam.conf

sed -i ‘s/Example/#Example/g‘ $CLAM_PATH/etc/clamd.conf

sed -i ‘s/#LogFile\ \/tmp\/clamd.log/LogFile\ $CLAM_PATH\/logs\/clamd.log/g‘ $CLAM_PATH/etc/clamd.conf

sed -i ‘s/#PidFile\ \/var\/run\/clamd.pid/PidFile\ $CLAM_PATH\/updata\/clamd.pid/g‘\ $CLAM_PATH/etc/clamd.conf

sed -i ‘s/#DatabaseDirectory\ \/var\/lib\/clamav/DatabaseDirectory\ $CLAM_PATH\/updata/g‘\ $CLAM_PATH/etc/clamd.conf

sed -i ‘s/Example/#Example/g‘ $CLAM_PATH/etc/freshclam.conf


本文出自 “蒲芦” 博客,请务必保留此出处http://7116805.blog.51cto.com/7106805/1751659

ClamAV 0.99 反病毒软件自动安装脚本

标签:linux   反病毒   安全   

原文地址:http://7116805.blog.51cto.com/7106805/1751659

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!