The following steps will help you make your Gentoo machine into a portage mirror.
- If you do not have 'rsync', you must install it.
- You must edit '/etc/rsyncd.conf' to set up the mirror.
- In that file there should be a commented block for setting up a gentoo portage mirror. You need to uncomment that. Your file should look like the following.
# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
use chroot = yes
read only = yes
# Simple example for enabling your own local rsync server
path = /usr/portage
comment = Gentoo Portage tree
exclude = /distfiles /packages
- Now you need to restart rsync for the changes to take effect.
- If you have not already added rsyncd to a runlevel, you probably should.
rc-update add rsyncd default
- If you are using 'iptables', you must allow connections to the port used by rsync. If traffic to port 873 is currently not allowed, make it so.
# Permit rsync connections
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 873 -j ACCEPT
- Finally, to use your new mirror from another Gentoo machine, you must set it as the rsync server on the client machine. On the client machine, add this line to '/etc/make.conf' (replace x's with your rsync mirror's ip):