emerge --ask app-portage/mirrorselect
Select the Gentoo source mirror(s)
A dialog will appear where the available mirrors can be selected. On save /etc/portage/make.conf will be backed up and written.
* Modifying /etc/portage/make.conf with new mirrors... Reading make.conf Moving to /etc/portage/make.conf.backup Writing new /etc/portage/make.conf * Done.
- This example selects source mirrors only from country USA and adds a new GENTOO_MIRRORS= line to /etc/portage/make.conf:
mirrorselect -i -c USA -o >> /etc/portage/make.conf
- Find 3 fastest servers by downloading 100K from each. This command will use all available mirrors in the list:
mirrorselect -s3 -b10 -D
Please consider using one of these additional options to limit the available mirrors in the list it tests.
Server type selection:
-c COUNTRY, -country COUNTRY only use mirrors from the specified country NOTE: Names with a space must be quoted eg.: -c 'South Korea' -F, --ftp ftp only mode. Will not consider hosts of other types. -H, --http http only mode. Will not consider hosts of other types -r, --rsync rsync mode. Allows you to interactively select your rsync mirror. Requires -i or -a to be used. -R REGION, -region REGION only use mirrors from the specified region NOTE: Names with a space must be quoted eg.: -R 'North America' -4, --ipv4 only use IPv4 -6, --ipv6 only use IPv6
Select the Gentoo rsync mirror
Gentoo documentation states:
Gentoo is hosted by many mirrors around the globe. Selecting a mirror that is geographically near you may help speed up Portage tree updates.
But Gentoo handbook recommends to keep default settings:
The default sync-uri variable value listed above will determine a mirror location based on a rotation. This will aid in easing bandwidth stress on Gentoo's infrastructure and will provide a fail safe in case a specific mirror is offline. It is recommended the default URI is kept.
For those who wish to choose a single mirror in a closer geographic region, a text editor can be used to change the default value. Again, this is not recommended, but can be done if necessary. This can be especially useful for those who use Gentoo in a private company or a large-scale corporate environment.
mirrorselect will not create the /etc/portage/repos.conf/gentoo.conf file automatically. If that file does not exist, mirrorselect will default to using the old make.conf SYNC variable which has been deprecated. In order to avoid this make sure Portage is up to date and copy the repos.conf file from Portage's /usr (library) location to the /etc (configuration) location:
emerge --ask --update sys-apps/portage
cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf
For additional repos.conf documentation and configuration please refer to Portage/Sync#Portage_configuration
Then proceed with using the mirrorselect utility.
- Find a Gentoo rsync mirror (make sure to use
sync-type = rsync):
mirrorselect -i -r -o >> /etc/portage/repos.conf/gentoo.conf
Just navigate to the mirrors of choice and press Space to select one (or more) mirrors.