Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and configuration of clamav

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Installation and configuration description of Clamav antivirus software:

Install clamav antivirus software and scan the Guizhou node to see if there is a virus.

When compiling ClamAV, you should include a zlib library for compression and decompression functions

1. System environment: centos6.4

Software: zlib-1.2.7.tar.gz clamav-0.97.6.tar.gz

Software download address:

Http://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.7/zlib-1.2.7.tar.gz

Http://nchc.dl.sourceforge.net/project/clamav/clamav/0.97.6/clamav-0.97.6.tar.gz

two。 Installation

[root@ts181test] # wget http://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.7/zlib-1.2.7.tar.gz

[root@ts181test] # wget

Http://nchc.dl.sourceforge.net/project/clamav/clamav/0.97.6/clamav-0.97.6.tar.gz

2.1 installation of zlib

[root@ts181 test] # tar xfzlib-1.2.7.tar.gz

[root@ts181 test] # cd zlib-1.2.7

[root@ts181 zlib-1.2.7] #. / configure

[root@ts181 zlib-1.2.7] # make & & make install

[root@ts181 zlib-1.2.7] # cd..

2.2 add users

Add user group clamav and group member clamav (Note: users must be added before installing clamav-0.97.6.tar.gz)

[root@ts181 test] # groupadd clamav

[root@ts181 test] # useradd-g clamav-s/bin/false-c "Clam AntiVirus" clamav

2.3 clamav installation

[root@ts181 test] # tar xfclamav-0.97.6.tar.gz

[root@ts181 test] # cd clamav-0.97.6

[root@ts181 clamav-0.97.6] #. / configure--prefix=/opt/clamav-disable-clamav

[root@ts181 clamav-0.97.6] # make&& make install

3. Configuration 3.1 create a directory

Mkdir / opt/clamav/logs (log storage directory)

Mkdir / opt/clamav/updata (clanav virus library directory)

3.2 create a file:

Add two logs files, clamd.log and freshclam.log, under the / var/log directory, change the owner to the newly added clamav user, and set the corresponding file read and write permissions

Touch / opt/clamav/logs/freshclam.log

Touch / opt/clamav/logs/clamd.log

3.3 configuration / etc/clam.conf Fil

[root@ts181 clamav-0.97.6] # cd/opt/clamav

[root@ts181 clamav] # vim etc/clam.conf

# Example comment out this line. Line 8

LogFile / opt/clamav/logs/clamd.log

PidFile / opt/clamav/updata/clamd.pid

DatabaseDirectory / opt/clamav/updata

3.4Configuring freshclam.conf files

[root@ts181 clamav] # vimetc/freshclam.conf

# Example comment out this line

DatabaseDirectory / opt/clamav/updata

UpdateLogFile/opt/clamav/logs/freshclam.log

PidFile/opt/clamav/updata/freshclam.pid

3.5 File authorization

[root@ts181 clamav] # chown clamav:clamav/opt/clamav-R

4. Run 4.1 upgrade

[root@ts181 clamav] # / opt/clamav/bin/freshclam

# # upgrading virus database

4.2 Antivirus

[root@ts181 clamav] # / opt/clamav/bin/clamscan-- check and kill files in the current directory

[root@ts181 clamav] # / opt/clamav/bin/clamscan-r-- kill all files and directories in the current directory

[root@ts181 clamav] # / opt/clamav/bin/clamscan / home/leng-- check and kill dir directory

[root@ts181 clamav] # / opt/clamav/bin/clamscan-r / home/leng-- kill all files and directories under the directory dir

4.3 View help

[root@ts181 clamav] # / opt/clamav/bin/clamscan-- help

5. Automatic update

Run / opt/clamav/bin/freshclam-d in the background

Scheduled tasks:

[root@ts181 clamav] # crontab-e

1 3 * / usr/local/clamav/bin/freshclam--quiet

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report