Posted 2007/10/23

Compiling mod_auth_mysql for Debian Etch

The Apache module auth_mysql was not included in Debian Etch and at the time of writing has been orphaned. This post shows how to build your own module on Debian Etch if you really need to.

These commands can be copy and pasted:

apt-get install apache2-prefork-dev libmysqlclient15-dev patch
mkdir mysql_auth
cd mysql_auth/
tar xzf mod_auth_mysql-3.0.0.tar.gz
patch -p0 cd mod_auth_mysql-3.0.0
apxs2 -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c
apxs2 -i
echo "LoadModule mysql_auth_module /usr/lib/apache2/modules/" > /etc/apache2/mods-available/auth_mysql.load
ln -s /etc/apache2/mods-available/auth_mysql.load /etc/apache2/mods-enabled/auth_mysql.load