FreeBSD


make.conf

WITHOUT_X11="yes"

zfs rw on start

zft set readonly=off zroot/ROOT/default

fsck & mount

fsck -p
mount -a

grub2 + freebsd

menuentry "FreeBSD 9-STABLE " {
        insmod ufs2
        set root=(hd0,3)
        chainloader +1
        }

/etc/grub.d/40_custom

#!/bin/sh -e
echo "Adding FreeBSD 9 STABLE system" >&2
cat << EOF

menuentry "FreeBSD 9-STABLE " {
        insmod ufs2
        set root=(hd0,3)
        chainloader +1
        }

EOF

#update-grub2

install grub2 on freebsd

pkg_add -r grub2
cd boot
mkdir grub
cd grub
touch grub.cfg

grub.cfg

set timeout=3
set default ="0"
menuentry "FreeBSD 9" {
insmod ufs2
set root=(hd0,1)
chainloader +1
}
cp -Rf /usr/local/lib/grub/i386-pc /boot/grub
sysctl kern.geom.debugflags=16
grub-install /dev/ad0
reboot

apache +php

LoadModule php5_module        libexec/apache/libphp5.so


AddModule mod_php5.c
    <IfModule mod_php5.c>
        DirectoryIndex index.php index.html
    </IfModule>
    <IfModule mod_php5.c>
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps
    </IfModule>

jails

# setenv D /here/is/the/jail
# mkdir -p $D 
# cd /usr/src
# make buildworld 
# make installworld DESTDIR=$D 
# make distribution DESTDIR=$D 
# mount -t devfs devfs $D/dev 
jail_enable="YES"   # Set to NO to disable starting of any jails
jail_list="www"     # Space separated list of names of jails

Note: Jail names in jail_list should contain alphanumeric characters only.

For each jail listed in jail_list, a group of rc.conf(5) settings, which describe the particular jail, should be added:
jail_www_rootdir="/usr/jail/www"     # jail's root directory
jail_www_hostname="www.example.org"  # jail's hostname
jail_www_ip="192.168.0.10"           # jail's IP address
jail_www_devfs_enable="YES"          # mount devfs in the jail
jail_www_devfs_ruleset="www_ruleset" # devfs ruleset to apply to jail
jail_enable="YES"
jail_set_hostname_allow="NO"
jail_list="ns mail www"
jail_ns_hostname="ns.example.org"
jail_ns_ip="192.168.3.17"
jail_ns_rootdir="/usr/home/j/ns"
jail_ns_devfs_enable="YES"
jail_mail_hostname="mail.example.org"
jail_mail_ip="192.168.3.18"
jail_mail_rootdir="/usr/home/j/mail"
jail_mail_devfs_enable="YES"
jail_www_hostname="www.example.org"
jail_www_ip="62.123.43.14"
jail_www_rootdir="/usr/home/j/www"
jail_www_devfs_enable="YES"
The /etc/rc.d/jail script can be used to start or stop a jail by hand, if an entry for it exists in rc.conf:
# /etc/rc.d/jail start www
# /etc/rc.d/jail stop www


# jls
   JID  IP Address      Hostname                      Path
     3  192.168.3.17    ns.example.org                /home/j/ns
     2  192.168.3.18    mail.example.org              /home/j/mail
     1  62.123.43.14    www.example.org               /home/j/www

# jexec 1 tcsh
# D=/here/is/the/jail
# mkdir -p $D/usr/ports
# mount_nullfs /usr/ports $D/usr/ports
# mount 
D=/here/is/the/jail
 mkdir -p $D/usr/ports
 mount_nullfs -o ro /usr/ports $D/usr/ports

ezjail

cd /usr/ports/sysutils/ezjail
make install clean
cd /usr/local/etc
cp ezjail.conf.sample ezjail.conf
ezjail-admin install
ezjail-admin create www 10.0.0.236
ezjail-admin create mail 10.0.0.237
ezjail-admin create dns 10.0.0.238
ezjail-admin create ftp 10.0.0.239

/etc/rc.conf

ezjail_enable="YES"
ifconfig_em0_alias0="inet 10.0.0.236 netmask 255.255.255.0"
ifconfig_em0_alias1="inet 10.0.0.237 netmask 255.255.255.0"
ifconfig_em0_alias2="inet 10.0.0.238 netmask 255.255.255.0"
ifconfig_em0_alias3="inet 10.0.0.239 netmask 255.255.255.0"
/usr/local/etc/rc.d/ezjail.sh onestart www
/usr/local/etc/rc.d/ezjail.sh onerestart www
/usr/local/etc/rc.d/ezjail.sh onestop www
 jls 
 jexec <jid> csh
/usr/local/etc/rc.d/ezjail.sh onestop www
/usr/local/etc/rc.d/ezjail.sh onestop mail
ezjail-admin delete www
ezjail-admin delete mail
rm -fr /usr/jails/www
rm -fr /usr/jails/mail

ntfs

# cd /usr/ports/sysutils/fusefs-ntfs 
# make install clean
# kldload /usr/local/modules/fuse.ko
# mount_ntfs-3g /dev/da0s2 /mnt/win

binary upgrades release

freebsd-update -r 10.1-RELEASE upgrade
freebsd-update install
shutdown -r now
freebsd-update install
shutdown -r now

binary upgrades RC

freebsd-update -r 11.0-RC1 upgrade
freebsd-update install
shutdown -r now
freebsd-update install
shutdown -r now

src.conf

WITHOUT_BIND The system doesn’t build any part of BIND, including named, dig,nslookup, or related libraries.
WITHOUT_CVS The system doesn’t build CVS.
WITHOUT_CXX Do not build the C++ compiler.
WITHOUT_DICT Do not build the dictionary.
WITHOUT_EXAMPLES Do not install the examples.
WITHOUT_GAMES No fun for you on this system!
WITHOUT_GDB Do not build the debugger.
WITHOUT_HTML Don’t build HTML documentation.
WITHOUT_INET6 Drop IPv6 support.
WITHOUT_INFO Do not build or install info(5) documentation.
WITHOUT_IPFILTER Do not build IP Filter.
WITHOUT_IPX Don’t support IPX in any programs.
WITHOUT_KERBEROS Do not build, install, or support Kerberos.
WITHOUT_LIBPTHREAD Do not build libpthread (see Chapter 12).
WITHOUT_LIBTHR Do not build libthr (see Chapter 12).
WITHOUT_LPR Do not build the printing system.
WITHOUT_MAN Do not build or install man pages.
WITHOUT_NIS Do not build or support NIS(8).
WITHOUT_OBJC Do not support Objective C.
WITHOUT_RCMDS Do not build or install rlogin, rcp, rcp, rwho, or other r- programs.
WITHOUT_SENDMAIL Do not build Sendmail.
WITHOUT_SHAREDOCS Do not install the old BSD documentation.
WITHOUT_TCSH Let me guess, you’re one of those /bin/bash wackos?
WITHOUT_TOOLCHAIN Do not install compilers, debuggers, and so on. 
                  Useful for embedded systems. If you want to use this option, you must specify it on
                  the command line at the make installworld stage. make buildworld fails with this option.

svn src

cd /usr/ports/devel/subversion
make install clean

svn co svn://svn.freebsd.org/base/stable/9 /usr/src
svn co svn://svn.freebsd.org/base/releng/9.0 /usr/src
svn update /usr/src

svn ports

cd /usr/ports/devel/subversion
make install clean

svn co svn://svn.freebsd.org/ports/head /usr/ports
svn update /usr/ports

make buildworld

# cd /usr/src
# make buildworld
# make buildkernel
# make installkernel
# nextboot -o "-s" -k kernel
# reboot
# adjkerntz -i
# mount -a -t ufs
# mergemaster -p
# cd /usr/src
# make installworld
# mergemaster -Ui
# reboot
# chflags -R noschg /usr/obj/usr
# rm -rf /usr/obj/usr
# cd /usr/src
# make cleandir
# make cleandir

set X keyboard map

setxkbmap pl

cshrc

setenv LC_ALL pl_PL.UTF-8

set prompt ="yampress@%m%/ %"

rc.conf

hald_enable="YES"
dbus_enable="YES"
slim_enable="YES"

.xinitrc

openbox-session
startfluxbox
startxfce4

xfce4

xfce4-wm xfce4-session xfce4-panel xfce4-desktop gtk-xfce-engine xfce4-settings icons-tango-extras mousepad xfce4-terminal

OpenBSD


PKG_PATH OpenBSD

ksh .profile

export PKG_PATH=http://ftp.aso.ee/pub/OpenBSD/5.4/packages/amd64/
export PKG_PATH=http://ftp.openbsd.dk/pub/OpenBSD/5.4/packages/amd64/

openbsd ports

cd /usr
ftp http://ftp.aso.ee/pub/OpenBSD/5.4/ports.tar.gz
tar xzf ports.tar.gz
export CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs
cd /usr 
cvs get -r OPENBSD_5_4 -P ports