Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Centos 6.5. install the antivirus software clamav

Shulou Source: shulou.com Published: 2022-06-01 04:38:15 10月03日 Update

First, install clamav files

1. Use the rz-y command to upload to the / usr/local/src directory

two。 Create clamav group groupadd clamav

3. Create clamav user useradd-g clamav clamav

4. Extract the file tar-zxvf clamav-0.98.7.tar.gz

5. Start configuring the directory. / configure-- prefix=/usr/local/clamav

6. If there is a missing libxml and openssl error during the configuration process, use yum install libxml* openssl*-y to install the missing package file.

7. Install clamav make & & make install

8. Create the logs file mkdir / usr/local/clamav/logs (log storage directory)

9. Create the updata folder mkdir / usr/local/clamav/updata (clamav virus library directory)

10. Change the file name using the cp command

11. Edit vi / usr/local/clamav/etc/clamd.conf

# Example comment out this line. Line 8

LogFile / usr/local/clamav/logs/clamd.log delete the previous comments directory and change it to line 14 below logs

PidFile / usr/local/clamav/updata/clamd.pid delete the previous comment path and change line 57

DatabaseDirectory / usr/local/clamav/updata same as line 65 above

twelve。 Edit vi / usr/local/clamav/etc/freshclam.conf

# Example comment out this line. Line 8

Line 13 of DatabaseDirectory / usr/local/clamav/updata

Line 17 of UpdateLogFile / usr/local/clamav/logs/freshclam.log

Line 51 of PidFile / usr/local/clamav/updata/freshclam.pid

13. Create a log file

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

Chown clamav:clamav / usr/local/clamav/logs/freshclam.log

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

Chown clamav:clamav / usr/local/clamav/logs/clamd.log

Chown clamav:clamav / usr/local/clamav/updata

/ usr/local/clamav/bin/freshclam (upgrade virus database) ensure that your LINUX can surf the Internet normally. Upgrading the virus database will be slow. Please wait patiently.

# sometimes there is an error when you use the clamscan command, and you can make a soft connection at this time #

Ln-s / usr/local/clamav/updata/ / usr/local/clamav/share/clamav

14. Start using the command / usr/local/clamav/bin/clamscan-r / home (make a directory to start virus detection) if you find a virus using the-- remove command,-1 / var/log/clamscan.log generates a log file

Tags: File directory command comment virus log time virus library one line upgrade configuration patience file name folder user path procedure error will report guarantee Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Xiaomi MariaDB Docker macOS