Local Private Mirror

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Local Private Mirror

Postby mahalay » Sat Jan 25, 2014 7:40

Hello Guys,

I have several (and growing in number) Sabayon boxes in my local network. Updating all of them is a problem because all of it have to connect to the internet to fetch the packages.

Could somebody point to me a guide on how to setup my own local mirror?

Thanks
mahalay
Baby Hen
 
Posts: 10
Joined: Tue Jul 12, 2011 15:05

Re: Local Private Mirror

Postby sabayonino » Sun Jan 26, 2014 12:46

hi

1 - you need a ftp/http/rsync "server" for your LAN

choose your machine to put your local mirror

2- you can sync your local mirror from https://www.sabayon.org/download
choose your favourite rsync mirror (Example : rsync://na.mirror.garr.it/sabayonlinux)
(you can see the structure browsing ftp/http download page )
3 - Sync with rsync command
for exampl,e , you want put your mirror in yor home directory ( ${HOME} )

If you don't want to donwload ISO and some other directories but only amd64 packages you can exclude them in a text file

(Example I need 64bit packages and sabayonlinux.org + sabayon-weekly repositories only)
Code: Select all
$ nano -w exclude.list

Code: Select all
/distfiles
/iso
/entropy/standard/portage
/entropy/standard/sabayon-hell
/entropy/standard/sabayon-limbo
/entropy/standard/sabayon-weekly/packages/x86
/entropy/standard/sabayon-weekly/packages/arm*
/entropy/standard/sabayon-weekly/packages-nonfree/x86
/entropy/standard/sabayon-weekly/packages-nonfree/arm*
/entropy/standard/sabayon-weekly/packages-restricted/x86
/entropy/standard/sabayon-weekly/packages-restricted/arm*
/entropy/standard/sabayonlinux.org/packages/x86
/entropy/standard/sabayonlinux.org/packages/armv*
/entropy/standard/sabayonlinux.org/packages-nonfree/x86
/entropy/standard/sabayonlinux.org/packages-nonfree/arm*
/entropy/standard/sabayonlinux.org/packages-restricted/arm*
/entropy/standard/sabayonlinux.org/packages-restricted/x86
*.debug.tar.bz2


I've exlude all debug files and arm directories that i don't need

Now you can use rsync to sync your mirror
Code: Select all
$ rsync -Pavz --exclude-from=/path/where/is/exclude.list  --delete-after rsync://na.mirror.garr.it/sabayonlinux ${HOME}


first sync take a long time and several space

then you can configure a ftp/http/rsync server for your local machine

and setup all client to point to your http/ftp/rsync machine or simply a NFS folder ---> https://wiki.gentoo.org/wiki/NFSv4 (skip kernel configuration) and setup all client to point to file::///nfs-folder

PS : you can set a cronjob to do that (weekly or monthly)
and see
Code: Select all
# man rsync

for other rsync options

Image
User avatar
sabayonino
Sagely Hen
 
Posts: 2516
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Local Private Mirror

Postby Mr.Sabyon » Sat Apr 05, 2014 19:23

Thx for private mirror how-to. I got it running and its nice to have 40MB/s for update process, especially if you have more installations on local network.
If somebody wonder...mirror for x64 has around 73GB (with exclude list aplied).
For configuring local sabayon installation - to go for yours local mirror, you can change entropy_sabayon-weekly to:
[sabayon-weekly]
desc = Home mirror
repo = http://yourwebserver/sabayon64/entropy
pkg = http://yourwebserver/sabayon64/entropy
enable = true

..then just "sudo equo update" and thats all.
Mr.Sabyon
Baby Hen
 
Posts: 13
Joined: Sat Apr 05, 2014 19:00

Re: Local Private Mirror

Postby sabayonino » Sat Apr 05, 2014 19:51

nice

you can mount your local "mirror" to NFS folder and set "file:///" instead "http://" protocol :roll:

Code: Select all
[sabayon-weekly]
desc = Sabayon Local Mirror
repo = http://pkg.sabayon.org#bz2
enabled = true
pkg = file:///mnt/mirror/entropy




Client :
Code: Select all
192.168.0.3:/export/repo/mirror         /mnt/mirror     nfs     ro,_netdev,nolock,auto  0 0

Common Mirror for my LAN

and
Code: Select all
192.168.0.3:/export/packages          /var/lib/entropy/client/packages  nfs   rw,_netdev,nolock,auto 0 0

Common Dnwload folder for my LAN

192.168.0.3 is a Gentoo NFS Server for my LAN
User avatar
sabayonino
Sagely Hen
 
Posts: 2516
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Local Private Mirror

Postby Mr.Sabyon » Sat Apr 05, 2014 20:39

Yes, I know that, but at least for me is http more flexible and less laborious, than exporting nfs folder-s to all pc. I also use local mirrors for centos and linux mint, so having everything together and exporting it with the same protocol to different systems is advantage for me. Once again thx for howto.
Mr.Sabyon
Baby Hen
 
Posts: 13
Joined: Sat Apr 05, 2014 19:00


Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest