Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create your own apt-get repository
#1

I got a request in #fedora on how do you create your own apt-get mirror. Well its actually very easy. This will just go over how to do the updates branch for fedora core1. I also use rsync since almost every offical mirror secrectly runs an rsync server. I use this so I can keep my 120+ servers here at work updated without using all the bandwidth during updates.I can download an update once then its on the lan and updates are quick.

 

This is my mirror.sh script i run in crontab nightly.

 



Code:
cd /mirror/apt/fedora/RPMS.updates/
rsync -az --delete  --exclude=*src.rpm rsync://mirror.hiwaay.net/fedora-linux-core-updates/1/i386/*.rpm ./
genbasedir --bloat --bz2only /mirror/apt/fedora updates




 

so i cd into the directory i want to store all the updates. You'll notice its called RPMS.updates this is just how apt works. If you look at your sources.list you'll see an entry like this

 

rpm [/url]http://ayo.freshrpms.net redhat/9/i386 os updates

 

so the os means RPMS.os and updates is RPM.updates

 

you can name them whatever you want.

 

Then the genbasedir is creating what is on the server so apt knows the the server has for it to download and such.

 

From there you can link it to your ftp or web site. Like mine is at [url=http://www.domain.com/mirror/apt/fedora]http://www.domain.com/mirror/apt/fedora

 

so i have a symlink that looks like /var/www/html/apt -> /mirror/apt/

 

then my sources file looks like

 



Code:
rpm http://www.domain.com mirror/apt/fedora os updates




 

as you can see i also did the os. So I made a RPMS.os and ran the genbasedir on that. You only need to do that once. Those are the rpms off the normal fedora core 1 cds

Reply
#2
I wish I had the bandwidth to share :)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)