Home______________________________________________________________________
Starting with RELEASE 10.0, the FBSD development team re-designed how the ports collection is updated and distributed. The svn "IE: subversion" development version control application is the cornerstone of this new method. At the same time a new FBSD in-house written application for handling the updating and distribution of the package collection named "pkgng" totally replaces the method used in previous FBSD releases.
FBSD has a very large collection of over 24,300+ Unix flavored 3rd party software applications which have been 'ported' (IE: converted) to install and run on the FBSD system. The ports collection is constructed using five small config files for each software port. These config files contain all the necessary information to allow your system to automatically download the software source, unpack, patch, compile, and install the port. Downloading these config files does not install the actual port program. After downloading the port's config files, you have to change into the directory structure on your system "cd /usr/ports" where the port you want to install has its port config files located and then issue the "make install clean" command to compile and install the port. If the port depends on other ports, those dependant ports also have to be in the hosts ports collection and will be compiled if not already installed. Sometimes dependents have there own dependences that also have to be in hosts ports collection. This method entails the downloading the five small config files for each of the available ports. I call this the brute force method. The ports collection is grouped into categories, most categories contain hundreds of ports. The shortcuts that eliminate this brute force approach are absent from the official documentation. The requirement to maintain a complete copy of the ports collection config files when at most a normal server uses less than 20 primary ports means most of what you have on the host system port collection is unnecessary. Both the brute force method and a shortcut approach that results in only downloading the config files for your selected primary ports is covered here.
The package collection is designed to simplify the ports collection and eliminate the huge disk storage requirements while also drastically reducing the download bandwidth requirement, a large percent (96%) of the ports have been pre-installed and converted into binary packages. The few ports which are not made into packages have technical or legal license restrictions about distribution of binary versions. Installing a package version of a software application port does not require any resident config files or compiling. It's just a matter of the package loading the pre-compiled binary execution modules to their directory locations on your running system. Even the downloaded package is deleted after it installs itself. If the packaged port depends on one or more other ports to function, the packaged version of those dependents will be automatically downloaded and installed if they are not already on your system. This is definitely more convenient, uses much less disk space, and most important, the download is smaller and quicker.
So really the 3rd Party Software Ports Collection is maintained in two separate collections, the ports collection and the packages collection. The svn program or the portsnap program is used by the ports collection to control the selection and downloading of the config files, and then the 'make' program does the actual compile install. The 'pkg install' command is used for the package collection to select, download, and install the desired package with all it's dependents.
Installer Note: Lets be absolutely clear what the FBSD 3rd Party Software Collection is comprised of. When a complete software application, or some special purpose code, or some new function to a member of the current 3rd Party Software Collection is found on any of the other license free Unix flavored operating systems or from any of the Unix shareware development sites, or something written by a developer, a port maintainer creates the FBSD five port config files necessary to install that application software on a FBSD system.
The problem with this process is that there is no documentation generated by the individual creating the port config files on what the intended purpose is, how to use it or configure the software the port delivers. You have to install it on your system before you have access to any documentation. It’s up to you to try to figure out how to use it and just what it’s suppose to do and if it's the correct fit for your intended purpose.
The FBSD 3rd Party Software Collection is not a library collection of professional grade software. It’s a collection of legally contributed bits and pieces of code, and in some cases complete applications which have their own separate maintenance team and documentation totally unrelated to the FBSD project. Some of the ports you see with massive dependency lists are really pre-configured desktop environments for the xorg-graphical desktop. Even the fact that this is what the port is, is not even expressed in any way. This lack of an informative narrative overview at the port level on the majority (IE: 95 percent) of the 3rd Party Software ports Collection leaves many a person totally confused as to what to do next.
With such a large inventory of 3rd Party Software Applications to choose from, the task of finding the correct Software Application that meets your needs can be a very hard task indeed.
The FBSD online web site provides two aides to help you in your quest.
1. An application name search.
https://www.freebsd.org/cgi/ports.cgi
2. An alphabetic list in full name order of the complete ports collection
https://www.freebsd.org/ports/master-index.html
The overall collection is just so darn large, and even some of the categories are so large it's just such a hard task navigating around looking and reading descriptions, that a person becomes overwhelmed. I found it's easier to ask a question on the FBSD questions mailing list describing what I wanted to do or what I was looking for, and have somebody recommend an application. With an application name in hand, I used one of the tools above to drill down into the listing of the collection, looking to see what other similar applications are out there around the individual application I an interested in.
Once you find an application you want to install, you have to find its download name that is used by svn or portsnap for the ports collection and by "pkg install" for the package collection. The two FBSD online web site aides display the internal application name with its version suffix. This is the name you use to select that port or package.
Example: I am interested in the Apache server application and from the response I received from the questions list I know it’s in the WWW category and I should use the 2.2 version. Using the FBSD online web site aide
https://www.freebsd.org/cgi/ports.cgi I do the following:Enter the word apache in the search argument box on the far left.
Click on the search button to launch the search.
The search returns a display of every port where the word apache was found grouped by category. The results show me all the ports that are in any way related to apache, most are extensions, add-ons, or plug-ins, until you come to the WWW category. This is what is displayed for apache.
apache22-2.2.27_2
The extremely popular Apache http server. Very fast, very clean
Maintained by: apache@freebsd.org
From the online search results you can see that our apache example depends on many other ports to function, indicated by the 'Requires:' field.
The package system will automatically download and install all the interdependencies for you. You should also realize from this explanation just how convenient the package collection is to use.
Packages do not require any additional compilation. For large applications, such as Mozilla, KDE, OpenOffice or GNOME this drastically reduces the install time over compiling the port.
Packages do not require any understanding of the process involved in compiling software on FreeBSD.
Packages do not require the downloading and permanent inventory on your system's hard drive of the five separate mandatory config files per port and their interrelated dependences config files.
Packages by their very nature are appropriate for users who have phone dial in 56K modem access to their ISP for Internet access.
Packages are for users who have no interest in or lack the ability to read or hack the source application code.
Some ports have other ports which are add-ons or plug-ins that add additional functions to the base port. For example, Apache can be configured with a wide variety of different add-on functions. By building from the port you do not have to accept the default install options, and can set them yourself.
In some cases, multiple packages will exist for the same port to specify certain settings. For example, GhostScript is available as a GhostScript package and a GhostScript-nox11 package, depending on whether or not you have installed an X11 server. This sort of rough tweaking is possible with packages, but rapidly becomes impossible if an application has more than one or two different compile time options.
The licensing conditions of some software distributions forbid binary distribution. They must be distributed as source code.
Some people do not trust binary distributions. At least with source code, you can (in theory) read through it and look for potential problems yourself.
If you have local patches, you will need the source in order to apply them.
Some people like having code around so they can read it if they get bored, hack it, borrow from it (license permitting, of course), and so on.
pkg install xxxxx
Where xxxxx is the download name you retrieved above. For example:
pkg install apache22-2.2.27_2 for that particular version
pkg install apache22 for the most current version
This command will fetch the requested package from the remote pkg server, download the package file to a temporary location on your system, determine if it has dependences and first download and install them in correct order, then execute itself to move the execution binaries to the proper locations in the directory tree, and then remove its downloaded package file and all its temporary work files.
This FreeBSD Install Guide is an public domain HOW-TO. This content may be reproduced, in any form or by any means, and used by all without permission in writing from the author.