diff options
Diffstat (limited to 'docs/node3.html')
| -rw-r--r-- | docs/node3.html | 664 |
1 files changed, 664 insertions, 0 deletions
diff --git a/docs/node3.html b/docs/node3.html new file mode 100644 index 0000000..e832759 --- /dev/null +++ b/docs/node3.html | |||
| @@ -0,0 +1,664 @@ | |||
| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> | ||
| 2 | |||
| 3 | <!--Converted with LaTeX2HTML 2002-1 (1.68) | ||
| 4 | original version by: Nikos Drakos, CBLU, University of Leeds | ||
| 5 | * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan | ||
| 6 | * with significant contributions from: | ||
| 7 | Jens Lippmann, Marek Rouchal, Martin Wilck and others --> | ||
| 8 | <HTML> | ||
| 9 | <HEAD> | ||
| 10 | <TITLE>2 Installation</TITLE> | ||
| 11 | <META NAME="description" CONTENT="2 Installation"> | ||
| 12 | <META NAME="keywords" CONTENT="documentation"> | ||
| 13 | <META NAME="resource-type" CONTENT="document"> | ||
| 14 | <META NAME="distribution" CONTENT="global"> | ||
| 15 | |||
| 16 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> | ||
| 17 | <META NAME="Generator" CONTENT="LaTeX2HTML v2002-1"> | ||
| 18 | <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> | ||
| 19 | |||
| 20 | <LINK REL="STYLESHEET" HREF="documentation.css"> | ||
| 21 | |||
| 22 | <LINK REL="next" HREF="node4.html"> | ||
| 23 | <LINK REL="previous" HREF="node2.html"> | ||
| 24 | <LINK REL="up" HREF="documentation.html"> | ||
| 25 | <LINK REL="next" HREF="node4.html"> | ||
| 26 | </HEAD> | ||
| 27 | |||
| 28 | <BODY > | ||
| 29 | <!--Navigation Panel--> | ||
| 30 | <A NAME="tex2html152" | ||
| 31 | HREF="node4.html"> | ||
| 32 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> | ||
| 33 | <A NAME="tex2html148" | ||
| 34 | HREF="documentation.html"> | ||
| 35 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> | ||
| 36 | <A NAME="tex2html142" | ||
| 37 | HREF="node2.html"> | ||
| 38 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> | ||
| 39 | <A NAME="tex2html150" | ||
| 40 | HREF="node1.html"> | ||
| 41 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> | ||
| 42 | <BR> | ||
| 43 | <B> Next:</B> <A NAME="tex2html153" | ||
| 44 | HREF="node4.html">3 Configuration</A> | ||
| 45 | <B> Up:</B> <A NAME="tex2html149" | ||
| 46 | HREF="documentation.html">Installing and Running mod_log_sql</A> | ||
| 47 | <B> Previous:</B> <A NAME="tex2html143" | ||
| 48 | HREF="node2.html">1 Introduction</A> | ||
| 49 | <B> <A NAME="tex2html151" | ||
| 50 | HREF="node1.html">Contents</A></B> | ||
| 51 | <BR> | ||
| 52 | <BR> | ||
| 53 | <!--End of Navigation Panel--> | ||
| 54 | <!--Table of Child-Links--> | ||
| 55 | <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> | ||
| 56 | |||
| 57 | <UL> | ||
| 58 | <LI><A NAME="tex2html154" | ||
| 59 | HREF="node3.html#SECTION00031000000000000000">2.1 Requirements</A> | ||
| 60 | <LI><A NAME="tex2html155" | ||
| 61 | HREF="node3.html#SECTION00032000000000000000">2.2 Platform-specific notes</A> | ||
| 62 | <UL> | ||
| 63 | <LI><A NAME="tex2html156" | ||
| 64 | HREF="node3.html#SECTION00032100000000000000">2.2.1 Solaris</A> | ||
| 65 | <LI><A NAME="tex2html157" | ||
| 66 | HREF="node3.html#SECTION00032200000000000000">2.2.2 BSD</A> | ||
| 67 | <LI><A NAME="tex2html158" | ||
| 68 | HREF="node3.html#SECTION00032300000000000000">2.2.3 Win32</A> | ||
| 69 | </UL> | ||
| 70 | <BR> | ||
| 71 | <LI><A NAME="tex2html159" | ||
| 72 | HREF="node3.html#SECTION00033000000000000000">2.3 Do I want a DSO or a static module?</A> | ||
| 73 | <LI><A NAME="tex2html160" | ||
| 74 | HREF="node3.html#SECTION00034000000000000000">2.4 Installation as an Apache DSO (Preferred) </A> | ||
| 75 | <LI><A NAME="tex2html161" | ||
| 76 | HREF="node3.html#SECTION00035000000000000000">2.5 Installation as a static module compiled into | ||
| 77 | httpd</A> | ||
| 78 | </UL> | ||
| 79 | <!--End of Table of Child-Links--> | ||
| 80 | <HR> | ||
| 81 | |||
| 82 | <H1><A NAME="SECTION00030000000000000000"> | ||
| 83 | 2 Installation</A> | ||
| 84 | </H1> | ||
| 85 | |||
| 86 | <P> | ||
| 87 | |||
| 88 | <H2><A NAME="SECTION00031000000000000000"> | ||
| 89 | 2.1 Requirements</A> | ||
| 90 | </H2> | ||
| 91 | |||
| 92 | <P> | ||
| 93 | |||
| 94 | <UL> | ||
| 95 | <LI>A compatible system. mod_log_sql was authored and tested on systems | ||
| 96 | based on Red Hat Linux (Red Hat, Mandrake), but the module should | ||
| 97 | easily adapt to any modern distribution. mod_log_sql has also been | ||
| 98 | ported successfully to Solaris and FreeBSD. | ||
| 99 | </LI> | ||
| 100 | <LI>Apache 1.2 or 1.3. Ideally you should already have successfully compiled | ||
| 101 | Apache and understand the process, but this document tries to make | ||
| 102 | it simple for beginners. | ||
| 103 | </LI> | ||
| 104 | <LI>The MySQL development headers. This package is called different things | ||
| 105 | on different distros. For example, Red Hat 6.x calls this RPM ``MySQL-devel'' | ||
| 106 | whereas Mandrake calls it ``libmysql10-devel.'' | ||
| 107 | </LI> | ||
| 108 | <LI>MySQL >= 3.23.15 configured, installed and running on either localhost | ||
| 109 | or an accessible networked machine. You should already have a basic | ||
| 110 | understanding of MySQL and how it functions. | ||
| 111 | </LI> | ||
| 112 | <LI>Optionally, if you want to be able to log SSL information such as | ||
| 113 | keysize or cipher, you need OpenSSL and mod_ssl installed. | ||
| 114 | </LI> | ||
| 115 | </UL> | ||
| 116 | |||
| 117 | <P> | ||
| 118 | |||
| 119 | <H2><A NAME="SECTION00032000000000000000"> | ||
| 120 | 2.2 Platform-specific notes</A> | ||
| 121 | </H2> | ||
| 122 | |||
| 123 | <P> | ||
| 124 | These installation documents assume a relatively modern GNU/Linux | ||
| 125 | scenario. mod_log_sql has been ported to other platforms; following | ||
| 126 | are notes on compiling the module for those platforms. | ||
| 127 | |||
| 128 | <P> | ||
| 129 | |||
| 130 | <H3><A NAME="SECTION00032100000000000000"> | ||
| 131 | 2.2.1 Solaris</A> | ||
| 132 | </H3> | ||
| 133 | |||
| 134 | <P> | ||
| 135 | The nanosleep() function used in mod_log_sql relies on linking aginst | ||
| 136 | the librt library. Make the following alterations before proceeding: | ||
| 137 | |||
| 138 | <P> | ||
| 139 | |||
| 140 | <OL> | ||
| 141 | <LI>In Makefile, search for the string ``-lmysqlclient -lz'' and change | ||
| 142 | it to read ``-lmysqlclient -lz -lrt'' | ||
| 143 | </LI> | ||
| 144 | <LI>In part <A HREF="node3.html#step:Linking">8a</A> of section <A HREF="node3.html#sec:Static">2.5</A> below, change | ||
| 145 | ``-lmysqlclient -lm -lz'' to read ``-lmysqlclient -lm -lz -lrt'' | ||
| 146 | </LI> | ||
| 147 | </OL> | ||
| 148 | |||
| 149 | <P> | ||
| 150 | |||
| 151 | <H3><A NAME="SECTION00032200000000000000"> | ||
| 152 | 2.2.2 BSD</A> | ||
| 153 | </H3> | ||
| 154 | |||
| 155 | <P> | ||
| 156 | No notes are available at present, but they are desired. If you have | ||
| 157 | successfully ported mod_log_sql to BSD, <I>please</I> contact the maintaniner, Chris Powell (chris@grubbybaby.com) | ||
| 158 | and help fill in this section. | ||
| 159 | |||
| 160 | <P> | ||
| 161 | |||
| 162 | <H3><A NAME="SECTION00032300000000000000"> | ||
| 163 | 2.2.3 Win32</A> | ||
| 164 | </H3> | ||
| 165 | |||
| 166 | <P> | ||
| 167 | No notes are available at present, but they are desired. If you have | ||
| 168 | successfully ported mod_log_sql to Win32, <I>please</I> contact | ||
| 169 | the maintaniner, Chris Powell (chris@grubbybaby.com) and help | ||
| 170 | fill in this section. | ||
| 171 | |||
| 172 | <P> | ||
| 173 | |||
| 174 | <H2><A NAME="SECTION00033000000000000000"> | ||
| 175 | 2.3 Do I want a DSO or a static module?</A> | ||
| 176 | </H2> | ||
| 177 | |||
| 178 | <P> | ||
| 179 | You need to know the answer to this question before you proceed. The | ||
| 180 | answer is pretty straightforward: what have you done in the past? | ||
| 181 | If you like all your Apache modules to be dynamic, then you should | ||
| 182 | keep doing that. If you're more of an old-school type and prefer to | ||
| 183 | compile the modules right into apache, do that. Both methods work | ||
| 184 | equally well. | ||
| 185 | |||
| 186 | <P> | ||
| 187 | FWIW, the DSO method is more modern and increasing in popularity because | ||
| 188 | apxs takes care of a lot of dirty little details for you. As you'll | ||
| 189 | see below, the static-module method is a little more complex. | ||
| 190 | |||
| 191 | <P> | ||
| 192 | |||
| 193 | <H2><A NAME="SECTION00034000000000000000"> | ||
| 194 | 2.4 Installation as an Apache DSO (Preferred) </A> | ||
| 195 | </H2> | ||
| 196 | |||
| 197 | <P> | ||
| 198 | |||
| 199 | <OL> | ||
| 200 | <LI>Perform all the following steps as root so that you have install privs, | ||
| 201 | etc. Unpack the archive into a working directory. | ||
| 202 | |||
| 203 | <P> | ||
| 204 | |||
| 205 | <DL COMPACT> | ||
| 206 | <DT> | ||
| 207 | <DD># tar zxf mod_log_sql.tar.gz -C /usr/local/src | ||
| 208 | |||
| 209 | <P> | ||
| 210 | # cd /usr/local/src/mod_log_sql | ||
| 211 | </DD> | ||
| 212 | </DL> | ||
| 213 | </LI> | ||
| 214 | <LI>Edit Makefile and change the values of the variables in the first | ||
| 215 | section. | ||
| 216 | |||
| 217 | <P> | ||
| 218 | |||
| 219 | <OL> | ||
| 220 | <LI>These paths are <B>necessary:</B> | ||
| 221 | |||
| 222 | <P> | ||
| 223 | <DL> | ||
| 224 | <DT><STRONG>APACHEINSTALLED:</STRONG></DT> | ||
| 225 | <DD>the location where you installed Apache - usually | ||
| 226 | /usr/local/apache, 'locate apxs' can help you find it. | ||
| 227 | </DD> | ||
| 228 | <DT><STRONG>APACHEHEADERS:</STRONG></DT> | ||
| 229 | <DD>The location of your Apache header files, find using | ||
| 230 | 'locate httpd.h' | ||
| 231 | </DD> | ||
| 232 | <DT><STRONG>MYSQLLIBRARIES:</STRONG></DT> | ||
| 233 | <DD>The location of your MySQL libraries, find using | ||
| 234 | 'locate libmysqlclient.so' | ||
| 235 | </DD> | ||
| 236 | <DT><STRONG>MYSQLHEADERS:</STRONG></DT> | ||
| 237 | <DD>The location of your MySQL header files, find using | ||
| 238 | 'locate mysql.h' | ||
| 239 | </DD> | ||
| 240 | </DL> | ||
| 241 | </LI> | ||
| 242 | <LI><B>Optional</B>: if you compiled mod_ssl for Apache and want to | ||
| 243 | log SSL data such as 'keysize' and 'cipher type': | ||
| 244 | |||
| 245 | <P> | ||
| 246 | <DL> | ||
| 247 | <DT><STRONG>MODSSLHEADERS:</STRONG></DT> | ||
| 248 | <DD>the location of your mod_ssl header files, find | ||
| 249 | using 'locate mod_ssl.h' | ||
| 250 | </DD> | ||
| 251 | <DT><STRONG>DB1HEADERS:</STRONG></DT> | ||
| 252 | <DD>the location of your db1 header files, find using 'locate | ||
| 253 | ndbm.h' | ||
| 254 | </DD> | ||
| 255 | </DL> | ||
| 256 | </LI> | ||
| 257 | </OL> | ||
| 258 | You do <B>not</B> need to compile SSL support into mod_log_sql | ||
| 259 | in order to simply use it with a secure site. You only need to compile | ||
| 260 | SSL support into mod_log_sql <B>if you want to log SSL-specific | ||
| 261 | data</B> such as the cipher type. | ||
| 262 | |||
| 263 | <P> | ||
| 264 | </LI> | ||
| 265 | <LI>IMPORTANT: If you are not logging SSL info, comment out MODSSLHDRS | ||
| 266 | by putting a # character in front of it: | ||
| 267 | |||
| 268 | <P> | ||
| 269 | |||
| 270 | <DL COMPACT> | ||
| 271 | <DT> | ||
| 272 | <DD>#MODSSLHDRS=/usr/include/... | ||
| 273 | </DD> | ||
| 274 | </DL> | ||
| 275 | </LI> | ||
| 276 | <LI>Instruct apxs to compile the module as a DSO. | ||
| 277 | |||
| 278 | <P> | ||
| 279 | |||
| 280 | <DL COMPACT> | ||
| 281 | <DT> | ||
| 282 | <DD># make dso | ||
| 283 | </DD> | ||
| 284 | </DL>You should see output similar to the following: | ||
| 285 | |||
| 286 | <P> | ||
| 287 | |||
| 288 | <DL COMPACT> | ||
| 289 | <DT> | ||
| 290 | <DD>/usr/local/Apache/bin/apxs -Wc,-O2 -Wc,-Wall -Wc,-DEAPI -c -I/usr/... | ||
| 291 | |||
| 292 | <P> | ||
| 293 | gcc -DLINUX=22 -DNO_DBM_REWRITEMAP -DMOD_SSL=208111 -DUSE_HS... | ||
| 294 | |||
| 295 | <P> | ||
| 296 | gcc -shared -o mod_log_sql.so mod_log_sql.o -Wc,-O2 -Wc,-Wall -Wc... | ||
| 297 | </DD> | ||
| 298 | </DL>You should see no errors and have a new file called "mod_log_sql.so" | ||
| 299 | in your directory. | ||
| 300 | |||
| 301 | <P> | ||
| 302 | </LI> | ||
| 303 | <LI>Instruct apxs to install the DSO. | ||
| 304 | |||
| 305 | <P> | ||
| 306 | |||
| 307 | <DL COMPACT> | ||
| 308 | <DT> | ||
| 309 | <DD># make dsoinstall | ||
| 310 | </DD> | ||
| 311 | </DL>You should see output similar to the following: | ||
| 312 | |||
| 313 | <P> | ||
| 314 | |||
| 315 | <DL COMPACT> | ||
| 316 | <DT> | ||
| 317 | <DD>/usr/local/Apache/bin/apxs -i mod_log_sql.so | ||
| 318 | |||
| 319 | <P> | ||
| 320 | cp mod_log_sql.so /usr/local/Apache/libexec/mod_log_sql.so | ||
| 321 | |||
| 322 | <P> | ||
| 323 | chmod 755 /usr/local/Apache/libexec/mod_log_sql.so | ||
| 324 | </DD> | ||
| 325 | </DL> | ||
| 326 | </LI> | ||
| 327 | <LI>Load and activate the module in httpd.conf: | ||
| 328 | |||
| 329 | <P> | ||
| 330 | |||
| 331 | <OL> | ||
| 332 | <LI>Insert this line in the same area as other logging modules, e.g. near | ||
| 333 | ``LoadModule config_log_module'': | ||
| 334 | |||
| 335 | <P> | ||
| 336 | |||
| 337 | <DL COMPACT> | ||
| 338 | <DT> | ||
| 339 | <DD>LoadModule sql_log_module libexec/mod_log_sql.so | ||
| 340 | </DD> | ||
| 341 | </DL> | ||
| 342 | </LI> | ||
| 343 | <LI>Insert this line in the same area as other logging modules, e.g. near | ||
| 344 | ``AddModule mod_log_config.c'': | ||
| 345 | |||
| 346 | <P> | ||
| 347 | |||
| 348 | <DL COMPACT> | ||
| 349 | <DT> | ||
| 350 | <DD>AddModule mod_log_sql.c | ||
| 351 | </DD> | ||
| 352 | </DL> | ||
| 353 | </LI> | ||
| 354 | </OL> | ||
| 355 | </LI> | ||
| 356 | <LI>Module ordering within httpd.conf is important if you are logging | ||
| 357 | SSL information. Please ensure that | ||
| 358 | |||
| 359 | <P> | ||
| 360 | |||
| 361 | <DL COMPACT> | ||
| 362 | <DT> | ||
| 363 | <DD>LoadModule ssl_module libexec/libssl.so | ||
| 364 | </DD> | ||
| 365 | </DL>comes before | ||
| 366 | |||
| 367 | <P> | ||
| 368 | |||
| 369 | <DL COMPACT> | ||
| 370 | <DT> | ||
| 371 | <DD>LoadModule sql_log_module libexec/mod_log_sql.so | ||
| 372 | </DD> | ||
| 373 | </DL>in your httpd.conf file. If they are out of order, simply cut-and-paste | ||
| 374 | the ``ssl_module'' section so that it is at the top. If you do | ||
| 375 | not, you will get this error when you start Apache: | ||
| 376 | |||
| 377 | <P> | ||
| 378 | |||
| 379 | <DL COMPACT> | ||
| 380 | <DT> | ||
| 381 | <DD>/usr/local/apache/libexec/mod_log_mysql.so: undefined symbol: ssl_var_lookup | ||
| 382 | |||
| 383 | <P> | ||
| 384 | /usr/local/apache/bin/apachectl startssl: httpd could not be started | ||
| 385 | </DD> | ||
| 386 | </DL>(mod_log_sql has a dependency on mod_ssl for SSL symbols. If the | ||
| 387 | statements are out of order, mod_log_sql cannot recognize those | ||
| 388 | symbols.) | ||
| 389 | |||
| 390 | <P> | ||
| 391 | Now skip below to section <A HREF="node4.html#sec:Configuration">3</A>, <B>Configuration</B>. | ||
| 392 | |||
| 393 | <P> | ||
| 394 | </LI> | ||
| 395 | </OL> | ||
| 396 | |||
| 397 | <P> | ||
| 398 | |||
| 399 | <H2><A NAME="SECTION00035000000000000000"></A><A NAME="sec:Static"></A> | ||
| 400 | <BR> | ||
| 401 | 2.5 Installation as a static module compiled into | ||
| 402 | httpd | ||
| 403 | </H2> | ||
| 404 | |||
| 405 | <P> | ||
| 406 | |||
| 407 | <OL> | ||
| 408 | <LI>Perform all the following steps as root so that you have install privs, | ||
| 409 | etc. | ||
| 410 | </LI> | ||
| 411 | <LI>Unpack the archive into a working directory. | ||
| 412 | |||
| 413 | <P> | ||
| 414 | |||
| 415 | <DL COMPACT> | ||
| 416 | <DT> | ||
| 417 | <DD># tar zxf mod_log_sql.tar.gz -C /usr/local/src | ||
| 418 | |||
| 419 | <P> | ||
| 420 | # cd /usr/local/src/mod_log_sql | ||
| 421 | </DD> | ||
| 422 | </DL> | ||
| 423 | </LI> | ||
| 424 | <LI><A NAME="step:editMF"></A>Edit Makefile and change the values of the variables | ||
| 425 | in the first section. | ||
| 426 | |||
| 427 | <P> | ||
| 428 | |||
| 429 | <OL> | ||
| 430 | <LI>These are <B>necessary:</B> | ||
| 431 | |||
| 432 | <P> | ||
| 433 | <DL> | ||
| 434 | <DT><STRONG>APACHEINSTALLED:</STRONG></DT> | ||
| 435 | <DD>the location where you installed Apache - usually | ||
| 436 | /usr/local/apache, 'locate apxs' can help you find it. | ||
| 437 | </DD> | ||
| 438 | <DT><STRONG>APACHESOURCE:</STRONG></DT> | ||
| 439 | <DD>the location of your Apache <B>sources</B>, find | ||
| 440 | using 'locate ABOUT_APACHE' | ||
| 441 | </DD> | ||
| 442 | <DT><STRONG>APACHEHEADERS:</STRONG></DT> | ||
| 443 | <DD>the location of your Apache header files, find using | ||
| 444 | 'locate httpd.h' | ||
| 445 | </DD> | ||
| 446 | <DT><STRONG>MYSQLLIBRARIES:</STRONG></DT> | ||
| 447 | <DD>the location of your MySQL libraries, find using | ||
| 448 | 'locate libmysqlclient.so' | ||
| 449 | </DD> | ||
| 450 | <DT><STRONG>MYSQLHEADERS:</STRONG></DT> | ||
| 451 | <DD>the location of your MySQL header files, find using | ||
| 452 | 'locate mysql.h' | ||
| 453 | </DD> | ||
| 454 | </DL> | ||
| 455 | </LI> | ||
| 456 | <LI><B>Optional</B>: if you compiled mod_ssl for Apache and want to | ||
| 457 | log SSL data such as 'keysize' and 'cipher type': | ||
| 458 | |||
| 459 | <P> | ||
| 460 | <DL> | ||
| 461 | <DT><STRONG>MODSSLHEADERS:</STRONG></DT> | ||
| 462 | <DD>the location of your mod_ssl header files, find | ||
| 463 | using 'locate mod_ssl.h' | ||
| 464 | </DD> | ||
| 465 | <DT><STRONG>DB1HEADERS:</STRONG></DT> | ||
| 466 | <DD>the location of your db1 header files, find using 'locate | ||
| 467 | ndbm.h' | ||
| 468 | </DD> | ||
| 469 | </DL> | ||
| 470 | </LI> | ||
| 471 | </OL> | ||
| 472 | You do <B>not</B> need to compile SSL support into mod_log_sql | ||
| 473 | in order to simply use it with a secure site. You only need to compile | ||
| 474 | SSL support into mod_log_sql <B>if you want to log SSL-specific | ||
| 475 | data</B> such as the cipher type. | ||
| 476 | |||
| 477 | <P> | ||
| 478 | </LI> | ||
| 479 | <LI>IMPORTANT: If you are not logging SSL info, comment out MODSSLHDRS | ||
| 480 | by putting a # character in front of it: | ||
| 481 | |||
| 482 | <P> | ||
| 483 | |||
| 484 | <DL COMPACT> | ||
| 485 | <DT> | ||
| 486 | <DD>#MODSSLHDRS=/usr/include/... | ||
| 487 | </DD> | ||
| 488 | </DL> | ||
| 489 | </LI> | ||
| 490 | <LI>Compile the module. | ||
| 491 | |||
| 492 | <P> | ||
| 493 | |||
| 494 | <DL COMPACT> | ||
| 495 | <DT> | ||
| 496 | <DD># make static | ||
| 497 | </DD> | ||
| 498 | </DL>You should see output similar to the following: | ||
| 499 | |||
| 500 | <P> | ||
| 501 | |||
| 502 | <DL COMPACT> | ||
| 503 | <DT> | ||
| 504 | <DD>gcc -fpic -O2 -Wall -I/usr/local/Apache/include -I/usr/include/mysql -I/usr/lo... | ||
| 505 | </DD> | ||
| 506 | </DL>You should see no errors and have a new file called "mod_log_sql.o" | ||
| 507 | in your directory. | ||
| 508 | |||
| 509 | <P> | ||
| 510 | </LI> | ||
| 511 | <LI>Install the module. | ||
| 512 | |||
| 513 | <P> | ||
| 514 | |||
| 515 | <DL COMPACT> | ||
| 516 | <DT> | ||
| 517 | <DD># make statinstall | ||
| 518 | </DD> | ||
| 519 | </DL> | ||
| 520 | </LI> | ||
| 521 | <LI>Change to your Apache source directory. | ||
| 522 | |||
| 523 | <P> | ||
| 524 | |||
| 525 | <DL COMPACT> | ||
| 526 | <DT> | ||
| 527 | <DD># cd /usr/local/src/apache-1.3.22/src | ||
| 528 | </DD> | ||
| 529 | </DL> | ||
| 530 | </LI> | ||
| 531 | <LI>Re-compile your httpd binary as follows. | ||
| 532 | |||
| 533 | <P> | ||
| 534 | |||
| 535 | <OL> | ||
| 536 | <LI><A NAME="step:Linking"></A>Make these changes to Configuration.apaci: | ||
| 537 | |||
| 538 | <P> | ||
| 539 | |||
| 540 | <UL> | ||
| 541 | <LI>Append the following string to the EXTRA_LIBS= line. ("/usr/lib/mysql" | ||
| 542 | is from step <A HREF="node3.html#step:editMF">3</A>, and is where your MySQL libraries | ||
| 543 | live): | ||
| 544 | </LI> | ||
| 545 | </UL> | ||
| 546 | |||
| 547 | <DL COMPACT> | ||
| 548 | <DT> | ||
| 549 | <DD>-L/usr/lib/mysql -lmysqlclient -lm -lz | ||
| 550 | </DD> | ||
| 551 | </DL> | ||
| 552 | <UL> | ||
| 553 | <LI>Find the mod_log_config.o line, and insert this line immediately | ||
| 554 | after it: | ||
| 555 | </LI> | ||
| 556 | </UL> | ||
| 557 | |||
| 558 | <DL COMPACT> | ||
| 559 | <DT> | ||
| 560 | <DD>AddModule modules/sql/mod_log_sql.o | ||
| 561 | </DD> | ||
| 562 | </DL> | ||
| 563 | </LI> | ||
| 564 | <LI># cp Configuration.apaci Configuration | ||
| 565 | </LI> | ||
| 566 | <LI># ./Configure | ||
| 567 | </LI> | ||
| 568 | <LI># make | ||
| 569 | </LI> | ||
| 570 | <LI># strip httpd | ||
| 571 | </LI> | ||
| 572 | </OL> | ||
| 573 | </LI> | ||
| 574 | <LI>Test your new apache binary: | ||
| 575 | |||
| 576 | <P> | ||
| 577 | |||
| 578 | <DL COMPACT> | ||
| 579 | <DT> | ||
| 580 | <DD># ./httpd -l | ||
| 581 | </DD> | ||
| 582 | </DL>You should see something like: | ||
| 583 | |||
| 584 | <P> | ||
| 585 | |||
| 586 | <DL COMPACT> | ||
| 587 | <DT> | ||
| 588 | <DD>Compiled-in modules: | ||
| 589 | |||
| 590 | <P> | ||
| 591 | http_core.c | ||
| 592 | |||
| 593 | <P> | ||
| 594 | mod_log_sql.c <- That's the line you're looking for. | ||
| 595 | |||
| 596 | <P> | ||
| 597 | mod_env.c | ||
| 598 | |||
| 599 | <P> | ||
| 600 | mod_log_config.c | ||
| 601 | |||
| 602 | <P> | ||
| 603 | mod_mime.c | ||
| 604 | |||
| 605 | <P> | ||
| 606 | mod_negotiation.c | ||
| 607 | |||
| 608 | <P> | ||
| 609 | etc... | ||
| 610 | </DD> | ||
| 611 | </DL> | ||
| 612 | </LI> | ||
| 613 | <LI>Install your httpd binary. Copy it over your old httpd binary, wherever | ||
| 614 | it lives. You can and should rename your old httpd first so that you | ||
| 615 | can easily revert to that working version in case of bugs with the | ||
| 616 | new version. | ||
| 617 | |||
| 618 | <P> | ||
| 619 | |||
| 620 | <DL COMPACT> | ||
| 621 | <DT> | ||
| 622 | <DD># /etc/rc.d/init.d/httpd stop | ||
| 623 | |||
| 624 | <P> | ||
| 625 | # mv /usr/local/Apache/bin/httpd ~/httpd-save | ||
| 626 | |||
| 627 | <P> | ||
| 628 | # cp -f ./httpd /usr/local/Apache/bin/ | ||
| 629 | </DD> | ||
| 630 | </DL> | ||
| 631 | </LI> | ||
| 632 | </OL> | ||
| 633 | |||
| 634 | <P> | ||
| 635 | <HR> | ||
| 636 | <!--Navigation Panel--> | ||
| 637 | <A NAME="tex2html152" | ||
| 638 | HREF="node4.html"> | ||
| 639 | <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> | ||
| 640 | <A NAME="tex2html148" | ||
| 641 | HREF="documentation.html"> | ||
| 642 | <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> | ||
| 643 | <A NAME="tex2html142" | ||
| 644 | HREF="node2.html"> | ||
| 645 | <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> | ||
| 646 | <A NAME="tex2html150" | ||
| 647 | HREF="node1.html"> | ||
| 648 | <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> | ||
| 649 | <BR> | ||
| 650 | <B> Next:</B> <A NAME="tex2html153" | ||
| 651 | HREF="node4.html">3 Configuration</A> | ||
| 652 | <B> Up:</B> <A NAME="tex2html149" | ||
| 653 | HREF="documentation.html">Installing and Running mod_log_sql</A> | ||
| 654 | <B> Previous:</B> <A NAME="tex2html143" | ||
| 655 | HREF="node2.html">1 Introduction</A> | ||
| 656 | <B> <A NAME="tex2html151" | ||
| 657 | HREF="node1.html">Contents</A></B> | ||
| 658 | <!--End of Navigation Panel--> | ||
| 659 | <ADDRESS> | ||
| 660 | Chris Powell | ||
| 661 | 2002-12-18 | ||
| 662 | </ADDRESS> | ||
| 663 | </BODY> | ||
| 664 | </HTML> | ||
