summaryrefslogtreecommitdiffstatsabout
path: root/INSTALL
diff options
context:
space:
mode:
authorChristopher Powell <chris@grubbybaby.com>2002-04-21 23:01:53 (GMT)
committer Christopher Powell <chris@grubbybaby.com>2002-04-21 23:01:53 (GMT)
commitb63c5d2438aabf0d7721c38387995cb4fb98345f (patch)
tree73f99f046bb7daae711c5a7bdfe0f89677e22bda /INSTALL
parent13e1ecc20c883f71b54bf1fe09488b028e51171e (diff)
Significant bugfixes and feature additions on the way to 1.16...
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL45
1 files changed, 25 insertions, 20 deletions
diff --git a/INSTALL b/INSTALL
index 3226e89..c620963 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
1$Id: INSTALL,v 1.6 2002/04/02 20:19:30 helios Exp $ 1$Id: INSTALL,v 1.7 2002/04/21 23:01:52 helios Exp $
2 2
3 3
4Requirements 4Requirements
@@ -7,7 +7,7 @@ Requirements
7* 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
10* Apache 1.2.x or higher installed. (I run 1.3.22 and it works fine). 10* Apache 1.2 or 1.3 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
@@ -15,9 +15,9 @@ Requirements
15 15
16* 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
18* MySQL configured, installed and running on either localhost or an 18* MySQL >= 3.23.15 configured, installed and running on either
19 accessible networked machine. You should already have a basic 19 localhost or an accessible networked machine. You should already
20 understanding of MySQL and how it functions. 20 have a basic understanding of MySQL and how it functions.
21 21
22* 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
@@ -55,19 +55,15 @@ For folks interested in using this module as an Apache DSO:
55 fully explained in the Makefile. 55 fully explained in the Makefile.
56 56
573) Instruct apxs to compile and install the module as a DSO. You need 573) Instruct apxs to compile and install the module as a DSO. You need
58 to know three things before you run apxs: 58 to know two things before you run apxs:
59 - The location of the apxs binary, find using 'locate apxs' 59 - The location of the apxs binary, find using 'locate apxs'
60 - The location of your MySQL libraries, find using 'locate libmysqlclient' 60 - The location of your MySQL libraries, find using 'locate libmysqlclient'
61 - The location of your mysql.sock socket file. If your MySQL is running on
62 a different machine (in other words, communication is via TCP/IP and not
63 sockets), this value will be ignored BUT IT STILL MUST BE DEFINED
64 AS SOMETHING/ANYTHING FOR COMPILATION TO WORK.
65 61
66 FORMAT: 62 FORMAT:
67 # <path>/apxs -i -c -DMYSQLSOCKET='\"/path/to/mysql.sock\"' -L/path/to/mysqllibs -lmysqlclient -lz mod_log_mysql.c 63 # <path>/apxs -i -c -L/path/to/mysqllibs -lmysqlclient -lz mod_log_mysql.c
68 64
69 EXAMPLE: 65 EXAMPLE:
70 # /usr/sbin/apxs -i -c -DMYSQLSOCKET='\"/var/lib/mysql/mysql.sock\"' -L/usr/lib/mysql -lmysqlclient -lz mod_log_mysql.c 66 # /usr/sbin/apxs -i -c -L/usr/lib/mysql -lmysqlclient -lz mod_log_mysql.c
71 67
72 You should see something like this: 68 You should see something like this:
73 69
@@ -106,8 +102,9 @@ Installation (as a static module compiled into httpd)
106 # tar zxf mod_log_mysql.tar.gz -C /usr/local/src 102 # tar zxf mod_log_mysql.tar.gz -C /usr/local/src
107 # cd /usr/local/src/mod_log_mysql 103 # cd /usr/local/src/mod_log_mysql
108 104
1092) Edit Makefile and make any adjustments for your system. These are 1052) Examine the DEFINEs at the top of mod_log_mysql.c and alter any that
110 fully explained in the Makefile. 106 you choose. Edit Makefile and make any adjustments for your system.
107 These are fully explained in the Makefile.
111 108
1123) # make all 1093) # make all
113 (You should receive NO warnings or errors of any kind. 110 (You should receive NO warnings or errors of any kind.
@@ -128,8 +125,8 @@ Installation (as a static module compiled into httpd)
128 * Append the following string to the EXTRA_LIBS= line. (/usr/lib/mysql is where your libmysqlclient.a file lives): 125 * Append the following string to the EXTRA_LIBS= line. (/usr/lib/mysql is where your libmysqlclient.a file lives):
129 -L/usr/lib/mysql -lmysqlclient -lm -lz 126 -L/usr/lib/mysql -lmysqlclient -lm -lz
130 127
131 * Add this line at the end of the file: 128 * Find the mod_log_config.o line, and add this line immediately after it:
132 Module mysql_log_module mod_log_mysql.o 129 AddModule modules/sql/mod_log_mysql.o
133 130
134 6b) # cp Configuration.apaci Configuration 131 6b) # cp Configuration.apaci Configuration
135 132
@@ -196,7 +193,10 @@ Installation (as a static module compiled into httpd)
196 AddModule mod_log_mysql.c 193 AddModule mod_log_mysql.c
197 194
198 195
19910) Create a database and table to hold the new log data. I log the 19610) If you compiled mod_log_mysql with the ability to make its own tables
197 then you can skip this step. Otherwise you need to do it by hand:
198
199 Create a database and table to hold the new log data. I log the
200 same data as the regular "combined log" plus a little extra information 200 same data as the regular "combined log" plus a little extra information
201 that can be useful. 201 that can be useful.
202 202
@@ -218,9 +218,14 @@ Installation (as a static module compiled into httpd)
218 218
21911) Create a specific MySQL userid that httpd will use to authenticate 21911) Create a specific MySQL userid that httpd will use to authenticate
220 and enter data. This userid need not be an actual Unix user. It 220 and enter data. This userid need not be an actual Unix user. It
221 is a userid internal to MySQL with specific privileges. To create a 221 is a userid internal to MySQL with specific privileges.
222 user called "loguser" with the password "l0gger" with only the 222
223 capability of INSERT to "access_log": 223 mysql> grant insert,create on apache.* to loguser@my.apachemachine.com identified by 'l0gger';
224
225 Security is a very real concern. mod_log_mysql by default is
226 set up to create the SQL tables it needs. If you have deactivated
227 this capability, then create a user called "loguser" with the password
228 "l0gger" with only the capability of INSERT to "access_log":
224 229
225 mysql> grant insert on apache.access_log to loguser@my.apachemachine.com identified by 'l0gger'; 230 mysql> grant insert on apache.access_log to loguser@my.apachemachine.com identified by 'l0gger';
226 231