diff options
| author | 2002-02-24 20:17:16 +0000 | |
|---|---|---|
| committer | 2002-02-24 20:17:16 +0000 | |
| commit | 175ec1e3bee79b081e1d5ef999a5ee82714bbe9b (patch) | |
| tree | 6f8535a717accabc77c4ba104f5a3b0014d4769d /INSTALL | |
| parent | ec06ba32ef1bfb3de7fd87ddc9c43468d5f5684e (diff) | |
Minor but significant updates to the instructions for apxs users.
Diffstat (limited to 'INSTALL')
| -rw-r--r-- | INSTALL | 47 |
1 files changed, 39 insertions, 8 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | $Id: INSTALL,v 1.4 2002/01/15 18:40:14 helios Exp $ | 1 | $Id: INSTALL,v 1.5 2002/02/24 20:17:16 helios Exp $ |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | Requirements | 4 | Requirements |
| @@ -28,6 +28,16 @@ Requirements | |||
| 28 | are available as RPMs. | 28 | are available as RPMs. |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | Do I want a DSO? | ||
| 32 | ================ | ||
| 33 | You need to know the answer to this question before you proceed. The | ||
| 34 | answer is pretty straightforward: what have you done in the past? If | ||
| 35 | you like all your Apache modules to be dynamic, then you should keep | ||
| 36 | doing that. If you're more of an old-school type and prefer to compile | ||
| 37 | the modules right into apache, do that. Both methods work equally | ||
| 38 | well. | ||
| 39 | |||
| 40 | |||
| 31 | Installation (as an Apache DSO) | 41 | Installation (as an Apache DSO) |
| 32 | =============================== | 42 | =============================== |
| 33 | 43 | ||
| @@ -45,11 +55,19 @@ For folks interested in using this module as an Apache DSO: | |||
| 45 | fully explained in the Makefile. | 55 | fully explained in the Makefile. |
| 46 | 56 | ||
| 47 | 3) Instruct apxs to compile and install the module as a DSO. You need | 57 | 3) Instruct apxs to compile and install the module as a DSO. You need |
| 48 | to know two things before you run apxs: | 58 | to know three things before you run apxs: |
| 49 | - The location of the apxs binary, find using 'locate apxs' | 59 | - The location of the apxs binary, find using 'locate apxs' |
| 50 | - 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. | ||
| 51 | 65 | ||
| 52 | # <path>/apxs -i -a -c -L<path to MySQL libs> -lmysqlclient -lz mod_log_mysql.c | 66 | FORMAT: |
| 67 | # <path>/apxs -i -c -DMYSQLSOCKET='\"/path/to/mysql.sock\"' -L/path/to/mysqllibs -lmysqlclient -lz mod_log_mysql.c | ||
| 68 | |||
| 69 | EXAMPLE: | ||
| 70 | # /usr/sbin/apxs -i -c -DMYSQLSOCKET='\"/var/lib/mysql/mysql.sock\"' -L/usr/lib/mysql -lmysqlclient -lz mod_log_mysql.c | ||
| 53 | 71 | ||
| 54 | You should see something like this: | 72 | You should see something like this: |
| 55 | 73 | ||
| @@ -59,7 +77,20 @@ For folks interested in using this module as an Apache DSO: | |||
| 59 | chmod 755 <your path to Apache libexec>/mod_log_mysql.so | 77 | chmod 755 <your path to Apache libexec>/mod_log_mysql.so |
| 60 | [activating module blah in /path/to/apache/etc/httpd.conf] | 78 | [activating module blah in /path/to/apache/etc/httpd.conf] |
| 61 | 79 | ||
| 62 | 4) Now go to step (9) in the instructions below to configure httpd.conf... | 80 | 4) Add the following stanzas to your httpd.conf file. Put the second stanza |
| 81 | somewhere after the ClearModuleList directive. | ||
| 82 | |||
| 83 | <IfDefine HAVE_LOG_MYSQL> | ||
| 84 | LoadModule mysql_log_module modules/mod_log_mysql.so | ||
| 85 | </IfDefine> | ||
| 86 | |||
| 87 | |||
| 88 | <IfDefine HAVE_LOG_MYSQL> | ||
| 89 | AddModule mod_log_mysql.c | ||
| 90 | </IfDefine> | ||
| 91 | |||
| 92 | |||
| 93 | 5) Now go to step (9) in the instructions below to configure httpd.conf... | ||
| 63 | 94 | ||
| 64 | 95 | ||
| 65 | Installation (as a static module compiled into httpd) | 96 | Installation (as a static module compiled into httpd) |
| @@ -143,14 +174,14 @@ Installation (as a static module compiled into httpd) | |||
| 143 | INSERTed into the table called "access_log". | 174 | INSERTed into the table called "access_log". |
| 144 | 175 | ||
| 145 | 176 | ||
| 146 | LogMySQLInfo dbmachine.foo.com loguser l0gger | 177 | MySQLLoginInfo dbmachine.foo.com loguser l0gger |
| 147 | LogMySQLDB apache | 178 | MySQLDatabase apache |
| 148 | 179 | ||
| 149 | <VirtualHost 1.2.3.4> | 180 | <VirtualHost 1.2.3.4> |
| 150 | [snip] | 181 | [snip] |
| 151 | 182 | ||
| 152 | TransferLogMySQLTable access_log | 183 | MySQLTransferLogTable access_log |
| 153 | TransferLogMySQLFormat huSUsbTvRA | 184 | MySQLTransferLogFormat huSUsbTvRA |
| 154 | 185 | ||
| 155 | [snip] | 186 | [snip] |
| 156 | </VirtualHost> | 187 | </VirtualHost> |
