40.10. Installing with FreeBSD Packages
To install using pkg_add, download the package by ftp'ing to the FreeBSD FTP server at ftp2.FreeBSD.org, and then change to the /pub/ports/packages directory. At that point, the directory at the FTP server should be similar to the Ports collection directory organization. Change directory to the category (such as "lang"). Get the gzipped tar (Section 15.7) file of the package for your application, using binary transfer. For instance, the Ruby scripting language interpretor is ruby-18.104.22.1682.05.23.tgz, which is then downloaded:
ftp > get /pub/ports/packages/lang/ruby-22.214.171.1242.05.23.tgz
Once the file is downloaded, type pkg_add and the package name:
# pkg_add ruby-126.96.36.1992.05.23.tgz
Instead of downloading the file manually, you can use the -r option to have the pkg_add application look for the latest build of an application and automatically download necessary dependent files and the target application itself:
# pkg_add -r ruby-188.8.131.522.05.23.tgz
Note, though, that the newest versions of an application may not be in the stable build directory. If you want an application not on this tree, you'll have to download the application file manually.
Copyright © 2003 O'Reilly & Associates. All rights reserved.