Posts

Showing posts from December, 2019

Remove old kernels in CentOS, RHEL and Fedora

Image
Your system to many old kernels version. How to remove old kernels in CentOS , RHEL and Fedora . For example, I have three kernel,and to keep two kernel on system. How to do it! To check kernel release on centos/RHEL and Fedora [huupv@huupv ~]$ uname -sr The output kernel release as below: Linux 4.15.15-300.fc27.x86_64 Checking installed kernel [huupv@huupv ~]$ rpm -q kernel The output three kernel as below: kernel-4.15.13-300.fc27.x86_64 kernel-4.15.14-300.fc27.x86_64 kernel-4.15.15-300.fc27.x86_64 Delete / Remove Old Kernels To install yum-utils [root@huupv huupv]# yum install yum-utils The output as below: Last metadata expiration check: 2:54:35 ago on Sat 14 Apr 2018 07:14:37 PM +07. Dependencies resolved. ================================================================================  Package                  Arch        Version                 Repository   Size ================================================================================ Installi

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 !/tmp !/proc Create the database $ sudo aide --init $ sudo mv /var/lib/aide/aide.db.new.gz /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: #!/bin/bash MAILTO=root LOGFILE=/var/log/aide/aide.log AIDEDIR=/var/lib/aide /usr/sbin/aide  -u > $LOGFILE cp $AIDEDIR/aide.db.new.gz $AIDEDIR/aide.db.gz x=$(grep "Looks okay" $LOGFILE | wc -l) if [ $x -eq 1 ] then     echo "A