Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have several linux workstations on the local network, with more on the way and I'd like to set up a local repository to save bandwidth and speed up installation and updates. However, we use CentOS for servers, and the workstations are a combo of Fedora and Ubuntu.

I've looked around and have seen how to do this for Fedora or Ubuntu, but I was wondering how to best go about this. Ideally, it downloads a package once when it's requested and stores it in a cache, re-downloading only when the package updates.

Any other ideas? lftpfs looked like a good idea, but I couldn't get it to work stably. I guess I could set up a squid proxy, but I was under the impression it cached based on TTL, rather than timestamp on the remote package, and I don't want to allow other browsing through the proxy, as the network is quite locked down.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

You can easily setup Squid to do what you want; just limit the set of mirrors you want to allow access to, bump up the object size to cache, and Bob's your auntie's live-in lover.

share|improve this answer
    
I remembered the other reason I wasn't terribly keen on using Squid, I don't really want to have people type in a separate proxy server for the initial installation and updates. However, for storage and speed concerns, the packages need to be on a separate server. Is it possible to configure squid in such a way that it pulls from, say, us.archive.ubuntu.com when incoming requests are made to ubuntu-repository.example.com ? –  user17642 Aug 23 '09 at 2:51

You could start your own mirror. This is quite easy with rsync. Sometimes mirror-maintainers are even able to give you a push when they update their mirror.

However, this might use a bit of your diskspace. ;) For ubuntu, you could use apt-proxy or one of it's clones. There might be proxies like this for fedora and centos.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.