Advance

Install ClamAV antivirus on CentOS 7

Install ClamAV antivirus on CentOS 7
1
(1)

Previously, we have said about Linux security, In this article, we are going to learn how to install ClamAV antivirus on CentOS 7 for better server protection.

 

Install ClamAV antivirus on CentOS 7

First, let’s know why should we install an antivirus. While Linux is one of the most secure systems, but if you need to protect your Linux VPS or server, it is better to install an antivirus. Between all available options, you are recommended to use ClamaAV. As it is an open-source antivirus and is successfully against trojans, malware, and other security threats.

Recommended Article: Install ClamAV antivirus on CentOS 7

A Step-by-Step Guide

In the beginning, make sure that you did root access to your CentOS 7 server or VPS.

Note: you need to know how to use Putty to establish the SSH connection.

1. ClamAV does not come prepackaged in CentOs by default, so you need to add the repository by running yum commands.

yum install -y epel-release

 

2. After connecting to your terminal, enter the following command to download prerequisites for installation.

yum install -y clamav

 

3. After a while, the ClamAV antivirus is installed on your CentOS Linux and is ready to run.

4. Before scanning and working with ClamAV antivirus, please update it.

Note: the ClamAV antivirus, has a database that needs to be updated from time to time.

freshclam

 

Some useful commands for ClamAV antivirus

1. Use the following command to immediately scan the main branches.

clamscan

 

2. You can use the -r switch to scan a specific folder. For example, we want to scan the / home directory.

clamscan -r /home

 

3. To have a full scan of the root branch, enter the following command.

clamscan -r /

 

4. Use the -i switch if you want to show virus files.

clamscan -r -i /home

 

5. To remove viruses, use the -remove switch.

clamscan -r -remove /home

 

6. Use the help parameter to get acquainted with other switches and other features of ClamAV antivirus.

clamscan --help

 

conclusion

And, at the end of this article, we recommend users who face several attacks or frequent unknown file transactions, to install ClamAV antivirus on CentOS to prevent from spreading immediately if malware is detected.

 

How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day