Find the answer to your Linux question:
Results 1 to 4 of 4
've set up FC2 with YUM and I'm trying to configure this box to serve as a centralized update repositories for 5 FC2 boxes and 15 RH9 boxes. The paln ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2004
    Posts
    8

    MULTIPLE YUM REPOSITORIES


    've set up FC2 with YUM and I'm trying to configure this box to serve as a centralized update repositories for 5 FC2 boxes and 15 RH9 boxes.
    The paln is:
    - To make make this box to download FC2 and RH9 updates automatically from the internet to local repositories, then other clients can use update or yum clients to get the updates.
    1. How do I pull new updates to the repository - yum update through cron?
    2. How do I automatically download RH updates to one directory and FC to another? (yum.conf downloads them all to cachedir directory, I need to actually specify the path for 3 different updates
    3. When issue yum update it gives me the warning
    I will do the following:
    [update: gdk-pixbuf 1:0.22.0-6.1.0.i386]
    Is this ok [y/N]: y
    Is thetre anyway to suppres the promt and just install them?

    Thanks.

    P.S> Could not find any de3cent how-to in the net, if you can point me out then it could be great.

    Thanks.

  2. #2
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    ok, i know what you will need to do, but the specifcs are a little vauge. Basicaly, the easiest way (as i see it) is to set up an FTP on your server, and link all the others to that local ftp address (ie ftp://192.168.100.150) then use either a protocol like rsync (syncs 2 folders based on parameters you set) to the 'big' ftp that you want. Have that become a cron job everynight. so everynight, the server will sync its ftp with that of a mirror. I don't know about separate RH and Fedora updates. But the -y flag for yum will automaticaly answer yes to any prompts.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  3. #3
    Just Joined!
    Join Date
    Aug 2004
    Posts
    8
    that's my problem - in the yum.conf file there is an entry:
    cachedir=/var/cache/yum
    Tha means everything yum update downloads will be placed there - if my yum.com points to fc2 and redhat9 updates at the same time then it looks like bot rpm sets will be downloaded to the same directory (var/cache/yum).
    If this is correct then how can I copy this helluva mix to separate repositories?
    Thanks

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    if you know the headers well enough, you could have a script scan all the files in that directory and move all with fc2 in the name to one folder, and all with rh9 to antther, but i don't know rpm headers well enough for that to be a definitive rule, and that could be a processs that slows things down. I dont think yum can do the sepatation, but if you wanted to do it as the updates came in. just make a script that runs when you type 'yum' as opposed to the normal yum.
    Code:
     yum -update
    yum -upgrade
    if(/var/cache/yum/ | grep rh9)
    mv /var/rh9
    if(/var/cache/yum/ | grep fc2)
    mv /var/fc2
    */dont know about this line, if bash supports else statments*/
    else
    mv /var/undecided
    Thats not the actual code that you would write, but the gist is there ( i dont know scripting at all) and every once an awhile you will have to look at /var/undecided to check for anything thats missed, and with time, you could make the move filters more accurate. But this is a general idea, that might work.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •