Setup clamav » Historie » Version 2
Jeremias Keihsler, 01.04.2023 13:50
1 | 1 | Jeremias Keihsler | h1. Install procedure for ClamAV |
---|---|---|---|
2 | |||
3 | h2. Requirements |
||
4 | |||
5 | To install ClamAV you will need the following: |
||
6 | * a installed and supported operating system (e.g. CentOS 7.x) |
||
7 | * root-access |
||
8 | * a fast internet connection |
||
9 | * epel |
||
10 | |||
11 | h2. Preliminary Note |
||
12 | |||
13 | This procedure is based on a documentation supplied by https://www.hostinger.com/tutorials/how-to-install-clamav-centos7 |
||
14 | |||
15 | h2. Install |
||
16 | |||
17 | <pre><code class="shell"> |
||
18 | yum install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd |
||
19 | </code></pre> |
||
20 | |||
21 | h2. SELinux config |
||
22 | |||
23 | <pre><code class="shell"> |
||
24 | setsebool -P antivirus_can_scan_system 1 |
||
25 | setsebool -P clamd_use_jit 1 |
||
26 | </code></pre> |
||
27 | |||
28 | verify changes |
||
29 | |||
30 | <pre><code class="shell"> |
||
31 | getsebool -a | grep antivirus |
||
32 | </code></pre> |
||
33 | |||
34 | 2 | Jeremias Keihsler | <pre>antivirus_can_scan_system --> on |
35 | antivirus_use_jit --> on</pre> |
||
36 | 1 | Jeremias Keihsler | |
37 | h2. ClamAV config |
||
38 | |||
39 | remove 'example'-string from config-file |
||
40 | |||
41 | <pre><code class="shell"> |
||
42 | sed -i -e "s/^Example/#Example/" /etc/clamd.d/scan.conf |
||
43 | </code></pre> |
||
44 | |||
45 | open config file and uncomment following line |
||
46 | |||
47 | <pre><code class="shell"> |
||
48 | vim /etc/clamd.d/scan.conf |
||
49 | </code></pre> |
||
50 | |||
51 | <pre>#LocalSocket /var/run/clamd.scan/clamd.sock</pre> |
||
52 | |||
53 | remove 'example'-string from freshclam-config file |
||
54 | |||
55 | <pre><code class="shell"> |
||
56 | sed -i -e "s/^Example/#Example/" /etc/freshclam.conf |
||
57 | </code></pre> |
||
58 | |||
59 | h2. update virus-DB |
||
60 | |||
61 | <pre><code class="shell"> |
||
62 | freshclam |
||
63 | </code></pre> |
||
64 | |||
65 | should result in following output |
||
66 | |||
67 | <pre> |
||
68 | ClamAV update process started at Tue Dec 19 09:30:20 2016 |
||
69 | main.cvd is up to date (version: 57, sigs: 4218790, f-level: 60, builder: amishhammer) |
||
70 | Trying host database.clamav.net (69.163.100.14)... |
||
71 | Downloading daily.cvd [100%] |
||
72 | daily.cvd updated (version: 22739, sigs: 1100989, f-level: 63, builder: neo) |
||
73 | Downloading bytecode-279.cdiff [100%] |
||
74 | Downloading bytecode-280.cdiff [100%] |
||
75 | Downloading bytecode-281.cdiff [100%] |
||
76 | Downloading bytecode-282.cdiff [100%] |
||
77 | Downloading bytecode-283.cdiff [100%] |
||
78 | bytecode.cld updated (version: 285, sigs: 57, f-level: 63, builder: bbaker) |
||
79 | Database updated (5319836 signatures) from database.clamav.net (IP: 168.143.19.95) |
||
80 | </pre> |
||
81 | |||
82 | h2. Service |
||
83 | |||
84 | <pre><code class="shell"> |
||
85 | systemctl start start clamd@scan |
||
86 | systemctl enable start clamd@scan |
||
87 | </code></pre> |