Rkhunter Installation

Rkhunter is a very useful tool that is used to check for trojans, rootkits, and other security problems. This tutorial will touch on installing and setting up a daily report for rkhunter.


– Login to your server as root. (SSH)

– Download the Rkhunter.
# wget http://downloads.rootkit.nl/rkhunter-1.2.7.tar.gz

– Unpack the chkrootkit you just downloaded.
# tar -zxvf rkhunter-1.2.7.tar.gz

– Change to new directory
# cd rkhunter-1.2.7

– Install it
# ./installer.sh

Now you can run a test scan with the following command:

# /usr/local/bin/rkhunter -c

How to setup a daily scan report?

# vi /etc/cron.daily/rkhunter.sh

– add the following replacing your email address:

(/usr/local/bin/rkhunter -c –cronjob 2>&1 | mail -s “Daily Rkhunter Scan Report” email@domain.com)

# chmod +x /etc/cron.daily/rkhunter.sh


Set Cron as below :

– Load crontab
# crontab -e

Add this line to the top:
0 1 * * * (/usr/local/bin/rkhunter -c 2>&1 | mail -s “Daily Rkhunter Scan Report” email@domain.com)

Note: Replace email@domain.com with your email address.
Save and exit.

🙂 🙂 🙂 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: