Monday, March 1, 2021

RHEL7 - System patching Manually

 RHEL 7 - Manual patching
1. Apply patch to your system
# rm -rf /var/cache/yum && yum --enablerepo=* clean all
# yum enablerepo=epel check-update
# yum --enablerepo=epel update -y

2. Update AIDE database
# aide --init && /bin/cp /var/lib/aide/aide.db.new.gx /var/lib/aide/aide.db.gz && top

3. Check if you have to reboot the system
# need-restarting -r
# shutdown -r now or reboot    # if reboot needed

4. Check if system if patched
# ansible -i myhosts -all -a "yum --enablerepo=epel check-update" -b -K

Run all in one line
# rm -rf /var/cache/yum && yum --enablerepo=* clean all && yum --enablerepo=epel update -y && aide --init && /bin/cp /var/lib/aide/aide.db.new.gx /var/lib/aide/aide.db.gz && top

No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...