We know that Pkg_add is used in FreeBSD to install software through the package a command, while-R is that the local does not have package packets, installed automatically downloaded from the Internet. The default sites are generally as follows:
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/All/
Such a format, access to foreign servers are generally slower than domestic, especially now when the submarine optical fiber on the occasion of the earthquake, foreign sites are more difficult to access. So it is very necessary to modify this default FTP site, so you need to set Packagesite this environment variable, such as in the CSH shell I have changed:
Bsd#setenv Packagesite ftp://ftp.freebsd.org.cn/pub/FreeBSD/ports/i386/packages-6.1-release/All/
Note that there are different ways to set up environment variables in different shells, which are not prompted for errors when they are run in different shells, but are not effective when set.
SH Shell with:
Export packagesite=ftp://ftp.freebsd.org.cn/pub/freebsd/ports/i386/packages-6.1-release/all/
Okay, now it's much faster to install software downloads through Pkg_add-r!
--------------
Actually it's more convenient to set the packageroot=ftp://ftp.freebsd.org.cn! 2007.3.5
---------------
2008.3.23
These two environment variables are very useful, in general, we use Packageroot on the line.
But in some cases you may want to use packagesite, such as: You upgrade a release kernel to stable, for example, now 7.0 However, there is no package-7.0-stable directory for this package, and now you can only use the existing Packages-7.0-release directory. Since you upgraded to stable, you can use Pkg_add-r when you set the Packageroot variable: ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/i386/ packages-7-stable/latest download files, and actually this directory does not actually exist, so we are hoping from:
Ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/i386/packages-7-release/Latest this directory download. At this time can not use packageroot, but should use the packagesite.
On the FTP inside the specific situation of the directory, you can FTP to specific sites, optimistic about the setting.