Although we are running PostgreSQL mostly on Linux distributions, you can install an run PostgreSQL on a lot of other operating systems. On of them is FreeBSD. FreeBSD is one of those Unixes that derived from the Berkeley Software Distribution (BSD) and it is well known for having very few security issues and it is running a wide range of websites today. In addition, it is the foundation of storage appliances such as Isilon. Running PostgreSQL on FreeBSD is not rocket science and in this post we’ll go through the basics: Installing FreeBSD. In the follow up posts we’ll configure networking, update the system and then install PostgreSQL from pre-build packages and from source.
To make it reproducible for everyone, we’ll be using VirtualBox as the virtualization layer. Obviously you’ll need to download the FreeBSD ISO file for being able to install it. Once you have it downloaded, head over to VirtualBox and create the virtual machine:
The FreeBSD ports tree makes it easy to install additional software, so, please do yourself a favor and enable it:
Next is the file system selection and as ZFS comes with a lot of features, go with it:
Once it is completed and you specified the root password you need to configure the network interfaces. As mentioned earlier I usually go with two interfaces: “em0” is my NAT interface and “em1” is my host only interface:
IPv4 for the NAT interface is fine:
DHCP as well is fine as VirtualBox will take care of it for the NAT interface:
We do not need anything more than ssh and ntp, so the defaults are fine for the services:
That’s it for today. FreeBSD is up and running. In the next post we’ll configure the second network interface, update the system and install PostgreSQL from pre-build packages.