By default mysql installs itself in /var/db in freebsd. If you have a big database then this folder will quickly get filled up.
Here are the commands to move mysql from /var/db to /usr/local/mysql
cd /var/db
mv mysql /usr/local/
ln -s /usr/local/mysql mysql

I came across an issue with Apache 2.2 on freebsd 8.2 where munin wasn't graphing the Apache data. (apache_accesses, apache_processes and apache_volume )

When I tailed the munin error log I found this error.

tail /var/log/munin/munin-node.log
munin UserAgent not found at apache_volume line 86.
With some researching on google I found this nice munin command to tell me more about how to setup munin. IE what we can install on freebsd.

/usr/local/sbin/munin-node-configure --suggest
The output gave us "LWP::UserAgent not found". which means, install Perl's libwww.

If you're like me and need to manage large amounts of emails, one thing that must be done is limiting the speed email providers like yahoo.com, hotmail.com, live.com, gmail.com, aol.com get your email.

I don't go into much detail here but this is the setup I've researched and currently use.

First we edit main.cf and go to line 561 (i just like to keep things together)

Once the first jail is created, we can just copy jails and not have to redo "make world" which takes awhile.

----------------------------------------------

Configuration of the jail
Start the jail for the first time

# /etc/rc.d/jail start mail1

If you try to SSH into the jail, you will end up in the main machine and not in the jail.
To fix this add the following line to /etc/rc.conf

rpcbind_enable="NO"

vi /etc/ssh/sshd_config

Port 22
Protocol 2
ListenAddress 192.168.1.157

Now we jump into the jail for some 1st step configurations

# jail /usr/jails/mail1 mail1.example.com 192.168.1.231 /bin/sh

now you are inside the jail:

change the root password
# passwd

add a new user and invite the user to the wheel group (so you can su to root)
# adduser

So we can ssh into the jail

# echo 'sshd_enable="YES"' >> /etc/rc.conf

install bash, change the users shell to bash
if you are in a jail and ports doesn't exit you have to remount the ports Filesystem
# cd /usr/ports/shells/bash
# make clean; make install clean
# chsh
change the shell to: /usr/local/bin/bash

Host environment syslogd
This entry in /etc/rc.conf tells syslogd to not listen on any IP address.

syslogd_flags="-ss"

That allows syslogd to run in both the host and the jail environments.

Host environment inetd

This entry in /etc/rc.conf tells inetd to listen on a specific IP address. This address is that of the host environment:

inetd_flags="-wW -C 60 -a 192.168.0.100"

You should note that the first part of the above flags is from /etc/defaults/rc.conf:

We are going to setup RAID 1 on FreeBSD 7.3 using gmirror. gmirror is a software based RAID system. I did this using FreeBSD 7.3 but this works with older versions of FreeBSD as well (i've done it as back as FreeBSD 6.2 . First things first, make sure you have the same hard drive size and if possible the same brand / model.

After installing freebsd but before existing the system installer

press ALT-F4 to be taken to the command prompt
type in csh to get a good shell

csh

Create a mirror/duplex

kern.geom.debugflags=16
gmirror label -v -b round-robin gm0 /dev/ad0

That's it, RAID 1 is now setup on the system
Now we tell the system to load it up everytime we boot up.

echo geom_mirror_load="YES" > /boot/loader.conf

make sure fstab uses raid, but first lets make a backup

cp /etc/fstab /etc/fstab.orig
vi /etc/fstab

Insert the word mirror after /dev and change ad to gm.
For example, /dev/ad0s1a becomes /dev/mirror/gm0s1a

double check that you didn't mistype anything or else the system may not boot up.

After that, ALT-F1 to switch back to the install interface. Reboot the machine.

When the system is done rebooting, we add the 2nd drive into the RAID array

gmirror insert gm0 /dev/ad2

To see what's happening with the RAID type in

gmirror list | more

To see the synchronizing status

gmirror status

Once the synchronizing is done, simply reboot and your done setting up RAID on FreeBSD

By default, if you try to modify your hosts file in windows Vista, it will not let you save it. It tells you that you don't have permission. To successfully modify the hosts file, run notepad.exe as an administrator open the file. This is a windows vista and windows 7 issue and does not need to run in windows XP

Here is a sample of what the hosts file looks like
I added 3 banner sites at the bottom as an example of what you can add.
In this example, everytime your browser tries to go to bannersite1.com bannersite3.com or bannersite3.com
your computer will answer with nothing... which causes no banners to come up!

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

The version of Apache on older versions of FreeBSD is not compiled with support for multithreading but Python itself is. Normally this would be where Apache 1.3 is being used. The result is that when starting up Apache with mod_wsgi, an error similar to the following can occur:

The solution is to force Apache to preload the reentrant version of the C runtime library which contains the POSIX thread library functions. This can be done by modifying the 'envvars' script, if it exists and is used, contained in the same directory as where the Apache 'httpd' binary is installed, or the Apache startup script, and add the lines: