timezone
cd /etc/ ln -sf /usr/share/zoneinfo/Europe/Moscow localtime
time sync
cd /etc/ mv -i ntp.conf ntp.conf.dist vi ntp.conf pool 0.{{country_code}}.pool.ntp.org iburst pool 1.{{country_code}}.pool.ntp.org iburst pool 2.{{country_code}}.pool.ntp.org iburst pool 3.{{country_code}}.pool.ntp.org iburst # don't listen on 123/udp interface ignore wildcard # allow big gaps to recover (-g) tinker panic 0 echo ntpd_enable=yes >> /etc/rc.conf rc.d/ntpd start rc.d/ntpd status ntpq -pn echo ntpdate_enable=yes >> /etc/rc.conf echo ntp_sync_on_start=yes >> /etc/rc.conf echo ntpdate_hosts=europe.pool.ntp.org >> /etc/rc.conf
also don’t listen on 514/udp
echo syslogd_flags="-ss" >> /etc/rc.conf /etc/rc.d/syslogd restart
indexing
/usr/libexec/locate.updatedb
few packages
#cp -pi /etc/pkg/FreeBSD.conf /etc/pkg/FreeBSD.conf.dist #vi /etc/pkg/FreeBSD.conf cd /etc/ ls -lF /usr/local/etc/pkg.conf pkg install bash pkg install ca_root_nss pkg install colordiff pkg install curl pkg install fortune-mod-freebsd-classic pkg install gnupg1 pkg install htop pkg install ksh pkg install mtr pkg install nmap pkg install pdksh pkg install screen pkg install wget echo /bin/ksh >> /etc/shells ln -s ../usr/local/bin/ksh /bin/ksh chpass -s /bin/ksh root
shell env
mv /var/run/motd /var/run/motd.dist cp -pi /etc/profile /etc/profile.dist vi /etc/profile export ENV=/etc/shrc vi /etc/shrc
export HOSTNAME=`uname -n` case "$-" in *i*) set -o emacs bind -m ^L='clear^M' bind ^I=complete-list (( `id -u` == 0 )) && PS1='$HOSTNAME# ' || PS1='$HOSTNAME> ' alias useradd='pw useradd' alias ll='ls --color -alh' alias ls='ls --color' alias diff='colordiff' alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' w ;; esac
also need to avoid user’s call to shrc and use system-wide’s one
mv -i /root/.shrc /root/.shrc.dist vi /root/.profile #ENV=...
https://man.freebsd.org/cgi/man.cgi?query=rc.conf
https://www.cyberciti.biz/tips/freebsd-timeclock-synchronization-with-ntp-server.html
https://forums.freebsd.org/threads/configuration-of-local-ntpd-on-freebsd-13-0.84933/
https://man.freebsd.org/cgi/man.cgi?query=ntpd
https://forums.freebsd.org/threads/the-simplest-way-to-sync-time-using-ntp.16295/