How to Install Linux Malware Detect on CentOS 7

r00t November 28, 2017

Install Linux Malware Detect on CentOS 7

In this tutorial we’ll learn how to install Linux Malware Detect on CentOS 7. We will also install and configure its prerequisites. Though Linux is a less targeted Working system, it’s still Significant To track for malware. One of the very best tools out there for doing this is Linux Malware Detect, which utilizes a variety of metrics to identify and remove malware. When utilized along with ClamAV, the well known Antivirus solution for Linux (along with Mac and Windows), Linux Malware Detect provides a very good defense against malicious applications.

I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install Linux Malware Detect on CentOS 7

Step 1. First, ensure your system is fully up-to-date by running the following:

yum -y update

Step 2. Installing Linux Malware Detect.

Download the latest version of LMD using the following command:

curl -O

Unpack the tarball using tar command:

tar -zxvf maldetect-current.tar.gz
cd maldetect*

Run the installation script present in the extracted directory:


Step 3. Configure Linux Malware Detect.

We’ll need to make a few basic modifications to the default configuration file:

nano /usr/local/maldetect/conf.maldet

Here are the settings as they should look:

# Enable Email Alerting

# Email Address in which you want to receive scan reports

# Use with ClamAV

# Enable scanning for root-owned files. Set 1 to disable.

# Move threats to quarantine

# Clean string based malware injections

# Suspend user if malware found. 

# Minimum userid value that be suspended

Next, we’ll be installing ClamAV, so that Linux Malware Detect can use it as its antivirus engine:

yum -y install clamav clamav-devel

Now, update the ClamAV virus databases using the following command.


You can do a lot with Linux Malware Detect. Here’s a sample of some commands you may find useful:

maldet -a /path
maldet -q SCANID
maldet –s SCANID

Update Linux Malware Detect:

maldet -d
maldet -u

Congratulation’s! You have successfully install and configured Linux Malware Detect on your CentOS 7 server. Thanks for using this tutorial for installing Linux Malware Detect on CentOS 7 system.

Leave a Comment

Comments are closed.