perl script for upgrade rhel 6.1 to 6.4
Hello All,
I want to write a perl script for upgrading the rhel 6.1 to 6.4 but as i'm newer to perl not getting much idea: idea that i'm getting.... create a repo provide a path for rhel 6.4 if already repo is there that can be remove by new one Please help me more on this by providing the ideas: so that i can upgrade multiple VM's at a time by running perl script... Thanks In Advance |
Did you wrtie some script so far.. please share it. Also check RHEL documentations.
As far as I know, following could help (but ensure before you invoke): Code:
~$ yum check-update |
For updating between minor versions like this, just 'yum update' is enough. Absolutely no need to write a program.
|
@GURU
this is not about one or two hosts i wanted to upgrade more than 50 hosts at a time.. So it will save a time as we can run the script on screen. It is time consuming to ssh each host and upgrade it... |
You should have said...
Anyway, you need a loop eg in bash, that works its way through a list of hostnames, ssh's into each one and runs 'nohup yum -y update >yum.log 2>&1 &' Main problem is if any errors occur; its a bit risky to automate this. Note also that it may involve a kernel update, in which case a reboot is required, as (in fact ) new kernels are added instead of updating old ones. |
Quote:
Using a simple loop will also take a lot of time, as it will update systems one by one. Instead OP can do it in bash with password-less login, as follow: Code:
#!/bin/bash Also consider this link once. |
You may want to read this...
How to create a yum repository on RHEL/CentOS 5.x with CD/DVD or ISO images |
well if you want to do a lot of extra work ??
put this in a perl wrapper Code:
yum --releaseserver=6.4 upgrade |
@shivaa; that's why I specified '&' at the end of the cmd, so it wouldn't wait (and nohup so it won't crash on exit).
I assumed ssh-keys. |
getting kicked out from the console
getting kicked out from the console.Getting below error:
Write failed: Broken pipe [root@home ~]# cat /etc/ssh/sshd_config |grep ClientAlive* #ClientAliveInterval 0 #ClientAliveCountMax 3 ClientAliveInterval 60 ClientAliveInterval 60 [root@home ~]# tail -f /var/log/messages Mar 12 17:18:30 home rpc.statd[18915]: Version 1.2.3 starting Mar 12 17:18:30 home rpc.statd[18915]: Flags: TI-RPC Any immediate help would be appreciated....!!! |
Please start your own new thread a full description of the problem.
Do not hijack an old thread that finished a year ago. |
All times are GMT -5. The time now is 01:58 PM. |