Adding #CentOS 5.4 to local #YUM Repository

On October 14, 2009, in Centos, by How2CentOS

centos
What is CentOS?

CentOS is 100% compatible rebuild of the Red Hat Enterprise Linux, in full compliance with Red Hat’s redistribution requirements. CentOS is for people who need an enterprise class operating system stability without the cost of certification and support.

Following the release of RHEL 5.4, CentOS 5.4 has just hit the CentOS mirrors. Time to update the Local CentOS YUM repository script.

Adding CentOS 5.4 to the YUM repository script

Create the following additional Directories for CentOS 5.4:

# mkdir -p /var/www/html/centos/5.4/os/i386
# mkdir -p /var/www/html/centos/5.4/updates/i386
# mkdir -p /var/www/html/centos/5.4/os/x86_64
# mkdir -p /var/www/html/centos/5.4/updates/x86_64

Add the CentOS 5.4 repository to the bash script which will rsync your local YUM repository server with a CentOS 5.4 YUM mirror.

CentOS Mirror list – http://www.centos.org/modules/tinycontent/index.php?id=30

# vi yum-repo-update.sh

#!/bin/sh

rsync="rsync -avrt --bwlimit=256"

mirror=ftp.is.co.za::IS-Mirror/centos

verlist="5.3 5.4"
archlist="i386 x86_64"
baselist="os updates"
local=/var/www/html/centos/

for ver in $verlist
do
 for arch in $archlist
 do
  for base in $baselist
  do
    remote=$mirror/$ver/$base/$arch/
    $rsync $remote $local/$ver/$base/$arch/
  done
 done
done

NB! Please read creating a Local CentOS YUM repository on CentOS 5.x before implementing.

Upgrading from CentOS 5.3 ( or CentOS 5.0 / 5.1 / 5.2 ):

If you are already running CentOS 5.3 or an older CentOS 5 distro, all you need to do is update your machine via yum by running :

# yum update

Related posts:

  1. Adding #CentOS 5.3 to Local #YUM Repository
  2. Adding #CentOS 5.5 to a local #YUM Repository
  3. Creating A Local #Yum Repository on #CentOS 5.x
  4. Creating a Local #Fedora 11 #Yum Repository
  5. Create #Fedora 13 local #Yum Repository

Tagged with:  

View Comments to “Adding #CentOS 5.4 to local #YUM Repository”

  1. nburlock says:

    I could have used your PHP installation guide a couple of weeks ago when I was learning how to administer a CentOS server from the command line…

    I was wondering, the search box is giving full posts as results, but only a few per page. Is there any way to see some sort of index, more results with a tally, “x of y results”? That sort of thing? It'd make it easier to browse the site.

    Also, your tag cloud widget is looking a bit bare – it needs more tags! :)

  2. How2CentOS says:

    Never tried the search functionality, but you're right, it's shocking! Added Google Ajax search which is pretty cool, give it a try?

    :-) The tag cloud, well, in an attempt to get Categories displayed as pages broke it but it will be up and running soon.

    Thanks for your feedback, alway appreciated!

  3. Instead of running each mkdir command like you do you can run just one command:
    # mkdir -pv 5.4/{os,updates}/{i386,x86_64}

    Which outputs:

    mkdir: created directory `5.4'
    mkdir: created directory `5.4/os'
    mkdir: created directory `5.4/os/i386'
    mkdir: created directory `5.4/os/x86_64'
    mkdir: created directory `5.4/updates'
    mkdir: created directory `5.4/updates/i386'
    mkdir: created directory `5.4/updates/x86_64'

    Just run this same command each time there is a new version and you are all set for your update script.

Leave a Reply

blog comments powered by Disqus
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Afrigator
Blog WebMastered by All in One Webmaster.