How to install Malware Detect (Maldet) on CentOS
Malware Detect is very easy to install on CentOS, regardless of the control panel you might or might not utilize (cPanel/WHM, Directadmin, etc). Maldet also known as Linux Malware Detect virus scanner for Linux.
There is nothing complicated in installation process, but root access to your server is required.
You need to SSH into your server and fire the following commands to install maldet
cd /usr/local/src/ wget http://www.rfxn.com/downloads/maldetect-current.tar.gz tar -xzf maldetect-current.tar.gz cd maldetect-* sh ./install.sh or sudo sh ./install.sh maldet --update-ver maldet --update
Configuring LMD
By default all options are disabled in the configuration file, so configure it according to your needs.
email_alert : If you would like to receive email alerts, then it should be set to 1. email_subj : Set your email subject here. email_addr : Add your email address to receive malware alerts. quar_hits : The default quarantine action for malware hits, it should be set 1. quar_clean : Cleaning detected malware injections, must set to 1. quar_susp : The default suspend action for users wih hits, set it as per your requirements. quar_susp_minuid : Minimum userid that can be suspended.
Open file /usr/local/maldetect/conf.maldet and make changes according to your needs
nano /usr/local/maldetect/conf.maldet
To update the maldet use the below commands.
maldet -u or maldet -d
To scan the files of specific user
maldet -a /home/username/
To scan all users under public_html paths under /home*/ this can be done with:
root@server[~]# maldet --scan-all /home?/?/public_html
Or
root@server[~]-maldet --scan-all /home
So maldet helps you keep your server secure by adding a level of defense against malicious code, never forget though that it’s not enough, you should always update and keep your firewall updated and configured.
Leave a Reply