====== Freebsd Setup ====== This page will explain how I setup my Freebsd system. It's more to my own notes for future references. ===== File System/Mount Point ===== ==== Local ==== I use the default provided by the installer, except for an extra partition called:- /aur which is mounted under /aur. This one will be used to hold all my project stuff and system configuration. ==== NFS ==== I've setup NFS share on this machine to be accessible from the archlinux box. My $HOME/public_html will be mounted on arch box as $HOME/public_html. On the server, edit /etc/exports. /usr/home/kamal/public_html -mapall=kamal 192.168.1.2 192.168.1.101 192.168.1.102 192.168.1.103 # kill -HUP `cat /var/run/mountd.pid` also make sure these is set in /etc/rc.conf rpcbind_enable="YES" nfs_server_enable="YES" mountd_flags="-r" to view the exports:- # showmount -e On the client side, /etc/fstab mospeada:/usr/home/kamal/public_html /home/kamal/public_html nfs user,rw,hard,intr 0 0 ===== Packages/Port ===== Most of the time, I'll try to use packages instead of a port to reduce the time need to setup the whole system. ==== Apache & PHP ==== I used apache 1.3 and php 4.3.0. # pkg_add -r apache # pkg_add -r php4 # pkg_add -r php-extensions I also set the PACKAGESITE environment variable in my .bash_profile PACKAGESITE=ftp://ftp.jp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/ This is the setting in /usr/local/etc/apache/httpd.conf DocumentRoot '/aur/httpd/www' LoadModule php4_module libexec/apache/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps ==== Apache 2.0 & PHP ==== # cd /usr/ports/www/php-cgi # make -DWITH_FASTCGI install # cd /usr/ports/www/apache2 # make -DWITH_SUEXEC_DOCROOT=/aur/httpd ===== Other Issues ===== ==== Screen + Vim ==== arrow key does not work well in vim if running inside screen. This could be fix by setting the proper TERM environment variable:- # set env TERM xterm