From 175ec1e3bee79b081e1d5ef999a5ee82714bbe9b Mon Sep 17 00:00:00 2001 From: Christopher Powell Date: Sun, 24 Feb 2002 20:17:16 +0000 Subject: Minor but significant updates to the instructions for apxs users. --- diff --git a/CHANGELOG b/CHANGELOG index 7d9fba0..b0da0a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.5 2002/01/15 18:40:14 helios Exp $ +$Id: CHANGELOG,v 1.6 2002/02/24 20:17:16 helios Exp $ TODO: @@ -9,6 +9,13 @@ TODO: CHANGES: +1.14: +* Improved the apxs instructions based on user feedback, including the + mysql.sock define issue. +* Corrected the INSTALL example directives to the new format. +* Some improvements to 'make distro' + + 1.13: * Now use ap_get_server_name() in extract_virtual_host() to fix the @@ -22,6 +29,7 @@ CHANGES: machine and is ignored in that case (although it still must be defined for the connect to work). + 1.12: * Added a mysql_close() call to get rid of those annoying MySQL diff --git a/INSTALL b/INSTALL index 7f2e061..0391e88 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.4 2002/01/15 18:40:14 helios Exp $ +$Id: INSTALL,v 1.5 2002/02/24 20:17:16 helios Exp $ Requirements @@ -28,6 +28,16 @@ Requirements are available as RPMs. +Do I want a DSO? +================ +You need to know the answer to this question before you proceed. The +answer is pretty straightforward: what have you done in the past? If +you like all your Apache modules to be dynamic, then you should keep +doing that. If you're more of an old-school type and prefer to compile +the modules right into apache, do that. Both methods work equally +well. + + Installation (as an Apache DSO) =============================== @@ -45,11 +55,19 @@ For folks interested in using this module as an Apache DSO: fully explained in the Makefile. 3) Instruct apxs to compile and install the module as a DSO. You need - to know two things before you run apxs: + to know three things before you run apxs: - The location of the apxs binary, find using 'locate apxs' - The location of your MySQL libraries, find using 'locate libmysqlclient' + - The location of your mysql.sock socket file. If your MySQL is running on + a different machine (in other words, communication is via TCP/IP and not + sockets), this value will be ignored BUT IT STILL MUST BE DEFINED + AS SOMETHING/ANYTHING FOR COMPILATION TO WORK. - # /apxs -i -a -c -L -lmysqlclient -lz mod_log_mysql.c + FORMAT: + # /apxs -i -c -DMYSQLSOCKET='\"/path/to/mysql.sock\"' -L/path/to/mysqllibs -lmysqlclient -lz mod_log_mysql.c + + EXAMPLE: + # /usr/sbin/apxs -i -c -DMYSQLSOCKET='\"/var/lib/mysql/mysql.sock\"' -L/usr/lib/mysql -lmysqlclient -lz mod_log_mysql.c You should see something like this: @@ -59,7 +77,20 @@ For folks interested in using this module as an Apache DSO: chmod 755 /mod_log_mysql.so [activating module blah in /path/to/apache/etc/httpd.conf] -4) Now go to step (9) in the instructions below to configure httpd.conf... +4) Add the following stanzas to your httpd.conf file. Put the second stanza + somewhere after the ClearModuleList directive. + + + LoadModule mysql_log_module modules/mod_log_mysql.so + + + + + AddModule mod_log_mysql.c + + + +5) Now go to step (9) in the instructions below to configure httpd.conf... Installation (as a static module compiled into httpd) @@ -143,14 +174,14 @@ Installation (as a static module compiled into httpd) INSERTed into the table called "access_log". - LogMySQLInfo dbmachine.foo.com loguser l0gger - LogMySQLDB apache + MySQLLoginInfo dbmachine.foo.com loguser l0gger + MySQLDatabase apache [snip] - TransferLogMySQLTable access_log - TransferLogMySQLFormat huSUsbTvRA + MySQLTransferLogTable access_log + MySQLTransferLogFormat huSUsbTvRA [snip] diff --git a/Makefile b/Makefile index 65e0cd5..e46bdfe 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.5 2002/01/15 18:40:14 helios Exp $ -MLMVERS = 1.13 +# $Id: Makefile,v 1.6 2002/02/24 20:17:16 helios Exp $ +MLMVERS = 1.14 # Where you unpacked your Apache tarball -- the source. APACHESOURCE = /usr/local/src/apache_1.3.22 @@ -63,6 +63,8 @@ distro: all cp -f README ${APACHEINST}/html/mod_log_mysql/ cp -f CHANGELOG ${APACHEINST}/html/mod_log_mysql/ cd ..; tar zcf mod_log_mysql-${MLMVERS}.tar.gz --exclude mod_log_mysql/CVS mod_log_mysql/; $(INSTALL) mod_log_mysql-${MLMVERS}.tar.gz ${APACHEINST}/html/mod_log_mysql/; rm -f mod_log_mysql-${MLMVERS}.tar.gz - + rm -f /usr/local/Apache/html/mod_log_mysql/mod_log_mysql.tar.gz + ln -s mod_log_mysql-1.14.tar.gz /usr/local/Apache/html/mod_log_mysql/mod_log_mysql.tar.gz + clean: rm -f *.o *~ -- cgit v0.9.2