The following steps explains how to install rkhunter in your server.
Firstly login to your server as root. And navigate to the directory where you would download the file.
Now download the source file using wget.
Now extract the file using the following comand.
And get into the directory rkhunter-*
Now, the command below will install rkhunter in your server.
Add the following script to the file.
Now add the following line.
Firstly login to your server as root. And navigate to the directory where you would download the file.
# cd /usr/local/src
Now download the source file using wget.
# wget http://nchc.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.0/rkhunter-1.4.0.tar.gz
Now extract the file using the following comand.
# tar -zxvf rkhunter-1.4.0.tar.gz
And get into the directory rkhunter-*
# cd rkhunter-1.4.0
Now, the command below will install rkhunter in your server.
# ./installer.sh --installNow to automate the scan do the following steps below. We are creating the file in /usr/local/
# vi rkhunterscan
Add the following script to the file.
#!/bin/shNow change the permission.
( /usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /usr/bin/mail -s "rkhunter output" admin@yourdomain.com
# chmod 750 rkhunterscanNow edit the cronjob.
# crontab -e
Now add the following line.
0 3 * * * /usr/local/rkhunterscan -c
No comments:
Post a Comment