diff options
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL | 46 |
1 files changed, 23 insertions, 23 deletions
@@ -1,4 +1,4 @@ | |||
1 | $Id: INSTALL,v 1.7 2002/04/21 23:01:52 helios Exp $ | 1 | $Id: INSTALL,v 1.8 2002/05/14 21:47:14 helios Exp $ |
2 | 2 | ||
3 | 3 | ||
4 | Requirements | 4 | Requirements |
@@ -48,8 +48,8 @@ For folks interested in using this module as an Apache DSO: | |||
48 | 48 | ||
49 | 1) Unpack the archive into a working directory. | 49 | 1) Unpack the archive into a working directory. |
50 | 50 | ||
51 | # tar zxf mod_log_mysql.tar.gz -C /usr/local/src | 51 | # tar zxf mod_log_sql.tar.gz -C /usr/local/src |
52 | # cd /usr/local/src/mod_log_mysql | 52 | # cd /usr/local/src/mod_log_sql |
53 | 53 | ||
54 | 2) Edit Makefile and make any adjustments for your system. These are | 54 | 2) Edit Makefile and make any adjustments for your system. These are |
55 | fully explained in the Makefile. | 55 | fully explained in the Makefile. |
@@ -60,29 +60,29 @@ For folks interested in using this module as an Apache DSO: | |||
60 | - The location of your MySQL libraries, find using 'locate libmysqlclient' | 60 | - The location of your MySQL libraries, find using 'locate libmysqlclient' |
61 | 61 | ||
62 | FORMAT: | 62 | FORMAT: |
63 | # <path>/apxs -i -c -L/path/to/mysqllibs -lmysqlclient -lz mod_log_mysql.c | 63 | # <path>/apxs -i -c -L/path/to/mysqllibs -lmysqlclient -lz mod_log_sql.c |
64 | 64 | ||
65 | EXAMPLE: | 65 | EXAMPLE: |
66 | # /usr/sbin/apxs -i -c -L/usr/lib/mysql -lmysqlclient -lz mod_log_mysql.c | 66 | # /usr/sbin/apxs -i -c -L/usr/lib/mysql -lmysqlclient -lz mod_log_sql.c |
67 | 67 | ||
68 | You should see something like this: | 68 | You should see something like this: |
69 | 69 | ||
70 | gcc -fpic -DSHARED_MODULE -I/usr/local/Apache/include -c mod_log_mysql.c | 70 | gcc -fpic -DSHARED_MODULE -I/usr/local/Apache/include -c mod_log_sql.c |
71 | ld -Bshareable -o mod_log_mysql.so mod_log_mysql.o | 71 | ld -Bshareable -o mod_log_sql.so mod_log_sql.o |
72 | cp mod_log_mysql.so <your path to Apache libexec>/mod_log_mysql.so | 72 | cp mod_log_sql.so <your path to Apache libexec>/mod_log_sql.so |
73 | chmod 755 <your path to Apache libexec>/mod_log_mysql.so | 73 | chmod 755 <your path to Apache libexec>/mod_log_sql.so |
74 | [activating module blah in /path/to/apache/etc/httpd.conf] | 74 | [activating module blah in /path/to/apache/etc/httpd.conf] |
75 | 75 | ||
76 | 4) Add the following stanzas to your httpd.conf file. Put the second stanza | 76 | 4) Add the following stanzas to your httpd.conf file. Put the second stanza |
77 | somewhere after the ClearModuleList directive. | 77 | somewhere after the ClearModuleList directive. |
78 | 78 | ||
79 | <IfDefine HAVE_LOG_MYSQL> | 79 | <IfDefine HAVE_LOG_MYSQL> |
80 | LoadModule mysql_log_module modules/mod_log_mysql.so | 80 | LoadModule mysql_log_module modules/mod_log_sql.so |
81 | </IfDefine> | 81 | </IfDefine> |
82 | 82 | ||
83 | 83 | ||
84 | <IfDefine HAVE_LOG_MYSQL> | 84 | <IfDefine HAVE_LOG_MYSQL> |
85 | AddModule mod_log_mysql.c | 85 | AddModule mod_log_sql.c |
86 | </IfDefine> | 86 | </IfDefine> |
87 | 87 | ||
88 | 88 | ||
@@ -99,16 +99,16 @@ Installation (as a static module compiled into httpd) | |||
99 | 99 | ||
100 | 1) Unpack the archive into a working directory. | 100 | 1) Unpack the archive into a working directory. |
101 | 101 | ||
102 | # tar zxf mod_log_mysql.tar.gz -C /usr/local/src | 102 | # tar zxf mod_log_sql.tar.gz -C /usr/local/src |
103 | # cd /usr/local/src/mod_log_mysql | 103 | # cd /usr/local/src/mod_log_sql |
104 | 104 | ||
105 | 2) Examine the DEFINEs at the top of mod_log_mysql.c and alter any that | 105 | 2) Examine the DEFINEs at the top of mod_log_sql.c and alter any that |
106 | you choose. Edit Makefile and make any adjustments for your system. | 106 | you choose. Edit Makefile and make any adjustments for your system. |
107 | These are fully explained in the Makefile. | 107 | These are fully explained in the Makefile. |
108 | 108 | ||
109 | 3) # make all | 109 | 3) # make all |
110 | (You should receive NO warnings or errors of any kind. | 110 | (You should receive NO warnings or errors of any kind. |
111 | If you see messages like this: "mod_log_mysql.c:69: httpd.h: No such | 111 | If you see messages like this: "mod_log_sql.c:69: httpd.h: No such |
112 | file or directory" then you do not have your CFLAGS correctly | 112 | file or directory" then you do not have your CFLAGS correctly |
113 | pointing to the right include directory.) | 113 | pointing to the right include directory.) |
114 | 114 | ||
@@ -126,7 +126,7 @@ Installation (as a static module compiled into httpd) | |||
126 | -L/usr/lib/mysql -lmysqlclient -lm -lz | 126 | -L/usr/lib/mysql -lmysqlclient -lm -lz |
127 | 127 | ||
128 | * Find the mod_log_config.o line, and add this line immediately after it: | 128 | * Find the mod_log_config.o line, and add this line immediately after it: |
129 | AddModule modules/sql/mod_log_mysql.o | 129 | AddModule modules/sql/mod_log_sql.o |
130 | 130 | ||
131 | 6b) # cp Configuration.apaci Configuration | 131 | 6b) # cp Configuration.apaci Configuration |
132 | 132 | ||
@@ -144,7 +144,7 @@ Installation (as a static module compiled into httpd) | |||
144 | 144 | ||
145 | Compiled-in modules: | 145 | Compiled-in modules: |
146 | http_core.c | 146 | http_core.c |
147 | mod_log_mysql.c <-- That's the line you're looking for. | 147 | mod_log_sql.c <-- That's the line you're looking for. |
148 | mod_env.c | 148 | mod_env.c |
149 | mod_log_config.c | 149 | mod_log_config.c |
150 | mod_mime.c | 150 | mod_mime.c |
@@ -161,7 +161,7 @@ Installation (as a static module compiled into httpd) | |||
161 | 161 | ||
162 | 9) Configure your apache daemon to log to your database. Here's a very | 162 | 9) Configure your apache daemon to log to your database. Here's a very |
163 | basic set of config lines to start you off. Full documentation is | 163 | basic set of config lines to start you off. Full documentation is |
164 | available here: http://www.grubbybaby.com/mod_log_mysql/directives.html | 164 | available here: http://www.grubbybaby.com/mod_log_sql/directives.html |
165 | 165 | ||
166 | EXAMPLE: Connect to the MySQL database called "apache" running | 166 | EXAMPLE: Connect to the MySQL database called "apache" running |
167 | on "dbmachine.foo.com". The module uses username "loguser" and | 167 | on "dbmachine.foo.com". The module uses username "loguser" and |
@@ -186,14 +186,14 @@ Installation (as a static module compiled into httpd) | |||
186 | 186 | ||
187 | 9a) Special step for users who have a DSO-enabled httpd: | 187 | 9a) Special step for users who have a DSO-enabled httpd: |
188 | 188 | ||
189 | If you you are building mod_log_mysql as a static module BUT | 189 | If you you are building mod_log_sql as a static module BUT |
190 | your httpd is enabled for DSOs, add the following line to your | 190 | your httpd is enabled for DSOs, add the following line to your |
191 | httpd.conf: | 191 | httpd.conf: |
192 | 192 | ||
193 | AddModule mod_log_mysql.c | 193 | AddModule mod_log_sql.c |
194 | 194 | ||
195 | 195 | ||
196 | 10) If you compiled mod_log_mysql with the ability to make its own tables | 196 | 10) If you compiled mod_log_sql with the ability to make its own tables |
197 | then you can skip this step. Otherwise you need to do it by hand: | 197 | then you can skip this step. Otherwise you need to do it by hand: |
198 | 198 | ||
199 | Create a database and table to hold the new log data. I log the | 199 | Create a database and table to hold the new log data. I log the |
@@ -208,7 +208,7 @@ Installation (as a static module compiled into httpd) | |||
208 | mysql> create database apache; | 208 | mysql> create database apache; |
209 | 209 | ||
210 | Then create the table called "access_log". I enclosed an SQL file | 210 | Then create the table called "access_log". I enclosed an SQL file |
211 | that will create every column type that mod_log_mysql supports. | 211 | that will create every column type that mod_log_sql supports. |
212 | Unless you're just testing or playing around, this is probably NOT | 212 | Unless you're just testing or playing around, this is probably NOT |
213 | what you want, so edit the file first and delete the lines that | 213 | what you want, so edit the file first and delete the lines that |
214 | don't pertain to you. Then: | 214 | don't pertain to you. Then: |
@@ -222,7 +222,7 @@ Installation (as a static module compiled into httpd) | |||
222 | 222 | ||
223 | mysql> grant insert,create on apache.* to loguser@my.apachemachine.com identified by 'l0gger'; | 223 | mysql> grant insert,create on apache.* to loguser@my.apachemachine.com identified by 'l0gger'; |
224 | 224 | ||
225 | Security is a very real concern. mod_log_mysql by default is | 225 | Security is a very real concern. mod_log_sql by default is |
226 | set up to create the SQL tables it needs. If you have deactivated | 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 | 227 | this capability, then create a user called "loguser" with the password |
228 | "l0gger" with only the capability of INSERT to "access_log": | 228 | "l0gger" with only the capability of INSERT to "access_log": |