Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Last active March 7, 2020 04:52
Show Gist options
  • Save hoangdh/037f54a3576e3b82bc65f03af754e725 to your computer and use it in GitHub Desktop.
Save hoangdh/037f54a3576e3b82bc65f03af754e725 to your computer and use it in GitHub Desktop.
Install Maldet on CentOS 7.
#!/bin/bash
cd /tmp/
curl -O http://www.rfxn.com/downloads/maldetect-current.tar.gz
tar -zxvf maldetect-current.tar.gz
cd maldetect*
bash install.sh
sleep 5
sed -i 's/quarantine_hits=\"0\"/quarantine_hits=\"1\"/g;s/quarantine_clean=\"0\"/quarantine_clean=\"1\"/g;s/scan_ignore_root=\"0\"/scan_ignore_root=\"1\"/g' /usr/local/maldetect/conf.maldet
# ClamAV
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install clamav clamav-devel clamav-update inotify-tools
# Update DB for ClamAV
echo -e "DatabaseCustomURL http://cdn.malware.expert/malware.expert.ndb
DatabaseCustomURL http://cdn.malware.expert/malware.expert.hdb
DatabaseCustomURL http://cdn.malware.expert/malware.expert.ldb
DatabaseCustomURL http://cdn.malware.expert/malware.expert.fp
DatabaseCustomURL http://www.rfxn.com/downloads/rfxn.ndb
DatabaseCustomURL http://www.rfxn.com/downloads/rfxn.hdb" >> /etc/freshclam.conf
freshclam
maldet -d
maldet -u
echo "Maldet has installed successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment