FreeBSD
FreeBSD is UNIX-like open source OS software. In particular, its performance as a network operating system exceeds that of Linux-based systems, and it maintains stable performance even under high loads.
FreeBSD is designed to be robust and sturdy with an emphasis on practicality, making it suitable for operating FTP, WWW, and e-mail servers for major companies and services.
In this project, we will install FreeBSD 14.5, released on September8, 2026, and build the server.
Install
1.Download the installation image
FreeBSD Download Site(https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.5/)
Download "FreeBSD-14.5-RELEASE-amd64-dvd1.iso"
2.Create boot disk
Create a boot disk from the downloaded FreeBSD-14.4-RELEASE-amd64-dvd1.iso (DVD)
To create an image on a USB flash drive, download FreeBSD-14.4-RELEASE-amd64-memstick.img and use an image writer such as Win32 Disk Imager to create the image.
3.Change the BIOS settings and boot from the bootable media you created
The installation process from this point on is the same as for FreeBSD 14.3, so I will omit the details.
1.Initial setting
After installing FreeBSD, we will start building the server, but it is difficult to work on the console screen, so we will change the SSH connection settings for now in order to operate the server from Windows using TeraTerm or other software.
The OpenSSH server allows password authentication login by default.
If the service is enabled, you can log in remotely.
Confirm validity of sshd service
# grep sshd /etc/rc.conf
sshd_enable="YES"
Now you can connect via SSH from TeraTerm on Windows (see the default settings for other operating systems for settings in TeraTerm).
2. Binary Update
2.1 Initial Setup for the Package System (pkgng)
I'll update it to the latest version.
# pkg update
# pkg upgrade -y
When updating the base system, including the kernel, to the latest version
# freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update1.freebsd.org... done.
Fetching metadata signature for 14.5-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
No updates needed to update system to 14.5-RELEASE-p0.
2.2 How to Use the Pkg Command
1.Search for Applications
For example, when searching for MySQL 8
# pkg search mysql8
mysql80-client-8.0.46 Multithreaded SQL database (client)
mysql80-server-8.0.46 Multithreaded SQL database (server)
mysql84-client-8.4.11 Multithreaded SQL database (client)
mysql84-server-8.4.11 Multithreaded SQL database (server)
2.Install the application
As an example, let's install curl
# pkg install curl
3.Retrieving Information About Installed Packages
# pkg info
brotli-1.2.0,1 Generic-purpose lossless compression algorithm
curl-8.21.0 Command line tool and library for transferring data with URLs
indexinfo-0.3.1_1 Utility to regenerate the GNU info page index
libidn2-2.3.8 Implementation of IDNA2008 internationalized domain names
liblz4-1.10.0_2,1 LZ4 compression library, lossless and very fast
libnghttp2-1.69.0 HTTP/2 C Library
libpsl-0.22.0 C library to handle the Public Suffix List
libssh2-1.11.1_1,3 Library implementing the SSH2 protocol
libunistring-1.4.2 Unicode string library
pkg-2.7.5 Package manager
zstd-1.5.7_2 Fast real-time compression algorithm
4. Retrieve information about the curl you just installed
# pkg info curl
curl-8.21.0
Name : curl
Version : 8.21.0
Installed on : Sat Sep 12 01:23:54 2026 JST
Origin : ftp/curl
Architecture : FreeBSD:14:amd64
Prefix : /usr/local
Categories : ftp net www
Licenses : MIT
Maintainer : sunpoet@FreeBSD.org
WWW : https://curl.se/
Comment : Command line tool and library for transferring data with URLs
----------------------------------------------------- -----------------------------------------
5.Deleting an Application
# pkg delete [package]
6.View the application's update status
# pkg version
brotli-1.2.0,1 =
curl-8.21.0 =
indexinfo-0.3.1_1 =
libidn2-2.3.8 =
liblz4-1.10.0_2,1 =
libnghttp2-1.69.0 =
libpsl-0.22.0 =
libssh2-1.11.1_1,3 =
libunistring-1.4.2 =
pkg-2.7.5 =
zstd-1.5.7_2 =
>: If a newer version than the one currently installed has been released
=: If a version equivalent to the one currently installed has been released
<: If an older version than the one currently installed is released
7. Updating Packages
# pkg upgrade [package]
To update all packages
# pkg upgrade
3 Installing the Ports Collection
Since portsnap has been removed in FreeBSD 14, use git to download and update the ports collection.
3.1. Install Git
# pkg install git
3.2. Installing Port Collection
Check out a copy of the HEAD branch of the ports tree
If you already have a Port Collection, delete it beforehand
# rm -Rf /usr/ports/*
# git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports
Update /usr/ports
# git -C /usr/ports pull
3.3 Perl 5 Upgrade
Check Which Versions of Perl Can Be Installed
# pkg search lang/perl
lang/perl5-devel Practical Extraction and Report Language
lang/perl5.40 Practical Extraction and Report Language
lang/perl5.42 Practical Extraction and Report Language
lang/perl5.44 Practical Extraction and Report Language
In this post, we'll install the latest version of Perl 5.44.
# cd /usr/ports/lang/perl5.44
# make NO_DIALOG=yes
# make reinstall
3.4 Maintenance Tools for Ports
First, set up the "ports" environment
# cp /usr/share/examples/etc/make.conf /etc/make.conf
# chmod 644 /etc/make.conf
# vi /etc/make.conf
If you are not using X11, add the following:
OPTIONS_UNSET+=X11
OPTIONS_UNSET+=GUI
NO_X=true
When installing PHP and using Japanese, add the following:
OPTIONS_SET+=MBSTRING
When primarily using the Python 3.11 series, write the following:
DEFAULT_VERSIONS+=python=3.11 python3=3.11
Use the Ruby 3.3 or 3.4 series as the main version
DEFAULT_VERSIONS+=ruby=3.3
Install the "ports" and "portupgrade" tools for maintaining ports.
# cd /usr/ports/ports-mgmt/portupgrade
# make config
The option is the default
# make NO_DIALOG=yes
# make reinstall
3.5. INDEX Update
# portsdb -Fu
-F:Retrieving the INDEX File
-u:Update the binary database based on the generated INDEX file
To check the status of the database
# portversion -v
[Reading data from pkg(8) ... - 66 packages found - done]
autoconf-2.73 = up-to-date with port
autoconf-switch-20220527 = up-to-date with port
automake-1.18.1 = up-to-date with port
brotli-1.2.0,1 = up-to-date with port
bsddialog-1.1 = up-to-date with port
curl-8.21.0 < needs updating (port has 8.22.0)
db5-5.3.28_10 = up-to-date with port
expat-2.8.2 < needs updating (port has 2.8.4)
gettext-runtime-1.0_1 = up-to-date with port
gettext-tools-1.0 = up-to-date with port
git-2.54.0 < needs updating (port has 2.55.0)
gmake-4.4.1 = up-to-date with port
help2man-1.49.3_1 = up-to-date with port
indexinfo-0.3.1_1 = up-to-date with port
libffi-3.6.0 < needs updating (port has 3.8.0)
libiconv-1.18_1 = up-to-date with port
libidn2-2.3.8 = up-to-date with port
liblz4-1.10.0_2,1 = up-to-date with port
libnghttp2-1.69.0 < needs updating (port has 1.70.0)
libpsl-0.22.0 < needs updating (port has 0.23.3)
libssh2-1.11.1_1,3 = up-to-date with port
libtextstyle-1.0 = up-to-date with port
libunistring-1.4.2 = up-to-date with port
libunwind-20250904 = up-to-date with port
libxml2-2.15.4 = up-to-date with port
libyaml-0.2.5 = up-to-date with port
m4-1.4.21,1 = up-to-date with port
mpdecimal-4.0.1 = up-to-date with port
muon-0.6.0 = up-to-date with port
p5-Authen-SASL-2.1900 = up-to-date with port
p5-Crypt-URandom-0.54 = up-to-date with port
p5-Digest-HMAC-1.05 = up-to-date with port
p5-Error-0.17030 = up-to-date with port
p5-IO-Socket-SSL-2.099 = up-to-date with port
p5-Locale-gettext-1.07 = up-to-date with port
p5-Locale-libintl-1.37 = up-to-date with port
p5-MIME-Base32-1.303 = up-to-date with port
p5-MIME-Base64-3.16 = up-to-date with port
p5-Mozilla-CA-20260813 = up-to-date with port
p5-Net-SSLeay-1.94 = up-to-date with port
p5-Text-Unidecode-1.30 = up-to-date with port
p5-URI-5.34 = up-to-date with port
p5-Unicode-EastAsianWidth-12.0 = up-to-date with port
pcre2-10.47_1 < needs updating (port has 10.48)
perl5-5.42.3 = up-to-date with port
perl5.44-5.44.0 = up-to-date with port
pkg-2.7.5 < needs updating (port has 2.8.4)
pkgconf-3.0.5,1 = up-to-date with port
portconfig-0.6.2_2 = up-to-date with port
portupgrade-2.4.16_4,2 = up-to-date with port
python311-3.11.16 = up-to-date with port
python312-3.12.14 = up-to-date with port
readline-8.3.3 = up-to-date with port
ruby-3.3.12,1 = up-to-date with port
ruby33-bdb-0.6.6_9 = up-to-date with port
ruby33-gems-4.0.20 = up-to-date with port
rubygem-erb-6.0.7 = up-to-date with port
rubygem-logger-1.7.0 = up-to-date with port
rubygem-prism-1.9.0 = up-to-date with port
rubygem-rake-13.4.2 = up-to-date with port
rubygem-rbs-4.2.0 = up-to-date with port
rubygem-rdoc-8.0.0 = up-to-date with port
rubygem-tsort-0.2.0 = up-to-date with port
samurai-1.3 = up-to-date with port
texinfo-7.3_1,1 = up-to-date with port
zstd-1.5.7_2 = up-to-date with port
If there is a "=" sign, the latest version is installed.
If there is a "<" sign, a newer version is available in "ports."
3.6. Upgrading ports
Based on the results confirmed above, update the "ports" for which new versions are available.
# portupgrade expat
