Friday, November 11

Linux Patching In Real Time Work Environment


Linux Patching In Real Time Work Environment
                                                                                     


Step1:
Take backup of all previoues Configuration, Like uptime ,date,version,FileSystem,LVM's,Memory info,network info,etc....
[root@bsrtech ~]# uptime; date >> /tmp/patch.date; date; cat /etc/redhat-release; uname -a; df -hPT; cat /etc/fstab; pvscan; lvscan; multipath -l; cat /proc/scsi/scsi; cat /etc/exports; lspci; free -g; ifconfig -a; cat /proc/net/bonding/bond0; netstat -rn;
(Note : In above command take all outputs in /tmp/patch.date file)
Step2:
Check macros file in rpm directory
/etc/rpm/macros (Per-system customizations)
[root@bsrtech ~]# cat /etc/rpm/macros
%_repackage_all_erasures 1 //create if non-existent
Step3:
Now Check yum.conf configuration file
/etc/yum.conf
[root@bsrtech ~]# cat /etc/yum.conf
[main]
cachedir=/export/errata
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
tsflags=repackage ///this line should have in /etc/yum.conf
[ref_64]
name=BSR Tech Hosting Reference System RHEL 6 64-bit
gpgcheck=0
enabled=1
baseurl=http://192.168.2.98/6_64_ref/
http://192.168.2.99/6_64_ref/
[root@bsrtech ~]#
Note: In above File " tsflags=repackage" is enabled and will be effective for every new update you install. You’ll notice a new action named “Repackage” before the usual “Updating” stage is shown.
Step4:
Clean all reposotories
[root@bsrtech ~]# yum clean all
Step5:
Before update the Server, Check for available updates
[root@bsrtech ~]# yum check-update
Step6:
Now update the Server means Patching the given Server using "yum update" command
[root@bsrtech ~]# yum update -y
Step7:
After Update reboot the Server for apply latest patches
[root@bsrtech ~]# shutdown -rf now (or) # init 6
Note :
Before reboot: comment external FileSystems (Dont commnet OS-related and NAS Files systems)
After Reboot: Uncoment External Filesystems


Thanks for reading our blog – Sharing knowledge to all.

3 comments:

  1. What is meant by external filesystems

    ReplyDelete
    Replies
    1. not os related , what u r created manually . comment only more than 1TB size of fs . If u r not comment more size fs booting process is slow

      Delete
  2. what is use of step2?

    i cant find macros file in /etc/rpm

    ReplyDelete

:: Linux - Legends ::