bsd:server:freebsd_14.2
Table of Contents
Information
TODOs
- Lastest pkgs freebsd-latest
- Oak = ASUS motherboard Legacy/MBR with Phenom II X4 (TODO: mobo name)
Download
FreeBSD-14.2-RELEASE-amd64-mini-memstick.img
Installation Notes
Partitioning
- ZFS
stripe
(1 SATA SSD)- Not forced 4K Sectors
- GPT (BIOS)
System Configuration
- [x]
local_unbound
- [x]
sshd
- [x]
ntpd
- [x]
ntpd_sync_on_start
System Hardening
User
- Invite to other groups:
wheel
- Shell:
sh
Network
- Static on Ethernet (
em0
)
Update
- Post-install
FreeBSD
su -
freebsd-update fetch install
sync && reboot
pkg
su -
pkg update --force
pkg upgrade
AIO
freebsd-update fetch install && pkg update --force && pkg upgrade
su - 'root' -c 'freebsd-update fetch install && pkg update --force && pkg upgrade'
SSH
ssh '192.168.1.152' -t "su - 'root' -c 'freebsd-update fetch install && pkg update --force && pkg upgrade'"
Software
General
su -
pkg install aria2 en-freebsd-doc htop libressl unar wget
Settings
Groups
operator
to allow general reboot/power-off
su -
pw groupmod 'operator' -m 'espionage724'
loader.conf
Oak
su -
ee '/boot/loader.conf'
security.bsd.allow_destructive_dtrace=0 kern.geom.label.disk_ident.enable="0" kern.geom.label.gptid.enable="0" cryptodev_load="YES" zfs_load="YES" autoboot_delay="2" hw.usb.no_boot_wait="1"
rc.conf
Oak
su -
ee '/etc/rc.conf'
clear_tmp_enable="YES" syslogd_flags="-ss" hostname="Oak" ifconfig_em0="inet 192.168.1.152 netmask 255.255.255.0" defaultrouter="192.168.1.1" ifconfig_em0_ipv6="inet6 accept_rtadv" local_unbound_enable="YES" sshd_enable="YES" ntpd_enable="YES" ntpd_sync_on_start="YES" moused_nondefault_enable="NO" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="NO" zfs_enable="YES" nginx_enable="YES" php_fpm_enable="YES"
Network
local-unbound DNS
- Already done during install by
local_unbound
cat '/etc/rc.conf' | grep 'local_unbound_enable'
cat '/etc/resolv.conf'
su -
ee '/etc/resolv.conf'
nameserver 127.0.0.1 options edns0
Secure Shell
- TODO
Drive Maintenance
ZFS
- TODO zfs_nas_format
Notable Folders and Commands
Drive Wipe
su -
gpart show
gpart destroy -F 'da1'
dd if='/dev/zero' of='/dev/da1' count='8096'
USB Flash Drive
su -
camcontrol devlist
dmesg | grep 'ugen'
usbconfig -d '/dev/ugen0.6' power_off
User/Group
awk -F":" '{print $1}' /etc/passwd
awk -F":" '{print $1}' /etc/group
su -
pw userdel 'x' -r
pw groupdel 'x'
pkg
x
is a package name
pkg info -l x
pkg autoremove
Erase Command History
- TODO: Test
rm -f ~/'.sh_history' & exit
Handbook
pkg info -l 'en-freebsd-doc'
ee '/usr/local/share/doc/freebsd/en/books/handbook'
CPU Frequency
su - root -c "sysctl 'dev.cpu.0.freq' 'dev.cpu.1.freq' 'dev.cpu.2.freq' 'dev.cpu.3.freq' 'dev.cpu.4.freq' 'dev.cpu.5.freq' 'dev.cpu.6.freq' 'dev.cpu.7.freq'"
Time Sync
su - root -c 'ntpd -g -q'
Network Restart
su -
'/etc/netstart'
service 'netif' restart
hw-probe
su -
pkg install 'hw-probe'
hw-probe -all -upload
Logs
newsyslog -v -CC -N
cat '/dev/null' > '/var/log/all.log'
cat '/dev/null' > '/var/log/Xorg.0.log'
gio open '/var/log'
ls -la '/var/log'
syslog.conf
all.log
Enable
- Uncomment
su -
ee '/etc/syslog.conf'
#*.* /var/log/all.log
Permissions
su -
touch '/var/log/all.log' && chmod '600' '/var/log/all.log'
View
su -
ee '/var/log/all.log'
Other Files/Paths
- TODO
/usr/local/www/wiki/data/pages/bsd/server/freebsd_14.2.txt · Last modified: by Sean Rhone