Contents
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.3, released on March 10, 2026, and build the server.
Install
1.Download the installation image
FreeBSD Download Site(https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.4/)
Download "FreeBSD-14.4-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.
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
|
1 2 |
# 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).
1. Binary Update
Display of kernel and other version information
|
1 2 |
# uname -srm FreeBSD 14.4-RELEASE amd64 |
Get all available binary updates (security updates)
There was no update this time
|
1 2 3 4 5 6 7 8 9 10 |
# 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.4-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.4-RELEASE-p0. |
Install updates or upgrades
|
1 2 3 |
# freebsd-update install No updates are available to install. Run 'freebsd-update [options] fetch' first. |
Restart the server to boot with the installed image
|
1 |
# shutdown -r now |
Check for updated version
|
1 2 |
# uname -srm FreeBSD 14.4-RELEASE amd64 |
|
1 2 3 4 |
# freebsd-version -kur 14.4-RELEASE 14.4-RELEASE 14.4-RELEASE |
2. Pkgng
2.1 Package system (pkgng) first run configuration
Bring up to date.
|
1 |
# pkg update |
2.2 Pkg command usage
1.Application Search
For example, if you are looking for Mysql8
|
1 2 3 4 5 |
# pkg search mysql8 mysql80-client-8.0.44 Multithreaded SQL database (client) mysql80-server-8.0.44 Multithreaded SQL database (server) mysql84-client-8.4.7 Multithreaded SQL database (client) mysql84-server-8.4.7 Multithreaded SQL database (server) |
2.Install Application
Install curl as an example
|
1 |
# pkg install curl |
3.Obtaining information about installed packages
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# pkg info brotli-1.2.0,1 Generic-purpose lossless compression algorithm curl-8.17.0 Command line tool and library for transferring data with URLs gettext-runtime-0.26 GNU gettext runtime libraries and programs indexinfo-0.3.1_1 Utility to regenerate the GNU info page index libidn2-2.3.8 Implementation of IDNA2008 internationalized domain names libnghttp2-1.68.0 HTTP/2 C Library libpsl-0.21.5_2 C library to handle the Public Suffix List libssh2-1.11.1,3 Library implementing the SSH2 protocol libunistring-1.4.1 Unicode string library pkg-2.5.1 Package manager vim-9.2.0078 Improved version of the vi editor (console flavor) xxd-9.2.0078 Hexdump and reverse hexdump utility from vim distribution zstd-1.5.7_1 Fast real-time compression algorithm |
To retrieve information about the curl you just installed
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# pkg info curl curl-8.17.0 Name : curl Version : 8.17.0 Installed on : Tue Mar 10 14:05:12 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 --------------------------------------------------- |
4.Deleting Applications
|
1 |
# pkg delete [Package Name] |
5.Application Status
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# pkg info brotli-1.2.0,1 Generic-purpose lossless compression algorithm curl-8.17.0 Command line tool and library for transferring data with URLs gettext-runtime-0.26 GNU gettext runtime libraries and programs indexinfo-0.3.1_1 Utility to regenerate the GNU info page index libidn2-2.3.8 Implementation of IDNA2008 internationalized domain names libnghttp2-1.68.0 HTTP/2 C Library libpsl-0.21.5_2 C library to handle the Public Suffix List libssh2-1.11.1,3 Library implementing the SSH2 protocol libunistring-1.4.1 Unicode string library pkg-2.5.1 Package manager vim-9.2.0078 Improved version of the vi editor (console flavor) xxd-9.2.0078 Hexdump and reverse hexdump utility from vim distribution zstd-1.5.7_1 Fast real-time compression algorithm |
6.See application update status
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# pkg version brotli-1.2.0,1 = curl-8.17.0 = gettext-runtime-0.26 = indexinfo-0.3.1_1 = libidn2-2.3.8 = libnghttp2-1.68.0 = libpsl-0.21.5_2 = libssh2-1.11.1,3 = libunistring-1.4.1 = pkg-2.5.1 = vim-9.2.0078 > xxd-9.2.0078 > zstd-1.5.7_1 = |
>: If a newer version is released than the one currently installed
=: If a version equivalent to the one currently installed has been released
<: If an older version is released than the one currently installed
7. Update Packages
|
1 |
# pkg upgrade [Package Name] |
To update all packages
|
1 |
# pkg upgrade |
3 Installing the Ports Collection
Since portsnap has been removed in FreeBSD14, use git to download and update the ports collection.
1. Install git
When installing from ports
|
1 2 |
# cd /usr/ports/devel/git # make install clean |
When installing with pkg
|
1 |
# pkg install git |
2. Port Collection Installation
Check out a copy of the HEAD branch of the ports tree
If there is already a Port Collection, delete it.
|
1 |
# rm -Rf /usr/ports/* |
|
1 |
# git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports |
Update /usr/ports
|
1 |
# git -C /usr/ports pull |
3. perl5 upgrade
Check which versions of Perl can be installed
|
1 2 3 4 5 |
# pkg search lang/perl lang/perl5-devel Practical Extraction and Report Language lang/perl5.38 Practical Extraction and Report Language lang/perl5.40 Practical Extraction and Report Language lang/perl5.42 Practical Extraction and Report Language |
This time, we'll install the latest version of Perl 5.42
|
1 2 3 |
# cd /usr/ports/lang/perl5.42 # make NO_DIALOG=yes # make reinstall |
4. Maintenance tools for ports
First, set up the "ports" environment
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# cp /usr/share/examples/etc/make.conf /etc/make.conf # chmod 644 /etc/make.conf # vi /etc/make.conf Do not use X11 OPTIONS_UNSET+=X11 OPTIONS_UNSET+=GUI NO_X=true Using Japanese in PHP OPTIONS_SET+=MBSTRING ※When specifying the Python or Ruby version We primarily use the Python 3.11 series DEFAULT_VERSIONS+=python=3.11 python3=3.11 We primarily use the Ruby 3.2 series DEFAULT_VERSIONS+=ruby=3.2 |
nstall “ports” and ‘portupgrade’ to maintain “ports”.
|
1 2 3 4 5 6 7 |
# cd /usr/ports/ports-mgmt/portupgrade # make config The option is the default # make NO_DIALOG=yes # make reinstall |
5. Updating INDEX
|
1 2 3 |
# portsdb -Fu -F:IINDEX file acquisition -u:Update binary DB based on the resulting INDEX file |
To see the status of the database
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# portversion -v [Reading data from pkg(8) ... - 61 packages found - done] autoconf-2.72_1 = 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.17.0 = up-to-date with port db5-5.3.28_10 = up-to-date with port expat-2.7.4 = up-to-date with port gettext-runtime-0.26 = up-to-date with port gettext-tools-0.26 = up-to-date with port git-2.52.0 < needs updating (port has 2.53.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.5.1 = up-to-date with port libiconv-1.18_1 = up-to-date with port libidn2-2.3.8 = up-to-date with port libnghttp2-1.68.0 = up-to-date with port libpsl-0.21.5_2 = up-to-date with port libssh2-1.11.1,3 = up-to-date with port libtextstyle-0.26 = up-to-date with port libunistring-1.4.1 < needs updating (port has 1.4.2) libunwind-20250904 = 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 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.095 < needs updating (port has 2.098) p5-Locale-gettext-1.07 = up-to-date with port p5-Locale-libintl-1.35 = 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-20250602 = 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 = up-to-date with port perl5-5.40.3_2 = up-to-date with port pkg-2.5.1 < needs updating (port has 2.6.2) pkgconf-2.4.3,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.15 = up-to-date with port readline-8.3.3 = up-to-date with port ruby-3.3.10,1 = up-to-date with port ruby33-bdb-0.6.6_9 = up-to-date with port ruby33-gems-4.0.6 = up-to-date with port rubygem-date-3.5.1 = up-to-date with port rubygem-erb-6.0.1 = up-to-date with port rubygem-psych-5.3.1 = up-to-date with port rubygem-rdoc-6.17.0 = up-to-date with port rubygem-stringio-3.2.0 = up-to-date with port rubygem-tsort-0.2.0 = up-to-date with port texinfo-7.2_4,1 = up-to-date with port vim-9.2.0078 = up-to-date with port xxd-9.2.0078 = up-to-date with port zstd-1.5.7_1 = up-to-date with port |
If there is an “=” mark, the latest version is installed.
If there is a “<” mark, there is a newer version in “ports”.
6. Upgrading ports
Update “ports” with newer versions as a result of the above checks.
|
1 |
# portupgrade expat |

