Hostwinds Tutorials
Search results for:
Table of Contents
You can run a Virus scan using ClamAV in a Linux-based environment, and you can scan for Malware using Linux Malware Detect. You can also use the ClamAV scan engine with Linux Malware Detect for better performance.
The following steps will assist you with the installation of ClamAV for CentOS and Ubuntu. Please note that you may utilize the steps provided for CentOS on a server that is utilizing cPanel.
yum install -y epel-release
yum install -y clamav
freshclam
apt-get update
apt-get install clamav clamav-daemon
freshclam
Once ClamAV is installed, you can run a scan using the following commands. Please note that the following commands apply to both Ubuntu and CentOS.
To check files in all users home directories, issue the following command:
clamscan -r /home
To check all files on the server instance:
clamscan -r /
The following steps will assist you with installing Linux Malware Detect for CentOS, Ubuntu, and servers utilizing cPanel.
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
To scan an entire directory using Linux Malware Detect, you'd type the following:
maldet -a /home
To scan an entire user directory using Linux Malware Detect, you'd type the following, replacing "username" with the actual username:
maldet -a /home/username
To scan the entire server instance using Linux Malware Detect, you'd issue the following command:
maldet -a /
Written by Michael Brower / December 13, 2016