BSD base admin tips and tricks
Collection of useful BSD Information
This is a short list of interresting informations and tips collected from my use of FreeBSD
A few steps on how to install and update software on FreeBSD (and prolly other bsd installations as well...)
2. to upgrade ports:
cvsup /root/port-supfile
portsdb -Uu
pkgdb -F
pkgdb -u
pkg_version -v > filename.txt
filename.txt now shows current installed ports and information on upgrading.
"portupgrade portname" to upgrade a port
if that doesnt work, use portupgrade -f portname
after upgrading, read the file UPDATING on extended informations.
3. to upgrade normal stuff (src, kernel,...):
freebsd-update fetch
freebsd-update install
eventually reboot if something sys depend has changed...
upgrade all links that are set...
4. FreeBSD kernel building:
cd /usr/src/sys/i386/conf
cp GENERIC yourkernelname
edit yourkernelname, and add/remove entries you dont like...
make buildkernel KERNCONF=yourkernelname
make installkernel KERNCONF=yourkernelname
5. patching manually:
for a start, the advisories contain info on howto apply
install gnupg
get the gnupg fbsd keys
wget ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc
gpg --import public_key.asc
fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/whateverpatchyouwant...
fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-04:04/whateverpatchyouwant....asc
gpg --verify whateverpatchyouwant....asc whateverpatchyouwant...
if its ok...
cd /usr/src
patch < /location/of/whateverpatchyouwant...
eventually make buildworld
eventually edit kernel config...
eventually make buildkernel KERNCONF=yourkernelconfig
eventually make installkernel KERNCONF=yourkernelconfig
mergemaster -p
make installworld
6. patching via cvsup:
cvsup /root/sec-supfile
cd /usr/src
make buildworld
make buildkernel KERNCONF=yourkernelconfig
make installkernel KERNCONF=yourkernelconfig
mergemaster -p
make installworld
mergemaster
shutdown -r now