• linux下对clamav杀毒软件的安装和配置


    下载安装

     首先安装zlib库:

      # yum install zlib zlib-devel  //安装可忽略

     下载安装clamav源码包

      clamav管网:http://www.clamav.net/downloads

      # wget http://www.clamav.net/downloads/production/clamav-0.99.2.tar.gz  //  下载源码包

      # tar -zxf clamav-0.99.2.tar.gz  //解压

      # cd clamav-0.99.2

      # ./configure --prefix=/usr/local/clamav

      #make

      #make install

     添加用户组和组成员

      # groupadd clamav

      # useradd -g clamav clamav

    配置

     1、创建日志目录和病毒库目录

      # mkdir /usr/local/clamav/logs

      # mkdir /usr/local/clamav/updata

     2、创建日志文件

      # touch /usr/local/clamav/logs/clamd.log

      # touch /usr/local/clamav/logs/freshclam.log

     3、文件授权

      # chown clamav:clamav /usr/local/clamav/logs/clamd.log

      # chown clamav:clamav /usr/local/clamav/logs/freshclam.log

      # chown clamav:clamav /usr/local/clamav/updata

     4、修改配置文件

      # cp  /usr/local/clamav/etc/clamd.conf.sample /usr/local/clamav/etc/clamd.conf

      # cp /usr/local/clamav/etc/freshclam.conf.sample /usr/local/clamav/etc/freshclam.conf

      编辑这两个配置文件内容

      # vim /usr/local/clamav/etc/clamd.conf

       #Example  //注释掉这一行

       LogFile /usr/local/clamav/logs/clamd.log

       PidFile /usr/local/clamav/updata/clamd.pid

       DatabaseDirectory /usr/local/clamav/updata

      # vim /usr/local/clamav/etc/freshclam.conf

       #Example  //注释掉这一行

       DatabaseDirectory /usr/local/clamav/updata

       UpdateLogFile /usr/local/clamav/logs/freshclam.log

       PidFile /usr/local/clamav/updata/freshclam.pid

    执行 

     更新病毒库

      # /user/local/clamav/bin/freshclam

     杀毒扫描

      # /user/local/clamav/bin/clamscan   //当前目录下的文件

      # /user/local/clamav/bin/clamscan -r  //当前目录下的文件和目录

      # /user/local/clamav/binclamscan dir  //查杀目录

      # /user/local/clamav/binclamscan -r dir //查杀目录dir下的所有目录和文件

      # /user/local/clamav/binclamscan --help  //帮助

    自动定时更新和杀毒

      一般使用计划任务,让服务器每天定时更新和定时杀毒,保存杀毒日志。设置crontab

       1  3  * * *          /usr/local/clamav/bin/freshclam --quiet
       20 3  * * *          /usr/local/clamav/bin/clamscan  -r /home  --remove -l /var/log/clamscan.log

  • 相关阅读:
    android应用私有存储文件的写入与读取-openFileInput 和 openFileOutput
    android 8种对话框(Dialog)使用方法汇总
    Gradle环境变量的配置
    Activity标题(title)的显示和隐藏
    Android Studio配置Android Annotations框架详解--说说那些坑
    Android如何防止apk程序被反编译
    Android APK反编译 apktool使用教程
    关于Installation error: INSTALL_FAILED_NO_MATCHING_ABIS的解决方法
    Android解决NDK not configured问题
    Android SDK在线更新镜像服务器
  • 原文地址:https://www.cnblogs.com/houyongchong/p/7890784.html
Copyright © 2020-2023  润新知