{ claus.conrad }

Installing software on PC-BSD 9.2 - for dummies

📅 Sep 22, 2013
3 minutes

I am currently learning my way around PC-BSD 9.2. Read more about why and my findings after the break.

I have used most types of operating systems throughout the years. For those interested in a little history, see my hardware and OS history. For those just interested in the package installation process on PC-BSD, please skip the next paragraphs until after the horizontal line.

At the moment, I am evaluating PC-BSD 9.2 in a virtual machine. Why am I going to this extent, you might ask? Some time ago, I researched web server performance and made the switch from Apache (2.2 or 2.4) to nginx for most of the websites I run or develop, which has resulted in a significantly positive impact on web site perfornance, as well as easier administration. As described in the article mentioned above, my main operating system is Windows 8. Unfortunately nginx does not run easily on that operating system (I realize that it can be done, but it requires some serious tinkering to make it behave the way other Windows services work).

Since I currently develop a website meant to run on nginx on CentOS, the differences between running Apache on my development machine and nginx on the staging/production servers soon became apparent. At that moment, I switched to developing in a VM using the latest version of Fedora, which closely resembled the final environment and made debugging easier (I tried CentOS in a VM, but VMWare didn’t support it with any paravirtualized drivers (“VMWare Tools”), so performance was sub-standard.) However, due to the specs of my development laptop, I can’t afford to run multiple virtual machines efficiently at the same time. Most of my development sites are hosted on SmartOS (also running nginx as the server). So the most logical decision seemed to be to try PC-BSD 9.2 (which has ZFS and *BSD commands, like SmartOS, and supports nginx and related dependencies, like CentOS). The following paragraphs describe my experience with this operating system.

PC-BSD is based on FreeBSD. Most importantly, these *BSD distributions use 2 different software installation methods;

  • pkgng
    The “new” binary installation method. Installs binary (pre-compiled) packages. As far as I know, these are the same packages provided by pkg_add and related tools. To switch to pkgng, run the pkg bootstrap command. Once you go pkgng, you can’t go back to using the pkg_add etc, commands anymore.

  • ports
    The ports collection offers more packages than the binary alternatives described above. The disadvantage is that these packages need to be compiled from source code locally, potentially taking a lot more time. However, the ports system supposedly uses the same database as the binary packaging systems, so stuff doesn’t get out of sync, and it handles dependencies just like the other commands.