Linux
Patching In Real Time Work Environment
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/erratakeepcache=0debuglevel=2logfile=/var/log/yum.logexactarch=1obsoletes=1gpgcheck=1plugins=1installonly_limit=3tsflags=repackage ///this line should have in /etc/yum.conf[ref_64]name=BSR Tech Hosting Reference System RHEL 6 64-bitgpgcheck=0enabled=1baseurl=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.
What is meant by external filesystems
ReplyDeletenot 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
Deletewhat is use of step2?
ReplyDeletei cant find macros file in /etc/rpm
If it is not exists create manually
Delete[root@bsrtech ~]# cat /etc/rpm/macros
%_repackage_all_erasures 1 //create if non-existent
Step3: