FreeBSD - BYO-NTP/recipes GitHub Wiki
hostname pi4.example.com
sysrc hostname=$(hostname)
echo "
Welcome to $(hostname)!
" > /etc/motd.template
service motd onestart
ntpdate pool.ntp.org
test -e /etc/localtime || tzsetup
Disable needless ttys:
sed -i '' -e '/^ttyv[2-7]/ s/onifexists/off/' /etc/ttys
kill -HUP 1
This is a preference. The default quarterly updates with only security patches is a good default for production. To get more frequent package updates, switch to latest.
mkdir -p /usr/local/etc/pkg/repos
cat > /usr/local/etc/pkg/repos/FreeBSD.conf <<EOF
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/\${ABI}/latest"
}
EOF
pkg upgrade -y
pkg install -y curl
This is primarily helpful for the documentation author. Many of the scripts use curl as a platform independent URL fetcher.
For a great shell, try a well-configured zsh
with starship:
fetch -o - https://byo-ntp.github.io/tools/zsh/install.sh | sh
freebsd-update fetch install
Usually not needed, but for reference, here's how to install the ports tree:
pkg install -y git-lite
git clone https://github.com/freebsd/freebsd-ports.git /usr/ports/