Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | Powered by Blogger.

My blog about Open Source: Zimbra Mail Server,linux,bash script,centos,linux command...

How to install aide centos

In this tutorial, How to install aide Centos.

What does Aide mean

AIDE is one of the most popular tools for monitoring the server changes in a LINUX based system.  It call as Advanced Intrusion Detection Environment.

Install AIDE on Centos

$ sudo yum install aide

Check AIDE Version on your system

$ sudo aide -v

Configure AIDE

$ sudo cp /etc/aide.conf /etc/aide.conf_BK

Add lines not check /tmp and /proc in aide.conf file


Create the database

$ sudo aide --init
$ sudo mv /var/lib/aide/ /var/lib/aide/aide.db.gz
$ sudo cd /var/lib/aide

Run the AIDE check

$ sudo aide --check

Set cronjob to run AIDE check

$ sudo vi /etc/cron.daily/aide

// The content as below:



/usr/sbin/aide  -u > $LOGFILE
cp $AIDEDIR/ $AIDEDIR/aide.db.gz

x=$(grep "Looks okay" $LOGFILE | wc -l)

if [ $x -eq 1 ]
    echo "All Systems Look OK" | /bin/mail -s "AIDE OK" $MAILTO
    echo "$(egrep "added|changed|removed" $LOGFILE)" | /bin/mail -s "AIDE DETECTED CHANGES" $MAILTO

Change mode aide file

$ sudo chmod 755 /etc/cron.daily/aide

For example, Check log change

$ sudo egrep "added|changed|removed" /var/log/aide/aide.log
You have installed on your system. Have a good nice!

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command |

This Blog is protected by