RE: Major version upgrade via YUM??

"Sciandra, Joel" <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <82B538FA073F2A4CA1F6DEA063B12BD801495579@STNTEXCH12.cis.neustar.com>
As I have 120 server appliances to upgrade, reinstall would, well, suck.

Thanks for the script. I will play around with it. I need to change it
to 32bit, smp arch.
Any other guidance that you can think of. Thanks in advance.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Garrick Staples
Sent: Friday, September 12, 2008 11:25 AM
To: Yellowdog Updater, Modified
Subject: Re: [Yum] Major version upgrade via YUM??

On Fri, Sep 12, 2008 at 10:55:24AM -0400, Seth Vidal alleged:
> On Fri, 2008-09-12 at 10:47 -0400, Sciandra, Joel wrote:
> > Are there issues doing a major version upgrade such as Centos 4.6 to

> > Centos 5.2 via YUM?
> > 
> 
> I think you'll find the kernel swap-around is tricky from 4->5 b/c of 
> all sorts of dep changes.
> 
> Big jumps like that are frequently dodgy but do-able provided you 
> reduce the set of pkgs on the machine to as small a set as possible.
> 
> My general suggestion if you want to try it would be:
>  1. to do a full backup
>  2. attempt the update
>  3. if it fails then punt and reinstall up to 5.2

Here's my quick and dirty script that I've been using.  It really is an
ugly thing to do to a machine.

The rpm URLs need to be updated.


#!/bin/bash

set -e
set -x

rpm -Uvh
http://mirrors.usc.edu/pub/linux/distributions/centos/5.1/os/x86_64/Cent
OS/centos-release-5-1.0.el5.centos.1.x86_64.rpm
http://mirrors.usc.edu/pub/linux/distributions/centos/5.1/os/x86_64/Cent
OS/centos-release-notes-5.1.0-2.x86_64.rpm

rpm -e MySQL-python
rpm -e e2fsprogs.i386 --justdb --nodeps
rpm -e elfutils.i386 --justdb --nodeps
rpm -e --justdb --nodeps python-elementtree

sed -i 's/centos4/CentOS-5/' /etc/yum.repos.d/CentOS-Base.repo

yum -y update

rpm -e python-sqlite --allmatches --nodeps rpm -Uvh
http://mirrors.usc.edu/pub/linux/distributions/centos/5/os/x86_64/CentOS
/python-sqlite-1.1.7-1.2.1.x86_64.rpm

yum -y update
yum clean all

echo Fixing /etc/sysconfig/autofs
(
 . /etc/sysconfig/autofs
   echo -n OPTIONS=\"
   for a in $LOCALOPTIONS;do
     case "$a" in
        -*) echo -n $a\ ;;
        *) echo -n -O $a\ ;;
     esac
   done
   echo -n -Dro=\"\"\ 
   echo \"
) >> /etc/sysconfig/autofs


--
Garrick Staples, GNU/Linux HPCC SysAdmin University of Southern
California

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.