Upgrade success
Friday, January 30, 2004
I was able to upgrade my server to OpenBSD 3.6. I alternate between two servers, a production server and a development server. My development server was running OpenBSD 3.5 using the patched branch rebuilt from source. Once I upgraded the development server, I swapped it with my production server. I use rsync to backup my user Maildirs as well as the website and mysql database. You are now viewing this site as run on a MSI KT4AV Athlon XP 2100 system. I did a clean install on my Blue & White G3 with OpenBSD 3.6 once everything was up and running on the Athlon box. It went really well. The only issue I had was running a mysql database server under chroot apache. In order for PHP to access the mysql database it needs visibility to the mysql socket. The best way to do that is to make a hard link from apache chroot to the equivalent under /var/run/mysql/mysql.sock. I have found that in order to get mysql to work under chroot apache, I have to use the following commands in rc.local:
if [ -x /usr/local/bin/mysqld_safe ]; then
rm -R /var/www/var/run/mysql
mkdir -p /var/www/var/run/mysql
echo -n " mysqld"; /usr/local/bin/mysqld_safe --user=_mysql --log &
sleep 10
ln /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock
fi
I have to first blow away the old socket and path from apache’s chroot. Next I have to recreate it. But I have to wait long enough so that it gets created in /var/run/mysql/mysql.sock. I’ve tried editing my.cnf to make it point to /var/www/var/run/mysql/mysql.sock but it has never worked. It would appear that these steps I have taken are ‘learned’ by word of mouth rather than documented.
Sean
