FreeBSD Build from source


Examples below are not necessarily in the correct order. See the Remarks section below for more information on the whole process.


Overview of the whole process

  1. Download the latest source code.
  2. Configure the kernel.
  3. Build the world and the kernel.
  4. Configure the root filesystem of your new FreeBSD.
  5. Install the world and the kernel.

Get the number of processors

An easy way to speed up the process of building and installing the new system is to use more processors to increase the computational power.

To find out what's the number of the processors you have to speed up the process:

sysctl hw.ncpu

For example:

hw.ncpu: 1

Let's set the $NUMBER_OF_PROCESSORS environmental variable then:

export $NUMBER_OF_PROCESSORS=$(sysctl hw.ncpu | tr -d 'a-z.: ')