Archive for September, 2008

Staying on time in Debian

To stay on , you should really use . It is a daemon that runs all the and makes tiny changes to the system clock. All you need to do is install :

aptitude install ntp

after it’s installed, I encourage you to go over to http://www.pool.ntp.org/zone/@ and pick a pool in your continental zone. has some defaults, and they are fine, i just like using the ntp pool. If you want to change where you are syncing to, open up /etc/ntp.conf and change the “server” lines.

nano /etc/ntp.conf

to manually sync Debian’s time, just install “ntpdate”

-get install ntpdate

run this:

-debian [a ntp server]

Uninstall MySQL 5 from Debian

I completely. completely messed up . Badly. I wiped out the data directory (/var/lib/ in ) and the went to remove
-get remove --purge mysql-server

That only deleted something like 86K. dissapointing. It looks like “mysql-server” is a shortcut pointing to the latest version of the software. The real software is foundĀ  under the name “mysql-server-50″. So what made it happen was:
apt-get remove --purge mysql-server*

That’ll wipe out whatever mysql install is in place.

savecore? reboot after panic?

scary. I updated freebsd, and i can only think that i messed it up when i tried to “shutdown -h” to get it shutdown so i could reboot. anyways, when i rebooted, i saw this message. apparently there was a kernel dump on my swap drive. But problem is that i didn’t have enough room on /var/crash to make it happen. i redirected the commands ot the /usr/home/ program.

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
fsck -p
mount -a -t ufs
make sure /var/crash is writable
/var/crash /dev/ad0b
exit
exit to multi-user

FreeBSD MYSQL configuration

FreeBSD does not automatically include a default my.cnf for . Instead, a set of sample configuration files can be found under /usr/local/share/mysql. These configuration files include my-small.cnf, my-medium.cnf, my-large.cnf, my-innodb-heavy-4G, and my-huge.cnf. The appropriate file can be copied and used as a template configuration by performing the following actions:
cd /usr/local/share/mysql/
cp /usr/local/share/mysq/mysql-large.cnf /etc/my.cnf
/usr/local/etc/rc.d/mysql-server restart

thanks to http://www.barik.net/archive/2008/05/26/114616/ for the tip.

Debian 4.0r4 NIC bonding

Install package ifenslave-2.6.

-get install ifenslave

make sure the real NICs kernel modules are loaded automatically

modprobe --list | grep -i 

edit /etc/network/interfaces to look like this:

auto bond0
iface bond0 inet static
address 192.168.1.59
netmask 255.255.255.0
gateway 192.168.1.1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1
broadcast 192.168.1.255

make sure to remove ALL of the lines refering to old eth0 or eth1 settings.

add the following lines to your /etc/modprobe.d/arch/i386:

alias bond0 bonding
options bonding mode=1 miimon=100 downdelay=200 updelay=200