Projekt

Allgemein

Profil

Setup clamav » Historie » Revision 2

Revision 1 (Jeremias Keihsler, 01.04.2023 13:46) → Revision 2/3 (Jeremias Keihsler, 01.04.2023 13:50)

h1. Install procedure for ClamAV 

 h2. Requirements 

 To install ClamAV you will need the following: 
 * a installed and supported operating system (e.g. CentOS 7.x) 
 * root-access 
 * a fast internet connection 
 * epel 

 h2. Preliminary Note 

 This procedure is based on a documentation supplied by https://www.hostinger.com/tutorials/how-to-install-clamav-centos7 

 h2. Install  

 <pre><code class="shell"> 
 yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd 
 </code></pre> 

 h2. SELinux config 

 <pre><code class="shell"> 
 setsebool -P antivirus_can_scan_system 1 
 setsebool -P clamd_use_jit 1 
 </code></pre> 

 verify changes 

 <pre><code class="shell"> 
 getsebool -a | grep antivirus 
 </code></pre> 

 <pre>antivirus_can_scan_system --> --&gt; on 
 antivirus_use_jit --> on</pre> --&gt; off</pre> 

 h2. ClamAV config 

 remove 'example'-string from config-file 

 <pre><code class="shell"> 
 sed -i -e "s/^Example/#Example/" /etc/clamd.d/scan.conf 
 </code></pre> 

 open config file and uncomment following line 

 <pre><code class="shell"> 
 vim /etc/clamd.d/scan.conf 
 </code></pre> 

 <pre>#LocalSocket /var/run/clamd.scan/clamd.sock</pre> 

 remove 'example'-string from freshclam-config file 

 <pre><code class="shell"> 
 sed -i -e "s/^Example/#Example/" /etc/freshclam.conf 
 </code></pre> 

 h2. update virus-DB 

 <pre><code class="shell"> 
 freshclam 
 </code></pre> 

 should result in following output 

 <pre> 
 ClamAV update process started at Tue Dec    19 09:30:20 2016 
 main.cvd is up to date (version: 57, sigs: 4218790, f-level: 60, builder: amishhammer) 
 Trying host database.clamav.net (69.163.100.14)... 
 Downloading daily.cvd [100%] 
 daily.cvd updated (version: 22739, sigs: 1100989, f-level: 63, builder: neo) 
 Downloading bytecode-279.cdiff [100%] 
 Downloading bytecode-280.cdiff [100%] 
 Downloading bytecode-281.cdiff [100%] 
 Downloading bytecode-282.cdiff [100%] 
 Downloading bytecode-283.cdiff [100%] 
 bytecode.cld updated (version: 285, sigs: 57, f-level: 63, builder: bbaker) 
 Database updated (5319836 signatures) from database.clamav.net (IP: 168.143.19.95) 
 </pre> 

 h2. Service  

 <pre><code class="shell"> 
 systemctl start start clamd@scan 
 systemctl enable start clamd@scan 
 </code></pre>