Get 50% Discount Offer 7 Days


Contact Info

Chicago 12, Melborne City, USA

+88 01682648101

[email protected]

Recommended Services
Supported Scripts
How to Install and Configure Antivirus on Linux Dedicated Server

If you are worried about the penetration of viruses, malware, exploits, or shell scripts into your system, then you should do it. For this, there are tools and antivirus software for your Linux system’s WHM panel that you can use to scan your damaged content. After reading this post you will learn How to Install and Configure Antivirus on Linux Dedicated Server.

Install and Configure Antivirus on Linux Dedicated Server

In this article, we will teach installing antivirus on CentOS, Ubuntu, and Debian distributions of Linux dedicated servers. To do this you can use different antivirus software the most popular among them is ClamAV which is an open-source solution against security threats. So follow the instructions here to secure your system.

install antivirus on dedicated server


– A Dedicated Server (We recommend you visit the Cheap Dedicated Server plans presented on our website and choose a plan.)

Install cPanel on Dedicated Server

Install ClamAV on Dedicated Server (CentOS)

First, you should know that ClamAV is not prepackaged on CentOS. Therefore, we need to add a repository (epel) by running “Yum” commands in the order:

sudo yum -y install epel-release
sudo yum clean all

Now, you are ready to install ClamAV on the CentOS operating system. So, use the following command line:

sudo yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd

How to Configure ClamAV on CentOS

Here you can find the steps to configure ClamAV on CentOS. But before configuring the first step is to remove the example string from the configuration:

sudo sed -i -e "s/^Example/#Example/" /etc/clamd.d/scan.conf

Now it’s time to specify the type of server. Open the configuration file using your text editor (here is nano):

sudo yum install nano -y

Then, open the ClamAV configuration file:

Sudo nano/Etc/cmd.d/scan.conf

You should find the line below :

#LocalSocket /var/run/clamd.scan/clamd.sock

On the command below, remove the example string from the ClamAV fresh clam update configuration file:

sudo sed -i -e "s/^Example/#Example/" /etc/freshclam.conf

At last, use this command to run the ClamAV database update:

sudo freshclam

Then you can run and boot the Clam service:

sudo systemctl start clamd@scan
sudo systemctl enable clamd@scan

Install ClamAV on Dedicated Server (Ubuntu/Debian)

In this section, we are going to show how to install ClamAV antivirus on Ubuntu or Debian. Since the installation process and commands are the same in both operating systems, we will examine the instruction as follow.

install ClamAV on dedicated server

In both operating systems, use the command line below to update your system:

sudo apt update

Now, go to the installation process using this command:

sudo apt install clamav clamav-daemon

To check the installation status, you can run the command below:

clamscan --version

How to Configure ClamAV on Ubuntu/Debian

To configure ClamAV on Ubuntu or Debian follow the commands below:

First, you should stop the daemon to update the ClamAV database manually and then Usenet command to update:

sudo systemctl stop clamav-freshclam 
sudo freshclam

The next step will be to download the latest database signature file by the command below:

sudo wget

Copy the file to the required directory with the related command:

sudo cp daily.cvd /var/lib/clamav/

In the end, start the fresh clam daemon using the following command:

sudo systemctl start clamav-freshclam


That’s all! Here we tried to teach how to install and configure antivirus on Linux dedicated server. Now you can safely use and protect your system. We hope you enjoy this article. Don’t forget that if you own a Linux dedicated server, you must install an antivirus to protect from danger and malicious files. For any question leave command.


Is it essential to use antivirus?

Yes, Operating systems do need antivirus protection. Linux is really safe among other operating systems but it can also be affected by malware and viruses.

Is it possible to use the same antivirus on a dedicated server and my personal computer?

It’s not recommended.

Rate this post
Share this Post

Leave a Reply

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