summaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL88
1 files changed, 69 insertions, 19 deletions
diff --git a/INSTALL b/INSTALL
index 0229879..4963123 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,30 +1,68 @@
1$Id: INSTALL,v 1.1 2001/11/28 05:26:54 helios Exp $ 1$Id: INSTALL,v 1.2 2001/12/03 19:54:02 helios Exp $
2 2
3 3
4Requirements 4Requirements
5============ 5============
6 6
70) I run a Red Hat 6.2 system, but these instructions should easily 7* I run a Red Hat 6.2 system, but these instructions should easily
8 adapt to any modern distro. 8 adapt to any modern distro.
9 9
101) Apache 1.2.x or higher installed. (I run 1.3.22 and it works fine). 10* Apache 1.2.x or higher installed. (I run 1.3.22 and it works fine).
11 You should have already successfully compiled Apache and know what 11 You should have already successfully compiled Apache and know what
12 you're doing there. In fact, you should already have any other 12 you're doing there. In fact, you should already have any other
13 modules and add-ons like mod_ssl or PHP configured and installed 13 modules and add-ons like mod_ssl or PHP configured and installed
14 before you start this process. 14 before you start this process.
15 15
162) The MySQL development headers. (I run MySQL-devel-3.23.44-1.i386.rpm). 16* The MySQL development headers. (I run MySQL-devel-3.23.44-1.i386.rpm).
17 17
183) MySQL configured, installed and running on either localhost or an 18* MySQL configured, installed and running on either localhost or an
19 accessible networked machine. You should already have a basic 19 accessible networked machine. You should already have a basic
20 understanding of MySQL and how it functions. 20 understanding of MySQL and how it functions.
21 21
224) Again, basic administrative skills with Apache and MySQL. I try to 22* Again, basic administrative skills with Apache and MySQL. I try to
23 make things as easy as possible in this README, but its purpose is 23 make things as easy as possible in this README, but its purpose is
24 not to be an administrative tutorial. 24 not to be an administrative tutorial.
25 25
26Installation 26* Additionally, if you want to be able to log SSL information such as
27============ 27 keysize or cipher, you need OpenSSL and glibc-devel installed. Both
28 are available as RPMs.
29
30
31Installation (as an Apache DSO)
32===============================
33
34For folks interested in using this module as an Apache DSO, these
35instructions are currently UNTESTED but should work. (I would be
36grateful to hear back from a DSO user as to my accuracy with these
37instructions.)
38
390) Perform all the following steps as root so that you have install
40 privs, etc.
41
421) Unpack the archive into a working directory.
43
44 # tar zxf mod_log_mysql.tar.gz -C /usr/local/src
45 # cd /usr/local/src/mod_log_mysql
46
472) Instruct apxs to compile and install the module as a DSO. (My apxs is
48 in /usr/local/Apache/bin, perform a "locate" to find yours...)
49
50 # <path>/apxs -i -a -c mod_log_mysql.c
51
52 You should see something like this:
53
54 gcc -fpic -DSHARED_MODULE -I/usr/local/Apache/include -c mod_log_mysql.c
55 ld -Bshareable -o mod_log_mysql.so mod_log_mysql.o
56 cp mod_log_mysql.so <your path to Apache libexec>/mod_log_mysql.so
57 chmod 755 <your path to Apache libexec>/mod_log_mysql.so
58 [activating module foo' in /path/to/apache/etc/httpd.conf]
59
603) Now go to step (9) in the instructions below to configure httpd.conf...
61
62
63Installation (as a static module compiled into httpd)
64=====================================================
65[This is what I do, FYI.]
28 66
290) Perform all the following steps as root so that you have install 670) Perform all the following steps as root so that you have install
30 privs, etc. 68 privs, etc.
@@ -117,6 +155,15 @@ Installation
117 </VirtualHost> 155 </VirtualHost>
118 156
119 157
158 9a) For users who have a DSO-enabled httpd:
159
160 If you you are building mod_log_mysql as a static module BUT
161 your httpd is enabled for DSOs, add the following line to your
162 httpd.conf:
163
164 AddModule mod_log_mysql.c
165
166
12010) Create a database and table to hold the new log data. I log the 16710) Create a database and table to hold the new log data. I log the
121 same data as the regular "combined log" plus a little extra information 168 same data as the regular "combined log" plus a little extra information
122 that can be useful. 169 that can be useful.
@@ -128,8 +175,11 @@ Installation
128 # mysql -uadmin -pmypassword 175 # mysql -uadmin -pmypassword
129 mysql> create database apache; 176 mysql> create database apache;
130 177
131 Then I created the table called "access_log". You should use the 178 Then create the table called "access_log". I enclosed an SQL file
132 enclosed SQL file to do this for you. 179 that will create every column type that mod_log_mysql supports.
180 Unless you're just testing or playing around, this is probably NOT
181 what you want, so edit the file first and delete the lines that
182 don't pertain to you. Then:
133 183
134 mysql> source access_log.sql 184 mysql> source access_log.sql
135 185