FreeBSD is a free, powerful, robust, flexible and stable Open Source operating system based on Unix which is designed with security and speed in mind.
FreeBSD can operate on a large variety of modern CPU architectures and can power servers, desktops and some kind of custom embedded systems, the most notable being Raspberry PI SBC. As in Linux case, FreeBSD comes with a large collection of pre-compiled software packages, more than 20,000 packages, that can be simply installed in the system from their repositories, called “Ports”.
- Download FreeBSD 11.1 CD 1 ISO Image
This tutorial will guide you on how to install the latest version of FreeBSD on an amd64 machine. Typically this installation covers only the command line version of the operating system, which makes it best-suited for servers.
If you don’t require a custom installation, you can skip the installation process and download and run a pre-build Virtual Machine image for VMware, VirtualBox, QEMU-KVM or Hyper-V.
FreeBSD Installation Guide
1. First, get the latest FreeBSD CD 1 ISO image released from FreeBSD download page and burn it to a CD.
Place the CD image into your machine CD/DVD drive and reboot the machine into BIOS/UEFI mode or boot menu sequence by pressing a special key (usually esc,
F12) during the power-on sequence.
Instruct the BIOS/UEFI to use the CD/DVD appropriate drive to boot from and the first screen of the installation process should be displayed on your screen.
[Enter] key to start the installation process.
2. On the next screen select Install option and press
[Enter] to continue.
3. Select your keyboard layout from the list and press
[Enter] to move forward with the installation process.
4. Next, type a descriptive name for your machine hostname and press
[Enter] to continue.
5. On the next screen select what components you want to install in the system by pressing the
[space] key. For a production server it’s recommended you choose only lib32 compatibility libraries and Ports tree.
[enter] key after you’ve made your selections in order to continue.
6. Next choose the method your hard disk will be partitioned. Select Auto – Unix File System – Guided Disk Setup and press
[enter] key to move to the next screen.
In case you have more than one disk and need a resilient file system you should opt for ZFS method. However, this guide will only cover UFS file system.
7. On the next screen select to perform FreeBSD OS installation on the entire disk and press
[enter] key again to continue.
However, be aware that this option is destructive and will completely wipe-out all your disk data. If the disk holds data, you should make a backup before continuing further.
8. Next, select you hard disk partition layout. In case your machine is UEFI based and the installation is performed from UEFI mode (not CSM or Legacy mode) or the disk is larger than 2TB, you must use GPT partition table.
Also, it’s recommended to disable Secure Boot option from UEFI menu if the installation is performed in UEFI mode. In case of an older hardware you’re safe to partition the disk in MBR scheme.
9. In the next screen review the automatically created partition table of your system and navigate to Finish using
[tab] key to accept the changes.
[enter] to continue and on the new pop-up screen select Commit to start the effective installation process. The installation process can take up from 10 to 30 minutes depending on your machine resources and HDD speed.
10. After the installer extracts and writes the operating system data to your machine drive, you will be prompted to specify the password for the root account.
Choose a strong password for root account and press
[enter] to continue. The password won’t be echoed on the screen.
11. On the next step, select the network interface you want to configure and press
[enter] to setup the NIC.
12. Choose to use IPv4 protocol for your NIC and select to configure the network interface manually with a static IP address by negating the DHCP protocol as illustrated in the below screenshots.
13. Next, add your static network IP configurations (IP address, netmask and gateway) for this interface and press
[enter] key to continue.
14. If the network equipment at your premises (switches, routers, servers, firewalls etc) is IPv4 based then is no point on configuring IPv6 protocol for this NIC. Choose No from the IPv6 prompt to continue.
15. The final network configuration for your machine involves setting-up the DNS resolver. Add your domain name for local resolving, if that’s the case, and the IP addresses of two DNS servers you run in your network, used for resolving domain names, or use the IP addresses of some public DNS caching servers. When you finish, press
OK to save changes and move further.
16. Next, from the time zone selector choose the physical region where your machine is located and hit
17. Select your country from the list and accept the abbreviation for your time setting.
18. Next, adjust the date and time setting for your machine if that’s the case or choose to Skip the setting in case your system time is correctly configured.
19. On the next step select by hitting the
[space] key the following daemons to run system-wide: SSH, NTP and powerd.
Select powerd service in case your machine CPU supports adaptive power control. If FreeBSD is installed under a virtual machine you can skip powerd start-up service during the system boot initialization sequence.
Also, if you don’t connect into your machine remotely, you can skip SSH service automatic start-up during system boot. When you finish press
OK to continue.
20. At the next screen, check the following options in order to minimally harden your system security: Disable reading kernel message buffer for unprivileged users, Disable process debugging facilities for unprivileged users, Clean
/tmp filesystem on startup, Disable Syslogd network socket and Sendmail service in case you’re not planning to run a mail server.
21. Next, the installer will ask you whether you will like to add a new system user. Choose
yes and follow the prompt in order to add the user information. It’s safe to leave the default settings for the user by pressing [enter] key.
You can select Bourne shell (sh) or C improved shell (tcsh) as the default shell for your user. When you finish, answer
yes at the final question to create the user.
The prompt will ask you if you want to add another user in your system. If that’s not the case, answer with
no in order to continue with the final stage of the installation process.
22. Finally, a new screen will provide a list of options you can choose in order to modify your system configuration. If you have nothing else to modify on your system, select the
Exit option in order to complete the installation and answer with
no to not open a new shell in the system and hit on Reboot to restart the machine.
23. Remove the CD image from the machine drive and press
[enter] at the first prompt to start the system and logon into the console.
Congratulations! You’ve just installed FreeBSD operating system in your machine. In the next tutorial we’ll discuss some initial configurations of FreeBSD and how to manage the system further from command line.