1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430
|
<html>
<head>
<title>AOLserver</title>
</head>
<body>
<h1>AOLserver Installation Guide</h1>
<p>
<small>
$Header: /cvsroot/aolserver/aolserver.com/docs/admin/install.html,v 1.1 2002/03/07 19:15:34 kriston Exp $
</small>
<p>
<p>AOLserver is distributed in source form. Pre-built binary kits for many
platforms are available at <a href="http://aolserver.com/">http://aolserver.com</a>.
</p>
<b>Getting Started</b><br><br>
AOLserver 3 is reasonably portable and
known to compile and run on the following
platforms:
<ul>
<li>Linux 2.2 and better (x86 and others)
</li>
<li>FreeBSD 3.4 and better (x86 and others)
</li>
<li>OpenBSD 2.5 and better (x86 and others)
</li>
<li>Solaris 2.x and better (SPARC and x86)
</li>
<li>IRIX 6.x (mips)
</li>
<li>HP/UX 10 and 11 (hppa)
</li>
<li>DEC Tru64 &OSF/1 4.0 and better (alpha)
</li>
<li>UnixWare 7.x and better (x86)
</li>
<li>Apple OS/X "Darwin" (first consumer beta release only) (ppc) </li>
</ul>
<p>It's likely AOLserver can compile on other systems and/or higher or lower
numbered versions but this has not been extensively tested. The primary
development platforms for AOLserver at AOL are IRIX 6.4 and Solaris 7.
We also use HP/UX 10.20/11.0, Solaris 2.6, and VA Linux 6.2.1 (Linux 2.2).</p>
<p>You will need a <b>C compiler</b>. The best one to use is GNU GCC from
<a href="http://www.gnu.org/">http://www.gnu.org</a> and its mirrors. The versions
we use are 2.95.2. AOLserver (and the included Tcl libraries) are written
entirely
in ANSI standard C.</p>
<p><b>GNU make</b> is also required. It is also available from the GNU web
site.</p>
<b>Building</b><br><br>
We've tried to make building AOLserver as simple as possible. On the supported
platforms, simply typing "<b>gmake</b>" will build the server and its standard
modules.<br>
<ol>
<li>Check the include/Makefile.global file for platform-specific options.
Most platforms use gcc.</li>
<li>Enable optional modules. The default Makefile builds nssock, nsssl,
nscgi,
nscp, nslog, nsperm, and nsext.</li>
<li>Type "<tt>gmake</tt>", ensuring the make which is executed is GNU make.
You might want to call your GNU Make "gmake" instead of "make".</li>
<li>Watch for any warnings. The warning for a missing third-party library
in nsssl can be safely ignored.</li>
</ol>
Some modules use third-party libraries. If the library is missing, the AOLserver
build will continue without error -- it just will not build the offending
module. The only module in the base server installation that requires an
external library is "nsssl" (in the nssock/ directory) which requires BSAFE
from <a href="http://www.rsasecurity.com/">http://www.rsasecurity.com</a>. You can download
a binary version of nsssl at <a href="http://aolserver.com/">http://aolserver.com</a> if
you don't have BSAFE.<br>
<br>
<i>Note: If you have any problems building, the two files <b>include/Makefile.global</b> and
<b>include/Makefile.module</b> have all the information you need to change
settings throughout the AOLserver environment.</i><br>
<br><b>Installing<br>
</b><br>
<p>Type "<tt><b>gmake install</b></tt>" to make a production server. This
will create an installation directory at /usr/local/aolserver/, populate
the directories with various startup files and configuration files, copy
the binaries to the /usr/local/aolsever/bin directory, and finish. To install
confidence tests, type "make install-tests" and they will appear in the
tests/ directory of your server's pageroot. The default location for installations
can be overridden by typing "<tt><b>gmake install PREFIX=/your/directory/</b></tt>".</p>
<p><i>Note: AOLserver requires the modified versions of Tcl included with
the
distribution. The 7.6 library is heavily modified, mostly for thread
safety
and ns_share support. The 8.x library is modified slightly to
enable
thread support through AOLserver's nsthread library and to
patch a few
minor problems.</i><br>
<br>
</p>
<b>Configuring</b><br>
<p>The installation directory contains a file named "sample-config.tcl" which
represents a complete configuration of AOLserver. This configuration will:</p>
<ol>
<li>Listen for http connections on your
computer's primary interface at
port 8000. To use another port and/or
select interfaces, you can set
the "host" and "httpport" variables.</li>
<li>Check security settings for nscp (Control Port module) and listen on
localhost:9999 if they are set.</li>
<li>Check for the existence of ssl keys (nsssl module) and listen with
https on port 8443 if they exist.<br>
</li>
</ol>
<p><i>Note: Some modules have been disabled in the sample nsd.tcl for security
reasons.
They are <b>nscp </b>and <b>nsperm</b>. They aren't required to run a
server
unless you want to use the Control Port and/or the Permissions
module,
respectively. Before using them, change the passwords and
default permissions
by following the instructions in the AOLserver
documentation.</i></p>
<p>Although you must be root to start AOLserver, the server itself must
change
to a regular user shortly after initialization. You either
need to start
the server as a non-root user (in which case you will
not be able to listen
for connections on privileged ports such as port
80) or you must include
a -u user command line flag to which the
server will setuid(2) after startup.
You may either specify a Unix
username or numeric uid, e.g.: <tt>./bin/nsd76
-t ./config.tcl -u user -g group</tt></p>
<p>AOLserver can be started by executing the <b>nsd76 </b>or <b>nsd8x </b>binary.
The
choice of nsd76 or nsd8x depends on whether you need compatibility
with
Tcl7.6 (closer to the 7.4 of previous releases) or special
features of
Tcl8.x (e.g., internationalizaton). For the mode of
operation, there
are three choices: <b>Foreground, Background, </b>and <b>Inittab.</b></p>
In <b>Foreground </b>mode , the server starts and emits diagnostic log messages
directly to the terminal window. This is useful for testing, configuration
or debugging a server. To start the server in foreground mode use:<br>
<tt>/bin/nsd -ft ./config.tcl -u user -g group</tt><br>
To stop a server running the foreground simply press interrupt on your keyboard
(e.g., ctrl-c or the DEL key) which will send a SIGINT to the server and
initiate shutdown.<br>
<br>
In <b>Background </b>mode, the server forks and disassociates from the terminal.
Diagnostic messages are appended to log/server.log. This is a typical
daemon-style mode of operation. To start the server in background mode
use: <tt>./bin/nsd -t ./config.tcl -u user -g group</tt>. To stop a server
running the background you may either use the kill(2) command to send
a SIGTERM to the background process id(*) or the special -K flag of the
nsd binary. This flag will determine the process id from a special marker
file, send the signal and wait for shutdown, e.g.:<br>
<tt>./bin/nsd8x -Kt ./config.tcl -u user -g group</tt><br>
You may also use the -k flag to kill and restart a background server.<br>
<br>
In <b>Inittab </b>mode, the server runs in the foreground but opens the
log file as with background mode. This mode is used when the server is
started from an entry in the /etc/inittab file. The benefit of this mode
is that init will restart the server if it happens to crash. Production
servers at AOL normally run in this mode. To run the server from /etc/inittab,
add an entry similar to the following, substituting the proper id, run levels,
and full pathnames:<br>
<tt>w1:23:respawn:/usr/local/as3/bin/nsd -it /usr/local/as3/nsd.tcl -u user
-g group</tt><br>
To restart a server you can simply kill the current server with the -K flag
as with the background mode; init will then restart the server for you.
To stop a server running in inittab mode you must comment out or remove
the entry from the /etc/inittab file and signal the init process to re-read
inittab with the "<tt>init q</tt>" command.<br>
<br>
<i>Note: While running AOLserver on some Unix platforms (e.g., Linux, SGI),
you'll notice multiple nsd processes. This is
normal and represents the
individual threads. The main process id can
be determined by checking
the log/nspid.server1 file or looking at the
last few entries of the server
log, each of which will include the
process id and thread id in the form
[pid.tid]. You can also telnet to the control port and type "ns_info pid".</i><br>
<br>
For more detailed configuration information refer to the online
documentation
at <a href="http://aolserver.com/">http://aolserver.com</a>. Enjoy! <br>
</body>
</html>
|