GNU/Linux >> Znalost Linux >  >> Ubuntu

Jak nainstalovat ClamAV na Ubuntu 20.04

V tomto článku vysvětlíme nezbytné kroky k instalaci a konfiguraci ClamAV na Ubuntu 20.04 LTS. Než budete pokračovat v tomto tutoriálu, ujistěte se, že jste přihlášeni jako uživatel s sudo privilegia. Všechny příkazy v tomto tutoriálu by měly být spouštěny jako uživatel bez oprávnění root.

ClamAV je antivirový nástroj s otevřeným zdrojovým kódem dostupný pro distribuce Linuxu. Integruje poštovní servery pro skenování přijatých příloh. Mezi další funkce patří také skenování webu. ClamAV obsahuje vícevláknového skenerového démona, nástroje příkazového řádku pro skenování souborů na vyžádání a automatické aktualizace podpisů. Jedním z jeho hlavních použití je na poštovních serverech jako antivirový skener na straně serveru.

Nainstalujte ClamAV na Ubuntu 20.04

Krok 1. Nejprve, než začnete instalovat jakýkoli balíček na váš server Ubuntu, vždy doporučujeme zajistit, aby byly všechny systémové balíčky aktualizovány.

sudo apt update
sudo apt upgrade

Krok 2. Nainstalujte ClamAV na systémy Ubuntu.

Výchozí úložiště Ubuntu 20.04 obsahují nejnovější stabilní verzi ClamAV. Můžete jej jednoduše nainstalovat pomocí následujícího příkazu:

sudo apt install clamav clamav-daemon

Jakmile jsou balíčky úspěšně nainstalovány, spusťte následující příkaz a zkontrolujte, zda byl nainstalován či nikoli:

clamscan --version

Krok 3. Aktualizujte databázi ClamAV.

Nejprve zastavte clamav-freshclam službu (pokud je spuštěna) a spusťte freshclam , nástroj pro aktualizaci virové databáze:

sudo systemctl stop clamav-freshclam

Potom aktualizujte virovou databázi:

freshclam

Dále spusťte službu clamav-freshclam a povolte její spuštění při restartu systému pomocí následujícího příkazu:

sudo systemctl start clamav-freshclam
sudo systemctl enable clamav-freshclam

Krok 4. Ke skenování použijte Clamscan.

Základní syntaxe Clamscanu je uvedena níže:

clamscan [options] [files-or-directories]

Všechny dostupné možnosti můžete vytisknout pomocí clamscan pomocí následujícího příkazu:

clamscan -h
Clam AntiVirus: Scanner 0.102.4
           By The ClamAV Team: https://www.clamav.net/about.html#credits
           (C) 2020 Cisco Systems, Inc.
 
    clamscan [options] [file/directory/-]
 
    --help                -h             Show this help
    --version             -V             Print version number
    --verbose             -v             Be verbose
    --archive-verbose     -a             Show filenames inside scanned archives
    --debug                              Enable libclamav's debug messages
    --quiet                              Only output error messages
    --stdout                             Write to stdout instead of stderr. Does not affect 'debug' messages.
    --no-summary                         Disable summary at end of scanning
    --infected            -i             Only print infected files
    --suppress-ok-results -o             Skip printing OK files
    --bell                               Sound bell on virus detection
 
    --tempdir=DIRECTORY                  Create temporary files in DIRECTORY
    --leave-temps[=yes/no(*)]            Do not remove temporary files
    --gen-json[=yes/no(*)]               Generate JSON description of scanned file(s). JSON will be printed and also-
                                         dropped to the temp directory if --leave-temps is enabled.
    --database=FILE/DIR   -d FILE/DIR    Load virus database from FILE or load all supported db files from DIR
    --official-db-only[=yes/no(*)]       Only load official signatures
    --log=FILE            -l FILE        Save scan report to FILE
    --recursive[=yes/no(*)]  -r          Scan subdirectories recursively
    --allmatch[=yes/no(*)]   -z          Continue scanning within file after finding a match
    --cross-fs[=yes(*)/no]               Scan files and directories on other filesystems
    --follow-dir-symlinks[=0/1(*)/2]     Follow directory symlinks (0 = never, 1 = direct, 2 = always)
    --follow-file-symlinks[=0/1(*)/2]    Follow file symlinks (0 = never, 1 = direct, 2 = always)
    --file-list=FILE      -f FILE        Scan files from FILE
    --remove[=yes/no(*)]                 Remove infected files. Be careful!
    --move=DIRECTORY                     Move infected files into DIRECTORY
    --copy=DIRECTORY                     Copy infected files into DIRECTORY
    --exclude=REGEX                      Don't scan file names matching REGEX
    --exclude-dir=REGEX                  Don't scan directories matching REGEX
    --include=REGEX                      Only scan file names matching REGEX
    --include-dir=REGEX                  Only scan directories matching REGEX
 
    --bytecode[=yes(*)/no]               Load bytecode from the database
    --bytecode-unsigned[=yes/no(*)]      Load unsigned bytecode
    --bytecode-timeout=N                 Set bytecode timeout (in milliseconds)
    --statistics[=none(*)/bytecode/pcre] Collect and print execution statistics
    --detect-pua[=yes/no(*)]             Detect Possibly Unwanted Applications
    --exclude-pua=CAT                    Skip PUA sigs of category CAT
    --include-pua=CAT                    Load PUA sigs of category CAT
    --detect-structured[=yes/no(*)]      Detect structured data (SSN, Credit Card)
    --structured-ssn-format=X            SSN format (0=normal,1=stripped,2=both)
    --structured-ssn-count=N             Min SSN count to generate a detect
    --structured-cc-count=N              Min CC count to generate a detect
    --scan-mail[=yes(*)/no]              Scan mail files
    --phishing-sigs[=yes(*)/no]          Enable email signature-based phishing detection
    --phishing-scan-urls[=yes(*)/no]     Enable URL signature-based phishing detection
    --heuristic-alerts[=yes(*)/no]       Heuristic alerts
    --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found
    --normalize[=yes(*)/no]              Normalize html, script, and text files. Use normalize=no for yara compatibility
    --scan-pe[=yes(*)/no]                Scan PE files
    --scan-elf[=yes(*)/no]               Scan ELF files
    --scan-ole2[=yes(*)/no]              Scan OLE2 containers
    --scan-pdf[=yes(*)/no]               Scan PDF files
    --scan-swf[=yes(*)/no]               Scan SWF files
    --scan-html[=yes(*)/no]              Scan HTML files
    --scan-xmldocs[=yes(*)/no]           Scan xml-based document files
    --scan-hwp3[=yes(*)/no]              Scan HWP3 files
    --scan-archive[=yes(*)/no]           Scan archive files (supported by libclamav)
    --alert-broken[=yes/no(*)]           Alert on broken executable files (PE & ELF)
    --alert-encrypted[=yes/no(*)]        Alert on encrypted archives and documents
    --alert-encrypted-archive[=yes/no(*)] Alert on encrypted archives
    --alert-encrypted-doc[=yes/no(*)]    Alert on encrypted documents
    --alert-macros[=yes/no(*)]           Alert on OLE2 files containing VBA macros
    --alert-exceeds-max[=yes/no(*)]      Alert on files that exceed max file size, max scan size, or max recursion limit
    --alert-phishing-ssl[=yes/no(*)]     Alert on emails containing SSL mismatches in URLs
    --alert-phishing-cloak[=yes/no(*)]   Alert on emails containing cloaked URLs
    --alert-partition-intersection[=yes/no(*)] Alert on raw DMG image files containing partition intersections
    --nocerts                            Disable authenticode certificate chain verification in PE files
    --dumpcerts                          Dump authenticode certificate chain in PE files
 
    --max-scantime=#n                    Scan time longer than this will be skipped and assumed clean
    --max-filesize=#n                    Files larger than this will be skipped and assumed clean
    --max-scansize=#n                    The maximum amount of data to scan for each container file (**)
    --max-files=#n                       The maximum number of files to scan for each container file (**)
    --max-recursion=#n                   Maximum archive recursion level for container file (**)
    --max-dir-recursion=#n               Maximum directory recursion level
    --max-embeddedpe=#n                  Maximum size file to check for embedded PE
    --max-htmlnormalize=#n               Maximum size of HTML file to normalize
    --max-htmlnotags=#n                  Maximum size of normalized HTML file to scan
    --max-scriptnormalize=#n             Maximum size of script file to normalize
    --max-ziptypercg=#n                  Maximum size zip to type reanalyze
    --max-partitions=#n                  Maximum number of partitions in disk image to be scanned
    --max-iconspe=#n                     Maximum number of icons in PE file to be scanned
    --max-rechwp3=#n                     Maximum recursive calls to HWP3 parsing function
    --pcre-match-limit=#n                Maximum calls to the PCRE match function.
    --pcre-recmatch-limit=#n             Maximum recursive calls to the PCRE match function.
    --pcre-max-filesize=#n               Maximum size file to perform PCRE subsig matching.
    --disable-cache                      Disable caching and cache checks for hash sums of scanned files.

To je vše, co potřebujete k instalaci ClamAV na Ubuntu 20.04 LTS Focal Fossa. Doufám, že vám tento rychlý tip pomůže. Další informace o ClamAV najdete v jejich oficiální znalostní databázi. Pokud máte dotazy nebo návrhy, neváhejte zanechat komentář níže.


Ubuntu
  1. Jak nainstalovat R na Ubuntu 16.04

  2. Jak nainstalovat Go na Ubuntu 18.04

  3. Jak nainstalovat ClamAV na Ubuntu 20.04

  1. Jak nainstalovat Odoo na Ubuntu

  2. Jak nainstalovat Maven na Ubuntu

  3. Jak nainstalovat g ++ na Ubuntu

  1. Jak nainstalovat Wine na Ubuntu

  2. Jak nainstalovat Apache Hive na Ubuntu

  3. Jak nainstalovat R na Ubuntu 20.04