Kroky po instalaci nového FreeBSD serveru
Upgrade základního systému FreeBSD
login as root
cd ~/bin csup conf # stahnout aktualni zdrojaky systemu cd /usr/src /bin/sh make -j2 buildworld >log.log 2>&1 &
Přeložení jádra
muzes doplnit -j s cislem umernym sebevedomi administratora, poctu CPU a velikosti RAM
make buildkernel KERNCONF=RADIUS
RADIUS je jmeno konfiguracniho souboru jadra, viz. tez uname -a
, eventuelne /var/run/dmesg.boot
Jméno jadra lze predepsat do /etc/make.conf
.
/usr/src/sys/i386/conf/RADIUS
nebo
/usr/src/sys/amd64/conf/RADIUS
Co vsechno delat po ciste instalaci noveho stroje
- Upravit:
/etc/resolv.conf
- /etc/rc.conf
ntpd_enable="YES"
- /etc/ntp.conf: vpripade jailu nasadit openntp
server ns server nss
Nebo ve vmware mozno prebirat cas z hypervizoru - vmtools.
- /etc/ssh/sshd_config
Match User root Address 147.32.81.254 PermitRootLogin yes
- /etc/hosts.allow
pristup k sshd jen odnekud
- /etc/passwd
uzivatele pridat do skupiny wheel kvuli povoleni su
- /etc/newsyslog.conf
prostrednictvim sysinstall natahnout vychozi adresar /usr/ports
mkdir /root/bin
nakopirovat tam conf z jineho stroje
cp /usr/share/examples/etc/make.conf /etc nastavit CPUTYPE SUP_UPDATE=yes SUPHOST= cvsup.cz.FreeBSD.org PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
crontab -e # Aktualizace stromu portu 0 22 * * 6 /usr/sbin/portsnap cron update # Zalohovani
z aktualnich portu instalovat ports-mgmt/portaudit a ports-mgmt/portupgrade
cp /usr/local/etc/portaudit.conf.sample portaudit.conf
- /usr/local/etc/pkgtools.conf
vyrabet i packages
PORTUPGRADE_ARGS = ENV['PORTUPGRADE'] || '--interactive --package' mkdir /usr/ports/packages
Ve vmware: z portu emulators/open-vm-tools-nox11
- /etc/rc.conf
vmware_guest_vmblock_enable="YES" vmware_guest_vmhgfs_enable="YES" vmware_guest_vmmemctl_enable="YES" vmware_guest_vmxnet_enable="YES" vmware_guestd_enable="YES"
sysutils/smartmontools - bez podpory ciss
/usr/local/etc/smartd.conf /dev/da0 -d scsi -a -s L/../.././01 -m bily@cs.felk.cvut.cz /dev/da1 -d scsi -a -s L/../.././02 -m bily@cs.felk.cvut.cz /dev/da2 -d scsi -a -s L/../.././03 -m bily@cs.felk.cvut.cz /dev/da3 -d scsi -a -s L/../.././04 -m bily@cs.felk.cvut.cz /dev/da3 -d scsi -a -s L/../.././04 -M test -m bily@cs.felk.cvut.cz
- /etc/periodic.conf
daily_status_security_inline="YES"
weekly_status_pkg_enable="YES" daily_status_security_portaudit_enable="YES" daily_status_security_portaudit_expiry="2" daily_status_security_portaudit_user="nobody"
daily_clean_tmps_enable="YES" daily_clean_tmps_days="30" daily_status_gmirror_enable="YES" # fyzicke disky v gmirroru
Jail hostitelsky stroj, bindovat jen vlastni adresu
/etc/ssh/sshd_config ListenAddress - vlastni jmeno
syslogd_flags="-a 127.0.0.1" sendmail
cd /usr/src
make installworld DESTDIR=/virt/XY make distribution DESTDIR=/virt/XY (mergemaster -D/virt/XY)
- /etc/fstab.XY:
/usr/ports /virt/psc/usr/ports nullfs ro 4 4
- /etc/rc.conf - jail
ve virt stroji: cron - zrusit adjkerntz
- posunout daily/weekly/monthly
nastavit casovou zonu
touch /etc/fstab
Upgrade portů
portmaster -eig
nebo
portupgrade -ai