1\input texinfo @c -*-texinfo-*- 2@c %** start of header 3@setfilename ebnetd.info 4@settitle EBNETD/ebHTTPD/NDTPD 5@c %** end of header 6 7@include version.texi 8 9@dircategory CD-ROM Book Utilities 10@direntry 11* EBNETD: (ebnetd). Servers for accessing CD-ROM books via TCP/IP 12@end direntry 13 14@ifinfo 15EBNETD/NDTPD/ebHTTPD: CD-ROM Book Servers, by Motoyuki Kasahara. 16 17Copyright @copyright{} 1997, 98, 99, 2000, 01, 03 Motoyuki Kasahara 18 19Permission is granted to make and distribute verbatim copies of 20this manual provided the copyright notice and this permission notice 21are preserved on all copies. 22 23@ignore 24Permission is granted to process this file through TeX and print the 25results, provided the printed document carries copying permission 26notice identical to this one except for the removal of this paragraph 27(this paragraph not being relevant to the printed manual). 28 29@end ignore 30Permission is granted to copy and distribute modified versions of this 31manual under the conditions for verbatim copying, provided that the entire 32resulting derived work is distributed under the terms of a permission 33notice identical to this one. 34 35Permission is granted to copy and distribute translations of this manual 36into another language, under the above conditions for modified versions, 37except that this permission notice may be stated in a translation approved 38by Free Software Foundation, Inc. 39@end ifinfo 40 41@titlepage 42@title EBNETD/NDTPD/ebHTTPD 43@subtitle CD-ROM Book Servers. 44@subtitle Edition @value{EDITION} for EBNETD version @value{VERSION} 45@subtitle @value{UPDATED} 46@author by Motoyuki Kasahara 47 48@page 49@vskip 0pt plus 1filll 50Copyright @copyright{} 1997, 98, 99, 2000, 01, 03 Motoyuki Kasahara 51 52Permission is granted to make and distribute verbatim copies of 53this manual provided the copyright notice and this permission notice 54are preserved on all copies. 55 56Permission is granted to copy and distribute modified versions of this 57manual under the conditions for verbatim copying, provided that the entire 58resulting derived work is distributed under the terms of a permission 59notice identical to this one. 60 61Permission is granted to copy and distribute translations of this manual 62into another language, under the above conditions for modified versions, 63except that this permission notice may be stated in a translation approved 64by Free Software Foundation, Inc. 65@end titlepage 66 67@node Top, Introduction, (dir), (dir) 68@ifinfo 69This is edition @value{EDITION}, for EBNETD version @value{VERSION}. 70@end ifinfo 71 72@menu 73* Introduction:: Introduction. 74* Installation:: Installation of NDTPD. 75* Configuration File:: How to write a configuration file. 76* Configuration Checker:: How to check a configuration file. 77* Setup Your Environment:: Setup your environment. 78* Start ebnetd:: Start @code{ebnetd}. 79* Start ndtpd:: Start @code{ndtpd}. 80* Start ebhttpd:: Start @code{ebhttpd}. 81* Terminate and Restart:: How to terminate and restart @code{ebnetd}. 82* Daily Works:: Daily administrative works. 83* Network License:: Network License. 84 85@detailmenu 86 --- The Detailed Node Listing --- 87 88Installation of EBNETD 89 90* Basic Installation:: Basic installation. 91* Compilers and Options:: Choose compilers and its options. 92* Multiple Architectures:: Compile EBNETD on multiple Architectures. 93* Installation Names:: Change installation Names. 94* Optional Features:: Selecting optional features. 95* System Type:: Specifying the system type. 96* Sharing Defaults:: Set default values for @code{configure} 97 scripts to share. 98* Operation Controls:: Control @code{configure} operation. 99* Optional Feature List:: Optional features this package supports. 100 101Configuration File 102 103* Single Directive:: Common form of single directive. 104* Single Directive List:: Single directive list. 105* Group Directive:: Common form of group directive. 106* Book Group Directive:: Book group directive list. 107* Sample Configuration:: Sample configuration file. 108 109Configuration Checker 110 111* Invoking ebncheck:: Invoking @code{ebncheck}. 112* ebncheck Options:: Summary of options to @code{ebncheck}. 113 114Setup Your Environment 115 116* Services:: Setup your @file{services} file. 117* Syslog:: Setup your @file{syslog.conf} file. 118* Working Directory:: Make a working directory. 119* Mount CD-ROM Books:: Mount your CD-ROM books. 120* Appendix Package:: Copy appendix package. 121 122Start @code{ebnetd} 123 124* ebnetd Standalone:: Run @code{ebnetd} as a standard daemon. 125* ebnetd Child of inetd:: Run @code{ebnetd} as a child of @code{inetd}. 126* ebnetd Child of xinetd:: Run @code{ebnetd} as a child of @code{xinetd}. 127* ebnetd Test with telnet:: Test @code{ebnetd} with @code{telnet}. 128* ebnetd Options:: Summary of options to @code{ebnetd}. 129 130Start @code{ndtpd} 131 132* ndtpd Standalone:: Run @code{ndtpd} as a standard daemon. 133* ndtpd Child of inetd:: Run @code{ndtpd} as a child of @code{inetd}. 134* ndtpd Child of xinetd:: Run @code{ndtpd} as a child of @code{xinetd}. 135* ndtpd Test with telnet:: Test @code{ndtpd} with @code{telnet}. 136* ndtpd Options:: Options to @code{ndtpd}. 137 138Start @code{ebhttpd} 139 140* ebhttpd Standalone:: Run @code{ebhttpd} as a standard daemon. 141* ebhttpd Child of inetd:: Run @code{ebhttpd} as a child of @code{inetd}. 142* ebhttpd Child of xinetd:: Run @code{ebhttpd} as a child of @code{xinetd}. 143* ebhttpd Test with telnet:: Test @code{ebhttpd} with @code{telnet}. 144* ebhttpd Options:: Options to @code{ebhttpd}. 145 146Terminate and Restart the Servers 147 148* Invoke Server Controler:: Invoke Server Control Commands 149* Server Controler Options:: Summary of Options to Server Control Commands 150 151Daily Administrative Works 152 153* ebndaily Options:: Summary of options to @code{ebndaily}. 154 155@end detailmenu 156@end menu 157 158@c =================================================================== 159@node Introduction, Installation, Top, Top 160@chapter Introduction 161 162This EBNETD distribution contains three server commands: @code{ebnetd}, 163@code{ndtpd} and @code{ebhttpd}. 164They are servers for accessing CD-ROM book on remote host via TCP/IP. 165They can run on UNIX derived systems. 166 167@table @code 168@item ebnetd 169@code{ebnetd} is a server of EBNET protocol which is designed to 170communicate with @dfn{EB Library}. 171 172EB Library is a C library for accessing CD-ROM book. 173Also @code{ndtpd} and @code{ebhttpd} use EB Library. 174Using @code{ebnetd}, EB Library applications can access CD-ROM books 175on a remote server. 176For more details about EB Library, see 177@url{http://www.sra.co.jp/m-kasahr/eb/}. 178 179@item ndtpd 180@code{ndtpd} is an NDTP (Network Dictionary Transfer Protocol) server. 181The first implementation of the NDTP server is @dfn{dserver}. 182@code{ndtpd} has upper compatibility with dserver-2.2. 183 184The web page 185@url{http://www.sra.co.jp/m-kasahr/ndtpd/related.html} 186lists NDTP clients which can talk with @code{ndtpd}. 187 188@item ebhttpd 189@code{ebhttpd} is a WWW (World Wide Web) server. 190It supprts HTTP/1.0 and HTTP/1.1 (Hypertext Transfer Protocol version 1911.0 and 1.1). 192@end table 193 194The servers support CD-ROM books of EB, EBG, EBXA, EBXA-C, S-EBXA and 195EPWING formats. 196CD-ROM books of those formats are popular in Japan. 197Since CD-ROM books themseves are stands on the ISO 9660 format, you can 198mount the discs by the same way as other ISO 9660 discs. 199The servers can run as a standalone daemons by default, but can also 200run as children of @code{inetd}. 201 202EBNETD is free software; you can redistribute it and/or modify 203it under the terms of the GNU General Public License as published by 204the Free Software Foundation; either version 2, or (at your option) 205any later version. 206 207EBNETD is distributed in the hope that it will be useful, 208but WITHOUT ANY WARRANTY; without even the implied warranty of 209MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 210GNU General Public License for more details. 211 212In addition, you must follow the licenses of your CD-ROM books. 213Though EBNETD is free software, your books may not be free. Don't 214open your books to unlicensed hosts nor users. 215 216In addition, you must follow the licenses of your CD-ROM books. 217EBNETD is free software, your books may not be free. 218Don't open your books to unlicensed hosts nor users. 219 220This edition corresponds to version @value{VERSION} of EBNETD. 221 222You can get the latest EBNETD from 223@url{ftp://ftp.sra.co.jp/pub/misc/eb/}. 224 225You can get information about EBNETD from 226@url{http://www.sra.co.jp/people/m-kasahr/ebnetd/}. 227 228Mail comments and bug reports to 229@email{m-kasahr@@sra.co.jp} in Japanese or English. 230 231@c =================================================================== 232@node Installation, Configuration File, Introduction, Top 233@chapter Installation of EBNETD 234 235Before installing EBNETD, you need to install EB Library 3.3 or later 236version. 237 238You can get the latest EB Library from 239@url{ftp://ftp.sra.co.jp/pub/misc/eb/}. 240 241You can get information about EB Library from 242@url{http://www.sra.co.jp/people/m-kasahr/eb/}. 243 244@menu 245* Basic Installation:: Basic installation. 246* Compilers and Options:: Choose compilers and its options. 247* Multiple Architectures:: Compile EBNETD on multiple Architectures. 248* Installation Names:: Change installation Names. 249* Optional Features:: Selecting optional features. 250* System Type:: Specifying the system type. 251* Sharing Defaults:: Set default values for @code{configure} 252 scripts to share. 253* Operation Controls:: Control @code{configure} operation. 254* Optional Feature List:: Optional features this package supports. 255@end menu 256 257@c ------------------------------------------------------------------- 258@node Basic Installation, Compilers and Options, Installation, Installation 259@section Basic Installation 260 261These are generic installation instructions. 262 263The @code{configure} shell script attempts to guess correct values for 264various system-dependent variables used during compilation. It uses 265those values to create a @file{Makefile} in each directory of the 266package. It may also create one or more @file{.h} files containing 267system-dependent definitions. Finally, it creates a shell script 268@file{config.status} that you can run in the future to recreate the 269current configuration, a file @file{config.cache} that saves the results 270of its tests to speed up reconfiguring, and a file @file{config.log} 271containing compiler output (useful mainly for debugging 272@code{configure}). 273 274If you need to do unusual things to compile the package, please try to 275figure out how @code{configure} could check whether to do them, and mail 276diffs or instructions to the address given in the @file{README} so they 277can be considered for the next release. If at some point 278@file{config.cache} contains results you don't want to keep, you may 279remove or edit it. 280 281The file @file{configure.in} is used to create @file{configure} by a 282program called @code{autoconf}. You only need @file{configure.in} if 283you want to change it or regenerate @file{configure} using a newer 284version of @code{autoconf}. 285 286@noindent 287The simplest way to compile this package is: 288 289@enumerate 290@item 291@code{cd} to the directory containing the package's source code and type 292@samp{./configure} to configure the package for your system. If you're 293using @code{csh} on an old version of System V, you might need to type 294@samp{sh ./configure} instead to prevent @code{csh} from trying to 295execute @code{configure} itself. 296 297Running @code{configure} takes awhile. While running, it prints some 298messages telling which features it is checking for. 299 300@item 301Type @samp{make} to compile the package. 302 303@item 304Optionally, type @samp{make check} to run any self-tests that come with 305the package. 306 307@item 308Type @samp{make install} to install the programs and any data files and 309documentation. 310 311@item 312You can remove the program binaries and object files from the source code 313directory by typing @samp{make clean}. To also remove the files that 314@code{configure} created (so you can compile the package for a different 315kind of computer), type @samp{make distclean}. There is also a 316@samp{make maintainer-clean} target, but that is intended mainly for the 317package's developers. If you use it, you may have to get all sorts of 318other programs in order to regenerate files that came with the distribution. 319@end enumerate 320 321@c ------------------------------------------------------------------- 322@node Compilers and Options, Multiple Architectures, Basic Installation, Installation 323@section Compilers and Options 324 325Some systems require unusual options for compilation or linking that 326the @code{configure} script does not know about. You can give 327@code{configure} initial values for variables by setting them in the 328environment. Using a Bourne-compatible shell, you can do that on the 329command line like this: 330@example 331CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure 332@end example 333 334@noindent 335Or on systems that have the @code{env} program, you can do it like this: 336@example 337env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 338@end example 339 340@c ------------------------------------------------------------------- 341@node Multiple Architectures, Installation Names, Compilers and Options, Installation 342@section Compiling For Multiple Architectures 343 344You can compile the package for more than one kind of computer at the 345same time, by placing the object files for each architecture in their 346own directory. To do this, you must use a version of @code{make} that 347supports the @code{VPATH} variable, such as GNU @code{make}. @code{cd} 348to the directory where you want the object files and executables to go 349and run the @code{configure} script. @code{configure} automatically 350checks for the source code in the directory that @code{configure} is in 351and in @file{..}. 352 353If you have to use a @code{make} that does not supports the @code{VPATH} 354variable, you have to compile the package for one architecture at a time 355in the source code directory. After you have installed the package for 356one architecture, use @samp{make distclean} before reconfiguring for 357another architecture. 358 359@c ------------------------------------------------------------------- 360@node Installation Names, Optional Features, Multiple Architectures, Installation 361@section Installation Names 362 363By default, @samp{make install} will install the package's files in 364@file{/usr/local/bin}, @file{/usr/local/man}, etc. You can specify an 365installation prefix other than @file{/usr/local} by giving 366@code{configure} the option @samp{--prefix=@var{path}}. 367 368You can specify separate installation prefixes for architecture-specific 369files and architecture-independent files. If you give @code{configure} 370the option @samp{--exec-prefix=@var{path}}, the package will use 371@var{path} as the prefix for installing programs and libraries. 372Documentation and other data files will still use the regular prefix. 373 374In addition, if you use an unusual directory layout you can give options 375like @samp{--bindir=@var{path}} to specify different values for 376particular kinds of files. Run @samp{configure --help} for a list of 377the directories you can set and what kinds of files go in them. 378 379If the package supports it, you can cause programs to be installed with 380an extra prefix or suffix on their names by giving @code{configure} the 381option @samp{--program-prefix=@var{PREFIX}} or 382@samp{--program-suffix=@var{SUFFIX}}. 383 384@c ------------------------------------------------------------------- 385@node Optional Features, System Type, Installation Names, Installation 386@section Optional Features 387 388Some packages pay attention to @samp{--enable-@var{feature}} options to 389@code{configure}, where @var{feature} indicates an optional part of the 390package. They may also pay attention to @samp{--with-@var{package}} 391options, where @var{package} is something like @samp{gnu-as} or @samp{x} 392(for the X Window System). The @file{README} should mention any 393@samp{--enable-} and @samp{--with-} options that the package recognizes. 394 395For packages that use the X Window System, @code{configure} can usually 396find the X include and library files automatically, but if it doesn't, 397you can use the @code{configure} options @samp{--x-includes=@var{dir}} 398and @samp{--x-libraries=@var{dir}} to specify their locations. 399 400@c ------------------------------------------------------------------- 401@node System Type, Sharing Defaults, Optional Features, Installation 402@section Specifying the System Type 403 404There may be some features @code{configure} can not figure out 405automatically, but needs to determine by the type of host the package 406will run on. Usually @code{configure} can figure that out, but if it 407prints a message saying it can not guess the host type, give it the 408@samp{--host=@var{type}} option. @var{type} can either be a short name 409for the system type, such as @samp{sun4}, or a canonical name with three 410fields: 411@example 412@var{cpu}-@var{company}-@var{system} 413@end example 414@noindent 415See the file @file{config.sub} for the possible values of each field. 416If @file{config.sub} isn't included in this package, then this package 417doesn't need to know the host type. 418 419If you are building compiler tools for cross-compiling, you can also use 420the @samp{--target=@var{type}} option to select the type of system 421they will produce code for and the @samp{--build=@var{type}} option 422to select the type of system on which you are compiling the package. 423 424@c ------------------------------------------------------------------- 425@node Sharing Defaults, Operation Controls, System Type, Installation 426@section Sharing Defaults 427 428If you want to set default values for @code{configure} scripts to share, 429you can create a site shell script called @file{config.site} that gives 430default values for variables like @code{CC}, @code{cache_file}, and 431@code{prefix}. @code{configure} looks for 432@file{@var{prefix}/share/config.site} if it exists, then 433@file{@var{prefix}/etc/config.site} if it exists. Or, you can set 434the @code{CONFIG_SITE} environment variable to the location of the site 435script. A warning: not all @code{configure} scripts look for a site script. 436 437@c ------------------------------------------------------------------- 438@node Operation Controls, Optional Feature List, Sharing Defaults, Installation 439@section Operation Controls 440 441@code{configure} recognizes the following options to control how it 442operates. 443 444@table @code 445@item --cache-file=@var{file} 446Use and save the results of the tests in @var{file} instead of 447@file{./config.cache}. Set @var{file} to @file{/dev/null} to disable 448caching, for debugging @code{configure}. 449 450@item --help 451Print a summary of the options to @code{configure}, and exit. 452 453@item --quiet 454@itemx --silent 455@itemx -q 456Do not print messages saying which checks are being made. 457 458@item --srcdir=@var{dir} 459Look for the package's source code in directory @var{dir}. Usually 460@code{configure} can determine that directory automatically. 461 462@item --version 463Print the version of Autoconf used to generate the @code{configure} 464script, and exit. 465@end table 466 467@c ------------------------------------------------------------------- 468@node Optional Feature List, , Operation Controls, Installation 469@section Optional Feature List 470 471@code{configure} in this package recognizes the following 472@samp{--enable-} and @samp{--with-} options. 473 474@table @code 475@item --with-logdir=@var{dir} 476Syslog files that @code{ebndaily} rotates by default are placed on 477@var{dir}. 478The default value is @samp{@var{localstatedir}/ebnetd/log}. 479 480@item --with-eb-conf=@var{file} 481Read EB Libfary configuration file in @var{file}. 482The default value is @samp{@var{sysconfdir}/eb.conf}. 483 484@item --with-gnu-ld 485Assume the C compiler uses GNU ld. 486The default value is @samp{no}. 487 488@item --enable-ipv6 489Support IPv6. 490The default value is @samp{yes} if the system supports IPv6. 491 492@end table 493 494@c =================================================================== 495@node Configuration File, Configuration Checker, Installation, Top 496@chapter Configuration File 497 498To start @code{ebnetd}, @code{ndtpd} or @code{ebhttpd}, you have to edit 499a configuration file. 500The server reads the file when it starts and restarts. 501The file determines various server behaviors. 502The configuration file is @file{/usr/local/etc/ebnetd.conf} by default, 503if EBNETD has been installed under @file{/usr/local}, and if a directory 504for read-only single-machine data (@code{sysconfdir}) has not been 505changed at the installation. 506It can be changed by the command line option @samp{--configuration-file} 507(or @samp{-c}) (@pxref{ebnetd Options}). 508 509In the configuration file, blank lines and lines whose first non-blank 510character is a hash (@samp{#}) are ignored. 511Any other lines must be @dfn{single directive} or @dfn{group directive}. 512The order of single and group directives is not matter. 513 514Each line including newline character must be 511 characters maximum. 515 516@menu 517* Single Directive:: Common form of single directive. 518* Single Directive List:: Single directive list. 519* Group Directive:: Common form of group directive. 520* Book Group Directive:: Book group directive list. 521* Sample Configuration:: Sample configuration file. 522@end menu 523 524@c ------------------------------------------------------------------- 525@node Single Directive, Single Directive List, Configuration File, Configuration File 526@section Common Form of Single Directive 527 528Single directive is a directive terminated in a line. 529The common form of a single directive is: 530 531@example 532@var{directive-name} @var{directive-value} 533@end example 534 535@noindent 536In the following example, @code{syslog-facility} is a directive name, 537and @file{local0} is a directive value. 538 539@example 540syslog-facility local0 541@end example 542 543@noindent 544Since directive names are case sensitive, you cannot type 545@samp{syslog-facility} instead of @samp{Syslog-Facility}. 546Spaces and tabs separate a directive name with a directive value. 547A sequence of spaces and tabs in the head of a directive name and in 548the tail of a line are ignored. 549 550@c ------------------------------------------------------------------- 551@node Single Directive List, Group Directive, Single Directive, Configuration File 552@section Single Directive List 553 554The following single directives are recognized. 555 556@table @code 557@item ebnet-port 558The @code{ebnet-port} directive specifies a port number which @code{ebnetd} 559binds. 560The value of the directive must be a service name on TCP (e.g. @samp{EBNET}) 561or a port number (e.g. @samp{22010}). 562The directive is ignored when @code{ebnetd} is invoked by @code{inetd}. 563The directive is optional, and cannot be defined more than once. 564The default value is @samp{EBNET}. 565 566@code{ndtpd} and @code{ebhttpd} always ignore the directive. 567 568@item ndtp-port 569The @code{ndtp-port} directive specifies a port number which @code{ndtpd} 570binds. 571The value of the directive must be a service name on TCP (e.g. @samp{NDTP}) 572or a port number (e.g. @samp{2010}). 573The directive is ignored when @code{ndtpd} is invoked by @code{inetd}. 574The directive is optional, and cannot be defined more than once. 575The default value is @samp{NDTP}. 576 577@code{ebnetd} and @code{ebhttpd} always ignore the directive. 578 579@item http-port 580The @code{http-port} directive specifies a port number which @code{ebhttpd} 581binds. 582The value of the directive must be a service name on TCP (e.g. @samp{HTTP}) 583or a port number (e.g. @samp{80}). 584The directive is ignored when @code{ebhttpd} is invoked by @code{inetd}. 585The directive is optional, and cannot be defined more than once. 586The default value is @samp{HTTP}. 587 588@code{ebnetd} and @code{ndtpd} always ignore the directive. 589 590@item user 591The @code{user} directive specifies an owner of server processes. 592The value of the directive must be an user name (e.g. @samp{nobody}) 593or an user ID (e.g. @samp{65535}). 594To change an owner to another user, you must start a server process 595with super user's privilege. 596If a server fails to change an owner, it gives up running. 597The directive is optional, and cannot be defined more than once. 598If the directive is not defined, owner is unchanged. 599 600We recommend you to create a dummy user account such as @samp{ebnetuser}, 601and use it for this directive. 602 603@item group 604The @code{group} directive specifies a group of server processes. 605The value of the directive must be an group name (e.g. @samp{nogroup}) 606or a group ID (e.g. @samp{65534}). 607The directive is optional, and cannot be defined more than once. 608If a server fails to change a group, it gives up running. 609If the directive is not defined, group ID is unchanged. 610 611We recommend you to create a dummy group account such as @samp{ebnetgrp}, 612and use it for this directive. 613 614@item max-clients 615The @code{max-clients} directive specifies how many clients can be 616connected to a server at the same time. 617The value of the directive must be an integer not less than zero. 618The directive is optional, and cannot be defined more than once. 619The default value is @samp{1}. 620If the value is set to @samp{0}, the limitation is disabled. 621 622@item hosts 623The @code{hosts} directive specifies which hosts can or cannot connect 624to the servers. 625The value of the directive must be a hostname, IP address or 626@var{address/netmask} pattern. 627 628In addition, you can insert a leading optional exclamation mark 629(@samp{!}) for each pattern. 630If the value of the directive starts with an exclamation mark, it means 631that hosts matched to the following IP address or hostsname are denied 632to connect to the servers. 633Otherwise, hosts matched to the value are permitted to connect to 634the servers. 635 636@sp 1 637@example 638@group 639# permit to connect from `host.xxx.yyy.jp'. 640hosts host.xxx.yyy.jp 641 642# permit to connect from `127.0.0.1'. 643hosts 127.0.0.1 644 645# deny to connect from `192.24.1.0/24. 646hosts !192.24.1.0/24 647@end group 648@end example 649 650@noindent 651In a hostname pattern, you can use asterisk (@samp{*}) and question 652mark (@samp{?}). 653An asterisk matches to any sequence of zero or more characters 654except for a leading exclamation mark. 655 656@sp 1 657@example 658@group 659# deny to connect hosts under the `xxx.yyy.jp' domain 660hosts !*.xxx.yyy.jp 661 662# permit to connect from any hosts. 663hosts * 664@end group 665@end example 666 667@noindent 668An question mark represents @dfn{unknown hostname}. 669 670@sp 1 671@example 672@group 673# deny to connect from hosts with unknown hostname. 674hosts !? 675@end group 676@end example 677 678@noindent 679The @code{host} directive is optional, and can be defined any number of 680times. 681A configuration file without @code{host} directive is valid, but nobody 682can connect to the servers! 683Please note that only one hostname, IP address or @var{address/netmask} 684pattern can be defined in a directive. 685Hosts not matched to any @code{hosts} directives are denied to connect. 686When a host matches to two or more @code{hosts} directives, nearest one 687to the top of the configuration file is chosen. 688 689In the following example, hosts under the @samp{sub1.xxx.yyy.jp} domain 690are denied to connect, but any other hosts under the @samp{xxx.yyy.jp} 691domain are permitted to connect to the servers. 692 693@sp 1 694@example 695@group 696hosts !*.sub1.xxx.yyy.jp 697hosts *.xxx.yyy.jp 698@end group 699@end example 700 701In this example, the order of the directives are significant. 702If the order is reversed, all hosts under the @samp{xxx.yyy.jp} domain 703including @samp{sub1.xxx.yyy.jp} are permitted to connect to the servers. 704 705@sp 1 706@example 707@group 708# wrong!!! 709hosts *.xxx.yyy.jp 710hosts !*.sub1.xxx.yyy.jp 711@end group 712@end example 713 714In comprison of hostnames, @code{ndptd} always uses canonical hostname 715of a client, which is gotten by an address of the client with name 716resolution service such as DNS. 717Please note that aliases of the client is never used. 718 719Specifying IPv6 address and @var{IPv6 address/netmask} pattern are also 720permitted. 721The servers built without IPv6 support can talk to IPv4 clients only, 722but they can interpret IPv6 addresses specified in a configuration file. 723 724@sp 1 725@example 726@group 727# permit to connect from `12ab:0:0:cd3::/60' and `::1'. 728hosts ::1 729hosts 12ab:0:0:cd3::/60 730@end group 731@end example 732 733@noindent 734In the @code{hosts} directive, IPv4 address (e.g. @samp{192.168.1.1}) 735and the corresponding IPv4 mapped IPv6 address 736(e.g. @samp{::ffff:192.168.1.1}) are eqeivalent. 737That is to say that IPv4 client @samp{192.168.1.1} matches to 738@code{hosts} directive @samp{::ffff:192.168.1.1}, and IPv6 client 739@samp{::ffff:192.168.1.1} matches to @code{hosts} directive 740@samp{192.168.1.1}. 741 742@item timeout 743The @code{timeout} directive specifies timeout seconds until a server 744disconnects an idle connection. 745The value of the directive must be an integer not less than zero. 746The directive is optional, and cannot be defined more than once. 747The default value is @samp{900} (15 minutes). 748If the value is set to @samp{0}, timeout never occurs. 749 750@item work-path 751The @code{work-path} directive specifies the path of a working directory 752for @code{ebnetd} (@pxref{Working Directory}). 753The value of the directive must be an absolute path. 754@code{ebnetd} creates some work files under the directory, and a core 755file is dumped at there when @code{ebnetd} aborts. 756The directive is optional, and cannot be defined more than once. 757The default value is @file{/usr/local/var/ebnetd}, if EBNETD has installed 758under @file{/usr/local}, and if a directory for modifiable single-machine 759data (@code{localstatedir}) has not been changed at the installation. 760 761@item max-hits 762The @code{max-hits} directive specifies how many hit entries 763@code{ebnetd} tries to find at a search. 764When @code{ebnetd} has find the number of hit entries specified by the 765directive, @code{ebnetd} stops searching immediately. 766The directive is optional, and cannot be defined more than once. 767The default value is @samp{50}. 768If it is set to @samp{0}, @code{ebnetd} tries to find all hit entires in 769a subbook. 770 771@code{ebnetd} always ignores the directive. 772 773@item max-text-size 774The @code{max-text-size} directive restricts the maximum bytes of text 775which @code{ebnetd} sends to a client as a response to him. 776The directive is optional, and cannot be defined more than once. 777The default value is @samp{32768}. 778If it is set to @samp{0}, the size restriction is disabled. 779 780@code{ebnetd} always ignores the directive. 781 782@item syslog-facility 783The @code{syslog-facility} directive specifies a syslog facility (e.g. 784@samp{daemon}, @samp{local0}, and so on). 785The directive is optional, and cannot be defined more than once. 786The facility @samp{daemon} is used by default. 787Please note that syslog facility @samp{daemon} is used until @code{ebnetd} 788finish reading a configuration file. 789@end table 790 791@c ------------------------------------------------------------------- 792@node Group Directive, Book Group Directive, Single Directive List, Configuration File 793@section Group Directive 794 795Group directive is a directive whose description is across some lines 796in a configuration file. 797The common form of a group directive is: 798 799@example 800@group 801begin @var{group-name} 802 @var{sub-directive-name} @var{sub-directive-value} 803 : 804 : (repeated) 805 : 806end 807@end group 808@end example 809 810@noindent 811The keyword @code{begin} indicates the beginning of the group directive. 812It leads an argument @var{group-name}. 813They are separated by spaces or tabs, and they must be placed in 814a line. 815The keyword @code{end} indicates the end of the group directive. 816It is solely placed at a line. 817 818In EBNETD version @value{VERSION}, only @code{book} can be prescribed 819as the group-name. 820Each @dfn{sub-directive} in the group is defined between @code{begin} 821and @code{end} lines. 822Generic description rules about sub-directive are the same as those 823of single directives; @var{sub-directive-name} and 824@var{sub-directive-value} are separated by space or tabs, and so on. 825 826This is an example of the @code{book} group directive. 827 828@example 829@group 830begin book 831 name EJDICT 832 title English Japanese Dictionary 833 path /mnt/cdrom 834 hosts 127.0.0.1 835 hosts host.your.domain 836end 837@end group 838@end example 839 840@c ------------------------------------------------------------------- 841@node Book Group Directive, Sample Configuration, Group Directive, Configuration File 842@section @code{book} Group directive 843 844A @code{book} group directive corresponds to a CD-ROM book, so that 845you have to define the group directive for each CD-ROM book. 846EBNETD recognizes following sub-directives in the @code{book} group 847directives. 848 849@table @code 850@item name 851The @code{name} sub-directive specifies a name of the book. 852The value of the sub-directive must consist of lower letters 853(@samp{a}..@samp{z}), digits (@samp{0}..@samp{9}), underscore (@samp{_}) 854and hypen (@samp{-}). 855Its length must be up to 14 bytes. 856Since the name is used to identify the book, each book name in a 857configuration file must be unique. 858The sub-directive is required in each @code{book} group directive, but 859cannot be defined more than once in a group directive. 860 861@item title 862The @code{title} sub-directive specifies a title of the book. 863The value of the sub-directive can be a sequences of any characters 864except for newline and NULL (@samp{\0}) character. 865Its length must be up to 80 bytes. 866The title must be written in ISO 8859 1 or Japanese EUC (Extended Unix 867Code). 868Spaces or tabs are also accepted and they are taken literally. 869 870The sub-directive is required in each @code{book} group directive, but 871cannot be defined more than once in a group directive. 872 873@item path 874The @code{path} sub-directive specifies an absolute path to the book. 875The path must point to the top directory of the book where the file 876@file{catalog} or @file{catalogs} resides. 877EBNET remote access identifier (e.g. @samp{ebnet://host/book}) is 878not allowed. 879 880The sub-directive is required in each @code{book} group directive, but 881cannot be defined more than once in a group directive. 882 883@item appendix-path 884The @code{appendix-path} sub-directive specifies an absolute path to 885the appendix data of the book (@pxref{Appendix Package}). 886The path must point to the top directory of the appendix package where 887the file @file{catalog} or @file{catalogs} resides. 888EBNET remote access identifier (e.g. @samp{ebnet://host/book.app}) is 889not allowed. 890 891The sub-directive is optional and cannot be defined more than once 892in a @code{book} group directive. 893To use a book, appendix package is not required, but a book without 894appendix package may be difficult for users to read since some characters 895are unreadable. 896 897@item max-clients 898The @code{max-clients} sub-directive specifies how many clients can be 899accessed to the book at the same time. 900The value of the directive must be an integer not less than zero. 901The directive is optional, and cannot be defined more than once 902in a @code{book} group directive. 903The default value is @samp{1}. 904If the value is set to @samp{0}, the limitation is disabled. 905 906Count of clients are shared by @code{ebnetd}, @code{ndtpd} and 907@code{ebhttpd}, if they use the same @code{work-path} 908(@pxref{Working Directory}). 909For example, if two @code{ebnetd} clients and three @code{ndtpd} clients 910access a book at the same time, the servers cosider the book is accessed 911by five clients. 912 913@item hosts 914The @code{hosts} sub-directive specifies which hosts can or cannot 915access the book. 916The sub-directive is optional, and can be defined any number of times. 917A @code{book} group directive without @code{hosts} sub-directive is 918valid, but nobody can access to the book! 919 920The notation is same as the @code{hosts} single directive. 921@end table 922 923@c -------------------------------------------------------------------- 924@node Sample Configuration, , Book Group Directive, Configuration File 925@section Sample Configuration File 926 927The sample configuration file has been installed as 928@file{/usr/local/etc/ebnetd.conf.sample}, if EBNETD has been installed 929under @file{/usr/local}, and if a directory for read-only single-machine 930data (@code{sysconfdir}) has not been changed at the installation. 931 932@example 933###################################################################### 934# Configuration file for ebnetd/ndtpd/ebhttpd. 935# (Copy this file to `ebnetd.conf', and edit it.) 936###################################################################### 937 938### Port number `ebnetd' binds. 939### (default: ebnet) 940# ebnet-port ebnet 941 942### Port number `ndtpd' binds. 943### (default: ndtp) 944# ndtp-port ndtp 945 946### Port number `ebhttpd' binds. 947### (default: http) 948# http-port http 949 950### Owner of the server process. 951### (default: none) 952user ebnetuser 953 954### Group of the server process. 955### (default: none) 956group ebnetgrp 957 958### How many clients can be connected to the server at the same time. 959### (default: 1) 960# max-clients 1 961 962### Which hosts can or cannot connect to the server. 963### (default: none) 964hosts 127.0.0.1 965hosts ::1 966hosts !? 967hosts host.your.domain 968 969### Timeout seconds until the server disconnects an idle connection. 970### (default: 900) 971# timeout 900 972 973### Path to a working directory. 974### Please create the directory and make it be writable for the server 975### processes before executing the server. 976### (default: /usr/local/var/ebnetd) 977# work-path /usr/local/var/ebnetd 978 979### How many hit entries the server tries to find at a search. 980### (default: 50) 981# max-hits 50 982 983### Maxmimum size of tex the server may send to a client as a response 984### to him. 985### (default: 32768) 986# max-text-size 32768 987 988### Syslog facility 989### (default: daemon) 990syslog-facility local0 991 992### 993### Book entry 994### 995begin book 996 ### Name of the book. 997 ### (required) 998 name JITENBAN97 999 1000 ### Title of the book. 1001 ### (required) 1002 title Jitenban 97 1003 1004 ### Path to a top directory of the book. 1005 ### (required) 1006 path /cdrom 1007 1008 ### Path to a top directory of the appdendix package of the book. 1009 ### (default: none) 1010 appendix-path /usr/local/share/eb/appendix/jitenban97-2.1 1011 1012 ### How many clients can access the book at the same time. 1013 ### (default: 1) 1014 # max-clients 1 1015 1016 ### Which hosts can or cannot access to the book. 1017 ### (default: none) 1018 hosts 127.0.0.1 1019 hosts ::1 1020 hosts !? 1021 hosts host.your.domain 1022end 1023 1024### Add a book group directive (lines between `begin book' and `end'), 1025### if you want to read another CD-ROM book. A book group directive 1026### is required for each book. 1027@end example 1028 1029@c =================================================================== 1030@node Configuration Checker, Setup Your Environment, Configuration File, Top 1031@chapter Configuration Checker 1032 1033To check for the configuration file you have edit, 1034you can use the configuration checker named @code{ebncheck}. 1035The @code{ebncheck} command has been installed at @file{/usr/local/sbin}, 1036if EBNETD has been installed under @file{/usr/local}, and if a directory 1037for system administrative executables (@code{sbindir}) has not been 1038changed at the installation. 1039 1040Because of historical reason, also @code{ndtpcheck} and @code{ebhtcheck} 1041commands are available for @code{ndtpd} and @code{ebhttpd}, but they has 1042no differences. 1043 1044@menu 1045* Invoking ebncheck:: Invoking @code{ebncheck}. 1046* ebncheck Options:: Summary of options to @code{ebncheck}. 1047@end menu 1048 1049@c ------------------------------------------------------------------- 1050@node Invoking ebncheck, ebncheck Options, Configuration Checker, Configuration Checker 1051@section Invoking @code{ebncheck} 1052 1053The @code{ebncheck} command reads and checks a configuration file 1054as the same way as @code{ebnetd} does. 1055The usual way to execute @code{ebncheck} is as follows: 1056 1057@example 1058% /usr/local/sbin/ebncheck 1059@end example 1060 1061@noindent 1062It assumes that EBNETD has been installed under @file{/usr/local} and 1063if a directory for system administrative executables (@code{sbindir}) 1064has not been changed at the installation. 1065 1066If an error occurs, @code{ebncheck} outputs messages to standard error 1067like as follows. 1068 1069@example 1070/usr/local/etc/ebnetd.conf:12: unknown user: noboy 1071configuration failure 1072@end example 1073 1074@c ------------------------------------------------------------------- 1075@node ebncheck Options, , Invoking ebncheck, Configuration Checker 1076@section Summary of options to @code{ebncheck} 1077 1078The @code{ebncheck} command supports both traditional single-letter 1079options and mnemonic long option names. 1080Long option names are indicated with @samp{--} instead of @samp{-}. 1081Abbreviations for option names are allowed as long as they are unique. 1082 1083The @code{ebncheck} command recognizes these command line options. 1084 1085@table @code 1086@item -c @var{file} 1087@itemx --configuration-file @var{file} 1088Specify a configuration file. 1089The default filename is shown in the help message. 1090 1091@item -d 1092@itemx --debug 1093@itemx --verbose 1094Print debugging information to standard error. 1095Debugging information shows how each line in a configuration file 1096is processed. 1097 1098@item -h 1099@itemx --help 1100Output help message to standard error, then exit. 1101 1102@item -v 1103@itemx --version 1104Output version number to standard error, then exit. 1105@end table 1106 1107@c =================================================================== 1108@node Setup Your Environment, Start ebnetd, Configuration Checker, Top 1109@chapter Setup Your Environment 1110 1111You may have to setup system environment around the server. 1112Super user's priviledge may be required to do it. 1113 1114@menu 1115* Services:: Setup your @file{services} file. 1116* Syslog:: Setup your @file{syslog.conf} file. 1117* Working Directory:: Make a working directory. 1118* Mount CD-ROM Books:: Mount your CD-ROM books. 1119* Appendix Package:: Copy appendix package. 1120@end menu 1121 1122@c ------------------------------------------------------------------- 1123@node Services, Syslog, Setup Your Environment, Setup Your Environment 1124@section @file{services} File 1125 1126The service names @samp{ebnet}, @samp{ndtp} and @samp{http} must be 1127added to your @file{services} file (usually, @file{/etc/services}), 1128if missing. 1129If your host runs as NIS client, you have to edit the NIS map on the 1130NIS server, instead. 1131 1132This lines shuold be added, if missing: 1133 1134@example 1135http 80/tcp 1136ndtp 2010/tcp 1137ebnet 22010/tcp 1138@end example 1139 1140@noindent 1141The configuration file on your system may have had the line with 1142a different service name, like that: 1143 1144@example 1145search 2010/tcp 1146@end example 1147 1148@noindent 1149In this case, please add the service name as an alias: 1150 1151@example 1152search 2010/tcp ebnet 1153@end example 1154 1155@noindent 1156(For details, please read the manual for your system.) 1157 1158@c ------------------------------------------------------------------- 1159@node Syslog, Working Directory, Services, Setup Your Environment 1160@section @file{syslog.conf} File 1161 1162@code{ebnetd}, @code{ndtpd} and @code{ebhttpd} use @code{syslog} to 1163record their log messages. 1164Insert a line like as below into the configuration file for @code{syslogd} 1165(usually @file{/etc/syslog.conf}). 1166Care must be taken not to use space to separete fields, because only 1167TAB is allowed in general. 1168 1169@example 1170local0.info /usr/local/var/ebnetd/log/ebnetd.log 1171@end example 1172 1173@noindent 1174Please remember that the syslog facility of the servers can be 1175determined at the @code{syslog-facility} directive in the configuration 1176file for @code{ebnetd} 1177(@pxref{Single Directive List, , @code{syslog-facility}}). 1178 1179@noindent 1180Create an empty log file if missing. 1181 1182@example 1183@group 1184% touch /usr/local/var/ebnetd/log/ebnetd.log 1185% chmod 644 /usr/local/var/ebnetd/log/ebnetd.log 1186@end group 1187@end example 1188 1189@noindent 1190Find the PID of the running @code{syslogd} process. 1191In BSD based sytems, type the following. 1192 1193@example 1194% ps axuww | grep syslogd 1195@end example 1196 1197@noindent 1198In SYSV based sytems, type the following. 1199 1200@example 1201% ps -ef | grep syslogd 1202@end example 1203 1204@noindent 1205(For details, please read the manual for your system.) 1206@* 1207If @code{syslogd} is running, you can find a line like as below. 1208 1209@example 1210root 63 0.0 1.1 188 316 ?? Is 10:04PM 0:00.16 syslogd 1211@end example 1212 1213@noindent 1214Send a hung-up signal (@code{SIGHUP}) to @code{syslogd}, and then 1215@code{syslogd} re-reads @file{syslog.conf}. 1216 1217@example 1218% kill -HUP 63 1219@end example 1220 1221@noindent 1222If your system has the @code{logger} command, you can send a test 1223message to @code{syslogd} like as follows: 1224 1225@example 1226% logger -p local0.info "test message" 1227@end example 1228 1229@c ------------------------------------------------------------------- 1230@node Working Directory, Mount CD-ROM Books, Syslog, Setup Your Environment 1231@section Working Directory 1232 1233@code{ebnetd}, @code{ndtpd} and @code{ebhttpd} create some files under 1234a working directory. 1235The directory can be specified by @code{work-path} in the configuration 1236file (@pxref{Single Directive List, , @code{work-path}}). 1237 1238Please create the directory and make it be writable for the server 1239processes and super user only. 1240 1241@example 1242# mkdir /usr/local/var/ebnetd 1243# chown ebnetuser /usr/local/var/ebnetd 1244# chmod 755 /usr/local/var/ebnetd 1245@end example 1246 1247@noindent 1248It assumes that owner of server processes on your system is 1249@samp{ebnetuser}. 1250 1251Please remember that owner and group of the server processes are 1252defined at the @code{user} and @code{group} directives in the 1253configuration file (@pxref{Single Directive List, , @code{user}}, and 1254@pxref{Single Directive List, , @code{group}}). 1255 1256@c ------------------------------------------------------------------- 1257@node Mount CD-ROM Books, Appendix Package, Working Directory, Setup Your Environment 1258@section Mount Your CD-ROM Books 1259 1260As mentioned before, CD-ROM books themseves are stands on ISO 9660 format. 1261You can mount your CD-ROM books by the same way as other ISO 9660 discs. 1262Please read the manual for your system, if you don't know the way of 1263mounting ISO 9660 discs on your system. 1264 1265The servers can access CD-ROM books compressed by @code{ebzip}. 1266See @xref{Compression, , Compression, ebzip, ebzip}, for more details. 1267 1268@c ------------------------------------------------------------------- 1269@node Appendix Package, , Mount CD-ROM Books, Setup Your Environment 1270@section Setup Appendix Package 1271 1272@dfn{appendix} is supplementary data for CD-ROM book. 1273It is not provided by publishers of CD-ROM Book. 1274It is peculiar to EB Library. 1275 1276(Remember that all the servers in the EBNET distribution are related 1277closely to EB Library. 1278@code{ebnetd} is remote access server for EB Library. 1279@code{ndtpd} and @code{ebhttpd} use EB Library to access CD-ROM Books.) 1280 1281Appendix provides the following data for CD-ROM book: 1282 1283@table @asis 1284@item Text stop code 1285When you look up a word in a CD-ROM dictionary using EB Library, 1286you might wish EB Library stops displaying dictionary's text at the 1287point where explanation of the word ends. 1288Howerver, the software cannot ensure it, since CD-ROM book has no marker 1289in its text which indicates end of paragraph. 1290 1291Fortunately, many CD-ROM books have a @dfn{text stop code} which 1292could be used for substitute for end of paragraph. 1293EB Library guesses text stop code automatically by default, but sometimes 1294takes a false code. 1295Appanedix's stop code is used to tell EB Library a correct stop code of 1296the CD-ROM book. 1297 1298@item Alternation text for local defined characters 1299Many CD-ROM books define their local characters, and use them in text. 1300To display the local character, client applications have to draw its 1301bitmap font provided by the CD-ROM book. 1302 1303Appendix can define alternation text for each local defined character. 1304Instead of drawing the bitmap font, application may output the alternation 1305text. 1306@end table 1307 1308The layout of appendix package is similar to that of CD-ROM book. 1309It has the @code{catalog} or @code{catalogs} file at its top 1310directory, and data for each subbook are arranged in the corresponding 1311sub-directory. 1312To use an appendix, set the @code{appendix-path} sub-directive of the 1313@code{book} group directive in a configuration file 1314(@pxref{Group Directive, , @code{appendix-path}}). 1315 1316There are some appendix packages in the EB Library official FTP site 1317(@url{ftp://ftp.sra.co.jp/pub/misc/eb/appendix/}). 1318If you want to create an appendx package for a CD-ROM book not listed here, 1319use the @code{ebappendix} command to format appendix data files. 1320 1321@c =================================================================== 1322@node Start ebnetd, Start ndtpd, Setup Your Environment, Top 1323@chapter Start @code{ebnetd} 1324 1325@code{ebnetd} can run as a standalone daemon, or as a child process of 1326@code{inted}. 1327By default, @code{ebnetd} runs as a standalone daemon. 1328 1329If connections aren't come frequently to the server, it may be better 1330to run @code{ebnetd} as a child of @code{inetd} to save consumption 1331of memory resource. 1332However, each time invoked by @code{inetd}, @code{ebnetd} reads a 1333configuration file and reads some data from CD-ROM books for initialization. 1334If connections are come frequently to the server, it may be better 1335to run @code{ebnetd} as a standalone daemon. 1336 1337If you don't have to run @code{ebnetd} on your system, skip rest of 1338this chapter. 1339 1340@menu 1341* ebnetd Standalone:: Run @code{ebnetd} as a standard daemon. 1342* ebnetd Child of inetd:: Run @code{ebnetd} as a child of @code{inetd}. 1343* ebnetd Child of xinetd:: Run @code{ebnetd} as a child of @code{xinetd}. 1344* ebnetd Test with telnet:: Test @code{ebnetd} with @code{telnet}. 1345* ebnetd Options:: Summary of options to @code{ebnetd}. 1346@end menu 1347 1348@c ------------------------------------------------------------------- 1349@node ebnetd Standalone, ebnetd Child of inetd, Start ebnetd, Start ebnetd 1350@section Run @code{ebnetd} as a standard daemon 1351 1352To start @code{ebnetd} as a standalone daemon, type the following command. 1353Super user's priviledge may be required. 1354 1355@example 1356% /usr/local/sbin/ebnetd 1357@end example 1358 1359@noindent 1360It assumes that EBNETD has been installed under @file{/usr/local}, and 1361if a directory for system administrative executables (@code{sbindir}) 1362has not been changed at the installation. 1363 1364@c ------------------------------------------------------------------- 1365@node ebnetd Child of inetd, ebnetd Child of xinetd, ebnetd Standalone, Start ebnetd 1366@section Run @code{ebnetd} as a child of @code{inetd}. 1367 1368To start @code{ebnetd} from @code{inetd}, following processes are needed. 1369Add the following entry to the @file{inetd.conf} file (usually 1370@file{/etc/inetd.conf}). 1371Don't forget to add the @samp{--inetd} (or @samp{-i}) option. 1372 1373@example 1374ebnet stream tcp nowait root /usr/local/sbin/ebnetd ebnetd --inetd 1375@end example 1376 1377@noindent 1378It assumes that EBNETD has been installed under @file{/usr/local} and 1379if a directory for system administrative executables (@code{sbindir}) 1380has not been changed at the installation. 1381 1382Find the PID of the running @code{inetd} process. 1383 1384@example 1385% ps axuww | grep inetd 1386@end example 1387 1388@noindent 1389(For details, please read the manual for your system.) 1390@* 1391If @code{inetd} is running, you can find a line like as below. 1392 1393@example 1394root 79 0.0 1.1 224 340 ?? Is 10:04PM 0:00.29 inetd 1395@end example 1396 1397@noindent 1398If found, send a hung-up signal (@code{SIGHUP}) to @code{inetd} to 1399re-read @file{inetd.conf}. 1400Super user's priviledge may be required. 1401 1402@example 1403% kill -HUP 79 1404@end example 1405 1406@c ------------------------------------------------------------------- 1407@node ebnetd Child of xinetd, ebnetd Test with telnet, ebnetd Child of inetd, Start ebnetd 1408@section Run @code{ebnetd} as a Child Proccess of @code{xinetd} 1409 1410Some Linux systems use @code{xinetd} instead of traditional @code{inetd}. 1411The configuration file format of @code{xinetd} is different from that 1412of traditional @code{inetd}. 1413 1414To start @code{ebnetd} from @code{xinetd}, following processes are needed. 1415Add the following entry to the configuration file (usually 1416@file{/etc/xinetd.d/ebnet}). 1417Don't forget to specify the @samp{--inetd} (or @samp{-i}) option as 1418@code{server_args}. 1419 1420@example 1421@group 1422# default: off 1423# description: The ebnet server 1424service ebnet 1425@{ 1426 disable = no 1427 socket_type = stream 1428 wait = no 1429 user = root 1430 server = /usr/local/sbin/ebnetd 1431 server_args = --inetd 1432 log_on_failure += USERID 1433@} 1434@end group 1435@end example 1436 1437@noindent 1438It assumes that EBNETD has been installed under @file{/usr/local} and 1439if a directory for system administrative executables (@code{sbindir}) 1440has not been changed at the installation. 1441 1442Find the PID of the running @code{xinetd} process. 1443In BSD based sytems, type the following. 1444 1445@example 1446% ps axuww | grep xinetd 1447@end example 1448 1449@noindent 1450In SYSV based sytems, type the following. 1451 1452@example 1453% ps -ef | grep xinetd 1454@end example 1455 1456@noindent 1457(For details, please read the manual for your system.) 1458@* 1459If @code{xinetd} is running, you can find a line like as below. 1460 1461@example 1462root 79 0.0 1.1 224 340 ?? Is 10:04PM 0:00.29 xinetd 1463@end example 1464 1465@noindent 1466If found, send an USER2 signal (@code{SIGUSR2}) to @code{xinetd} to 1467re-read the configuration. 1468Super user's priviledge may be required. 1469 1470@example 1471% kill -USR2 79 1472@end example 1473 1474@c ------------------------------------------------------------------- 1475@node ebnetd Test with telnet, ebnetd Options, ebnetd Child of xinetd, Start ebnetd 1476@section Test @code{ebnetd} with @code{telnet} 1477 1478When all the setup has been completed, try to connect to @code{ebnetd} 1479with the @code{telnet} command. 1480 1481At first, type as follows. 1482In this example, we try to connect to @code{ebnetd} on localhost. 1483 1484@example 1485% telnet localhost ebnet 1486@end example 1487 1488@noindent 1489The following message is displayed if @code{ebnetd} accepts a 1490connection. 1491 1492@example 1493Connected to localhost. 1494Escape character is '^]'. 1495@end example 1496 1497@noindent 1498Then, tpye @key{BOOKLIST} and @key{Enter}. 1499 1500@example 1501BOOKLIST 1502@end example 1503 1504@noindent 1505If @code{ebnetd} is running correctly, it outputs a list of CD-ROM book 1506names like this: 1507 1508@example 1509!OK; book list follows 1510chujiten 1511kojien 1512colloc 1513colloc.app 1514@end example 1515 1516@noindent 1517To close the connection, type @key{QUIT} and @key{Enter}. 1518 1519@example 1520QUIT 1521Connection closed by foreign host. 1522@end example 1523 1524@c ------------------------------------------------------------------- 1525@node ebnetd Options, , ebnetd Test with telnet, Start ebnetd 1526@section Summary of options to @code{ebnetd} 1527 1528@code{ebnetd} supports both traditional single-letter 1529options and mnemonic long option names. 1530Long option names are indicated with @samp{--} instead of @samp{-}. 1531Abbreviations for option names are allowed as long as they are unique. 1532 1533@code{ebnetd} recognizes following command line options. 1534 1535@table @code 1536@item -c @var{file} 1537@itemx --configuration-file @var{file} 1538Specify a configuration file read by @code{ebnetd}. 1539The default filename is shown in the help message. 1540 1541@item -h 1542@itemx --help 1543Output help message to standard error, then exit. 1544 1545@item -i 1546@itemx --inetd 1547@code{inetd} mode. 1548It must be specified when @code{ebnetd} is invoked by @code{inetd}. 1549 1550@item -t 1551@itemx --test 1552Test mode. 1553The @code{ebnetd} process runs in foreground, and never forks. 1554Requests to the server are input from standard in and responses to 1555a client are output to srandard out. 1556Standard in and out can be file descriptors associated with terminals. 1557In addition, access permission is never checked, so that you can access 1558all CD-ROM books defined in a configuration file. 1559 1560@item -v 1561@itemx --version 1562Output version number to standard error, then exit. 1563@end table 1564 1565@c =================================================================== 1566@node Start ndtpd, Start ebhttpd, Start ebnetd, Top 1567@chapter Start @code{ndtpd} 1568 1569If you don't have to run @code{ndtpd} on your system, skip this chapter. 1570 1571Also @code{ndtpd} has two running mode, standalone daemon and child 1572process of @code{inted}. 1573By default, @code{ndtpd} runs as a standalone daemon. 1574 1575@menu 1576* ndtpd Standalone:: Run @code{ndtpd} as a standard daemon. 1577* ndtpd Child of inetd:: Run @code{ndtpd} as a child of @code{inetd}. 1578* ndtpd Child of xinetd:: Run @code{ndtpd} as a child of @code{xinetd}. 1579* ndtpd Test with telnet:: Test @code{ndtpd} with @code{telnet}. 1580* ndtpd Options:: Options to @code{ndtpd}. 1581@end menu 1582 1583@c ------------------------------------------------------------------- 1584@node ndtpd Standalone, ndtpd Child of inetd, Start ndtpd, Start ndtpd 1585@section Run @code{ndtpd} as a standard daemon 1586 1587To start @code{ndtpd} as a standalone daemon, type the following command. 1588Super user's priviledge may be required. 1589 1590@example 1591% /usr/local/sbin/ndtpd 1592@end example 1593 1594@noindent 1595It assumes that EBNETD has been installed under @file{/usr/local}, and 1596if a directory for system administrative executables (@code{sbindir}) 1597has not been changed at the installation. 1598 1599@c ------------------------------------------------------------------- 1600@node ndtpd Child of inetd, ndtpd Child of xinetd, ndtpd Standalone, Start ndtpd 1601@section Run @code{ndtpd} as a child of @code{inetd} 1602 1603To start @code{ndtpd} from @code{inetd}, following processes are needed. 1604Add the following entry to the @file{inetd.conf} file (usually 1605@file{/etc/inetd.conf}). 1606Don't forget to add the @samp{--inetd} (or @samp{-i}) option. 1607 1608@example 1609ndtp stream tcp nowait root /usr/local/sbin/ndtpd ndtpd --inetd 1610@end example 1611 1612@noindent 1613It assumes that EBNETD has been installed under @file{/usr/local} and 1614if a directory for system administrative executables (@code{sbindir}) 1615has not been changed at the installation. 1616 1617Find the PID of the running @code{inetd} process. 1618 1619@example 1620% ps axuww | grep inetd 1621@end example 1622 1623@noindent 1624(For details, please read the manual for your system.) 1625@* 1626If @code{inetd} is running, you can find a line like as below. 1627 1628@example 1629root 79 0.0 1.1 224 340 ?? Is 10:04PM 0:00.29 inetd 1630@end example 1631 1632@noindent 1633If found, send a hung-up signal (@code{SIGHUP}) to @code{inetd} to 1634re-read @file{inetd.conf}. 1635Super user's priviledge may be required. 1636 1637@example 1638% kill -HUP 79 1639@end example 1640 1641@c ------------------------------------------------------------------- 1642@node ndtpd Child of xinetd, ndtpd Test with telnet, ndtpd Child of inetd, Start ndtpd 1643@section Run @code{ndtpd} as a child of @code{xinetd} 1644 1645Some Linux systems use @code{xinetd} instead of traditional @code{inetd}. 1646The configuration file format of @code{xinetd} is different from that 1647of traditional @code{inetd}. 1648 1649To start @code{ndtpd} from @code{xinetd}, following processes are needed. 1650Add the following entry to the configuration file (usually 1651@file{/etc/xinetd.d/ndtp}). 1652Don't forget to specify the @samp{--inetd} (or @samp{-i}) option as 1653@code{server_args}. 1654 1655@example 1656@group 1657# default: off 1658# description: The ndtp server 1659service ndtp 1660@{ 1661 disable = no 1662 socket_type = stream 1663 wait = no 1664 user = root 1665 server = /usr/local/sbin/ndtpd 1666 server_args = --inetd 1667 log_on_failure += USERID 1668@} 1669@end group 1670@end example 1671 1672@noindent 1673It assumes that EBNETD has been installed under @file{/usr/local} and 1674if a directory for system administrative executables (@code{sbindir}) 1675has not been changed at the installation. 1676 1677Find the PID of the running @code{xinetd} process. 1678In BSD based sytems, type the following. 1679 1680@example 1681% ps axuww | grep xinetd 1682@end example 1683 1684@noindent 1685In SYSV based sytems, type the following. 1686 1687@example 1688% ps -ef | grep xinetd 1689@end example 1690 1691@noindent 1692(For details, please read the manual for your system.) 1693@* 1694If @code{xinetd} is running, you can find a line like as below. 1695 1696@example 1697root 79 0.0 1.1 224 340 ?? Is 10:04PM 0:00.29 xinetd 1698@end example 1699 1700@noindent 1701If found, send an USER2 signal (@code{SIGUSR2}) to @code{xinetd} to 1702re-read the configuration. 1703Super user's priviledge may be required. 1704 1705@example 1706% kill -USR2 79 1707@end example 1708 1709@c ------------------------------------------------------------------- 1710@node ndtpd Test with telnet, ndtpd Options, ndtpd Child of xinetd, Start ndtpd 1711@section Test @code{ndtpd} with @code{telnet} 1712 1713When all the setup has been completed, try to connect to @code{ndtpd} 1714with the @code{telnet} command. 1715 1716At first, type as follows. 1717In this example, we try to connect to @code{ndtpd} on localhost. 1718 1719@example 1720% telnet localhost ndtp 1721@end example 1722 1723@noindent 1724The following message is displayed if @code{ndtpd} accepts a 1725connection. 1726 1727@example 1728Connected to localhost. 1729Escape character is '^]'. 1730@end example 1731 1732@noindent 1733Then, tpye @key{t} and @key{Enter}. 1734If @code{ndtpd} is running correctly, it outputs a list of 1735available CD-ROM books like this: 1736 1737@example 1738t 17391 Oxford Dictionary/Thesaurus edict/oxford 0 0 0 17402 Quick Tour edict/quick 0 0 0 17413 User's Guide edict/user 0 0 0 17424 About This Disc edict/about 0 0 0 1743$* 1744@end example 1745 1746@noindent 1747To close the connection, type @key{Q} and @key{Enter}. 1748 1749@example 1750Q 1751Connection closed by foreign host. 1752@end example 1753 1754@c ------------------------------------------------------------------- 1755@node ndtpd Options, , ndtpd Test with telnet, Start ndtpd 1756@section Options to @code{ndtpd} 1757 1758The command line usage of @code{ndtpd} is the same as that of 1759@code{ebnetd}. 1760See @pxref{ebnetd Options, , Summary of @code{ebnetd} options}, 1761for more details. 1762 1763@c =================================================================== 1764@node Start ebhttpd, Terminate and Restart, Start ndtpd, Top 1765@chapter Start @code{ebhttpd} 1766 1767If you don't have to run @code{ebhttpd} on your system, skip this chapter. 1768 1769Also @code{ebhttpd} has two running mode, standalone daemon and child 1770process of @code{inted}. 1771By default, @code{ebhttpd} runs as a standalone daemon. 1772 1773@menu 1774* ebhttpd Standalone:: Run @code{ebhttpd} as a standard daemon. 1775* ebhttpd Child of inetd:: Run @code{ebhttpd} as a child of @code{inetd}. 1776* ebhttpd Child of xinetd:: Run @code{ebhttpd} as a child of @code{xinetd}. 1777* ebhttpd Test with telnet:: Test @code{ebhttpd} with @code{telnet}. 1778* ebhttpd Options:: Options to @code{ebhttpd}. 1779@end menu 1780 1781@c ------------------------------------------------------------------- 1782@node ebhttpd Standalone, ebhttpd Child of inetd, Start ebhttpd, Start ebhttpd 1783@section Run @code{ebhttpd} as a standard daemon 1784 1785To start @code{ebhttpd} as a standalone daemon, type the following command. 1786Super user's priviledge may be required. 1787 1788@example 1789% /usr/local/sbin/ebhttpd 1790@end example 1791 1792@noindent 1793It assumes that EBNETD has been installed under @file{/usr/local}, and 1794if a directory for system administrative executables (@code{sbindir}) 1795has not been changed at the installation. 1796 1797@c ------------------------------------------------------------------- 1798@node ebhttpd Child of inetd, ebhttpd Child of xinetd, ebhttpd Standalone, Start ebhttpd 1799@section Run @code{ebhttpd} as a child of @code{inetd} 1800 1801To start @code{ebhttpd} from @code{inetd}, following processes are needed. 1802Add the following entry to the @file{inetd.conf} file (usually 1803@file{/etc/inetd.conf}). 1804Don't forget to add the @samp{--inetd} (or @samp{-i}) option. 1805 1806@example 1807http stream tcp nowait root /usr/local/sbin/ebhttpd ebhttpd --inetd 1808@end example 1809 1810@noindent 1811It assumes that EBNETD has been installed under @file{/usr/local} and 1812if a directory for system administrative executables (@code{sbindir}) 1813has not been changed at the installation. 1814 1815Find the PID of the running @code{inetd} process. 1816 1817@example 1818% ps axuww | grep inetd 1819@end example 1820 1821@noindent 1822(For details, please read the manual for your system.) 1823@* 1824If @code{inetd} is running, you can find a line like as below. 1825 1826@example 1827root 79 0.0 1.1 224 340 ?? Is 10:04PM 0:00.29 inetd 1828@end example 1829 1830@noindent 1831If found, send a hung-up signal (@code{SIGHUP}) to @code{inetd} to 1832re-read @file{inetd.conf}. 1833Super user's priviledge may be required. 1834 1835@example 1836% kill -HUP 79 1837@end example 1838 1839@c ------------------------------------------------------------------- 1840@node ebhttpd Child of xinetd, ebhttpd Test with telnet, ebhttpd Child of inetd, Start ebhttpd 1841@section Run @code{ebhttpd} as a child of @code{xinetd} 1842 1843Some Linux systems use @code{xinetd} instead of traditional @code{inetd}. 1844The configuration file format of @code{xinetd} is different from that 1845of traditional @code{inetd}. 1846 1847To start @code{ebhttpd} from @code{xinetd}, following processes are needed. 1848Add the following entry to the configuration file (usually 1849@file{/etc/xinetd.d/ndtp}). 1850Don't forget to specify the @samp{--inetd} (or @samp{-i}) option as 1851@code{server_args}. 1852 1853@example 1854@group 1855# default: off 1856# description: The ndtp server 1857service http 1858@{ 1859 disable = no 1860 socket_type = stream 1861 wait = no 1862 user = root 1863 server = /usr/local/sbin/ebhttpd 1864 server_args = --inetd 1865 log_on_failure += USERID 1866@} 1867@end group 1868@end example 1869 1870@noindent 1871It assumes that EBNETD has been installed under @file{/usr/local} and 1872if a directory for system administrative executables (@code{sbindir}) 1873has not been changed at the installation. 1874 1875Find the PID of the running @code{xinetd} process. 1876In BSD based sytems, type the following. 1877 1878@example 1879% ps axuww | grep xinetd 1880@end example 1881 1882@noindent 1883In SYSV based sytems, type the following. 1884 1885@example 1886% ps -ef | grep xinetd 1887@end example 1888 1889@noindent 1890(For details, please read the manual for your system.) 1891@* 1892If @code{xinetd} is running, you can find a line like as below. 1893 1894@example 1895root 79 0.0 1.1 224 340 ?? Is 10:04PM 0:00.29 xinetd 1896@end example 1897 1898@noindent 1899If found, send an USER2 signal (@code{SIGUSR2}) to @code{xinetd} to 1900re-read the configuration. 1901Super user's priviledge may be required. 1902 1903@example 1904% kill -USR2 79 1905@end example 1906 1907@c ------------------------------------------------------------------- 1908@node ebhttpd Test with telnet, ebhttpd Options, ebhttpd Child of xinetd, Start ebhttpd 1909@section Test @code{ebhttpd} with @code{telnet} 1910 1911When all the setup has been completed, try to connect to @code{ebhttpd} 1912with the @code{telnet} command. 1913 1914At first, type as follows. 1915In this example, we try to connect to @code{ebhttpd} on localhost. 1916 1917@example 1918% telnet localhost http 1919@end example 1920 1921@noindent 1922The following message is displayed if @code{ebhttpd} accepts a 1923connection. 1924 1925@example 1926Connected to localhost. 1927Escape character is '^]'. 1928@end example 1929 1930@noindent 1931Then, tpye a request like: 1932 1933@example 1934GET / HTTP/1.0 1935 1936@end example 1937 1938@noindent 1939Note that the request consists of two lines and the second line is 1940empty. 1941 1942If @code{ebhttpd} accepts the request, the following response will 1943be shown. 1944 1945@example 1946HTTP/1.1 200 Ok 1947Date: Fri, 16 May 2003 13:11:12 GMT 1948Server: ebHTTPD 0.0 1949Content-Type: text/html; charset="euc-jp" 1950 1951<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> 1952<html> 1953<head> 1954 (snip) 1955@end example 1956 1957@c ------------------------------------------------------------------- 1958@node ebhttpd Options, , ebhttpd Test with telnet, Start ebhttpd 1959@section Options to @code{ebhttpd} 1960 1961The command line usage of @code{ebhttpd} is the same as that of 1962@code{ebnetd}. 1963See @xref{ndtpd Options, , Summary of @code{ebnetd} options}, 1964for more details. 1965 1966@c =================================================================== 1967@node Terminate and Restart, Daily Works, Start ebhttpd, Top 1968@chapter Terminate and Restart the Servers 1969 1970You can use the @code{ebncontrol} command to terminate, kill and 1971restart the @code{ebnetd} precess running as a standalone daemon. 1972@code{ebncontrol} has been installed at @file{/usr/local/sbin}, if 1973EBNETD has been installed under @file{/usr/local}, and if a directory 1974for system administrative executables (@code{sbindir}) has not been 1975changed at the installation. 1976You can terminate the running @code{ebnetd} process like as follows: 1977 1978@example 1979% /usr/local/sbin/ebncontrol terminate 1980@end example 1981 1982@code{ebnetd} logs its PID to the file @file{ebnetd.pid} at the working 1983directory (@pxref{Working Directory}). 1984@code{ebncontrol} reads contents of the PID file to get a PID of 1985the running @code{ebnetd} process, and then @code{ebncontrol} sends 1986a signal to the PID. 1987 1988The PID file is deleted by @code{ebnetd} when it is terminated normally. 1989However, the PID file is not deleted when @code{ebnetd} aborts. 1990The PID logged in the remained PID file will be assigned to another 1991process, in this case. 1992Be careful invoking @code{ebncontrol}. 1993@code{ebncontrol} doesn't examine whether the @code{ebnetd} process 1994really exists. 1995If the pid file is obsolete, @code{ebncontrol} may send a signal to 1996another process. 1997 1998@code{ebncontrol} reads the configuration file for @code{ebnetd} in 1999order to get a location of the working directory. 2000It can be defined at the @code{work-path} single directive in the 2001configuration file (@pxref{Single Directive List, , @code{work-path}}). 2002The default filename of the configuration file and default value 2003of the @code{work-path} single directive are the same as those of 2004@code{ebnetd}. 2005 2006Also the @code{ndtpcontrol} and @code{ebhtcontrol} commands are 2007available to terminate @code{ndtpd} and @code{ebhttpd}. 2008Command line usage of @code{ndtpcontrol} and @code{ebhtcontrol} are 2009the same as that of @code{ebncontrol}. 2010 2011@menu 2012* Invoke Server Controler:: Invoke Server Control Commands 2013* Server Controler Options:: Summary of Options to Server Control Commands 2014@end menu 2015 2016@c ------------------------------------------------------------------- 2017@node Invoke Server Controler, Server Controler Options, Terminate and Restart, Terminate and Restart 2018@section Invoke Server Control Commands 2019 2020As described before, @code{ebncontrol}, @code{ndtpcontrol} and 2021@code{ebhtcontrol} take the same command line arguments. 2022The usual ways to invoke the commands are as follows: 2023 2024@example 2025% /usr/local/sbin/ebncontrol @var{sub-command} 2026% /usr/local/sbin/ndtpcontrol @var{sub-command} 2027% /usr/local/sbin/ebhtcontrol @var{sub-command} 2028@end example 2029 2030They recognize the following @var{sub-commands}. 2031Abbreviations for sub-command names are allowed as long as they are 2032unique. 2033 2034@table @code 2035@item kill 2036Kill the running server process (send the @code{SIGKILL} signal). 2037It also deletes the server's PID file. 2038Before trying the @code{kill} sub-command, you should try @code{terminate} 2039sub-command. 2040 2041@item restart 2042Restart the server. 2043(send the @code{SIGHUP} signal). 2044The server process closes all connections, and reads a configuration 2045file again. 2046 2047@item status 2048Examine whether the server is running or not, and output the result 2049to standard error. 2050This sub-command doesn't send any signal to the server. 2051 2052@item terminate 2053Terminate the running server process 2054(send the @code{SIGTERM} signal). 2055@end table 2056 2057@c ------------------------------------------------------------------- 2058@node Server Controler Options, , Invoke Server Controler, Terminate and Restart 2059@section Summary of Options to Server Control Commands 2060 2061The @code{ebncontrol}, @code{ndtpcontrol} and @code{ebhtcontrol} 2062commands support both traditional single-letter options and mnemonic 2063long option names. 2064Long option names are indicated with @samp{--} instead of @samp{-}. 2065Abbreviations for option names are allowed as long as they are unique. 2066 2067@code{ebncontrol}, @code{ndtpcontrol} and @code{ebhtcontrol} recognize 2068the command line options below. 2069 2070@table @code 2071@item -c @var{file} 2072@itemx --configuration-file @var{file} 2073Specify a configuration file. 2074The default filename is shown in the help message. 2075 2076@item -h 2077@itemx --help 2078Output help message to standard error, then exit. 2079 2080@item -v 2081@itemx --version 2082Output version number to standard error, then exit. 2083@end table 2084 2085@c =================================================================== 2086@node Daily Works, Network License, Terminate and Restart, Top 2087@chapter Daily Administrative Works 2088 2089The @code{ebndaily} command generates statistics summary from a latest 2090syslog file of the servers (@code{ebnetd}, @code{ndtpd} and @code{ebhttpd}), 2091rotates syslog files, and then mails the results to administrators 2092specified by command line arguments. 2093 2094@code{ebndaily} has been installed at @file{/usr/local/sbin}, if EBNETD 2095has been installed under @file{/usr/local}, and if a directory for system 2096administrative executables (@code{sbindir}) has not been changed at 2097the installation. 2098Its usual way to invoke @code{ebndaily} is as follows: 2099 2100@example 2101% /usr/local/sbin/ebndaily @var{mail-address}... 2102@end example 2103 2104@noindent 2105For example, 2106 2107@example 2108% /usr/local/sbin/ebndaily root@@host.your.domain 2109@end example 2110 2111@noindent 2112Two or more mail addresses can be accepted: 2113 2114@example 2115% /usr/local/sbin/ebndaily root@@host.your.domain root@@dept.your.domain 2116@end example 2117 2118@sp 1 2119To execute @code{ebndaily} once a day automatically, add an entry 2120like as follows on your @file{crontab}. 2121 2122@example 21230 0 * * * /usr/local/sbin/ebndaily root@@host.your.domain 2124@end example 2125 2126@noindent 2127(For details, please read the manual for your system.) 2128@* 2129By default, @code{ebndaily} keeps 7 ages of old syslog files. 2130If the current syslog file is @file{/usr/local/var/ebnetd/log/ebnetd.log}, 2131the old syslog files are kept as: 2132 2133@example 2134/usr/local/var/ebnetd/log/ebnetd.log.0 2135/usr/local/var/ebnetd/log/ebnetd.log.1 2136/usr/local/var/ebnetd/log/ebnetd.log.2 2137/usr/local/var/ebnetd/log/ebnetd.log.3 2138/usr/local/var/ebnetd/log/ebnetd.log.4 2139/usr/local/var/ebnetd/log/ebnetd.log.5 2140/usr/local/var/ebnetd/log/ebnetd.log.6 2141@end example 2142 2143@noindent 2144These syslog files are rotated by the following processes: 2145 2146@enumerate 2147@item The eldest syslog file @file{ebnetd.log.6} is removed. 2148 2149@item Other @file{ebnetd.log.@var{n}} files are moved to 2150@file{ebnetd.log.@var{n+1}}. 2151 2152@item The current syslog file @file{ebnetd.log} is copied to 2153@file{ebnetd.log.0}. 2154 2155@item The current syslog file @file{ebnetd.log} is cleared. 2156@end enumerate 2157 2158@menu 2159* ebndaily Options:: Summary of options to @code{ebndaily}. 2160@end menu 2161 2162@c ------------------------------------------------------------------- 2163@node ebndaily Options, , Daily Works, Daily Works 2164@section Summary of Options to @code{ebndaily} 2165 2166The @code{ebndaily} command supports both traditional single-letter 2167options and mnemonic long option names. 2168Long option names are indicated with @samp{--} instead of @samp{-}. 2169Abbreviations for option names are allowed as long as they are unique. 2170 2171The @code{ebndaily} command recognizes following command line options. 2172 2173@table @code 2174@item -a @var{integer} 2175@itemx --ages @var{integer} 2176Keep @var{integer} ages of old syslog files. 2177The default value is @samp{7}. 2178 2179@item -c @var{compressor} 2180@itemx --compressor @var{compressor} 2181Specify a commpression program to compress old syslog files. 2182The @var{compressor} must be @samp{compress}, @samp{gzip}, @samp{bzip2} 2183or @samp{none}. 2184The default value is @samp{none}. 2185 2186When @samp{compress} is specified or no @samp{--compressor} (@samp{-c}) 2187option is specified, the @samp{compress} command is used for compression 2188and the suffix @file{.Z} are added to the old syslog files. 2189When @samp{gzip} is specified, the @code{gzip} command is used for 2190compression and the suffix @file{.gz} are added to the old syslog files. 2191When @samp{bzip2} is specified, the @code{bzip2} command is used for 2192compression and the suffix @file{.bz2} are added to the old syslog files. 2193When @samp{none} is specified, no compression program is used and 2194no suffix is added to the old syslog files. 2195 2196@item -l @var{file} 2197@itemx --log-file @var{file} 2198Specify the current syslog file. 2199@* 2200The default value is @file{/usr/local/var/ebnetd/log/ebnetd.log}, if 2201EBNETD has been installed under @file{/usr/local}, and if a directory 2202for modifiable single-machine data (@code{localstatedir}) and 2203a directory for log files (specified by @code{--with-logdir}) have 2204not been changed at the installation. 2205The default filename is shown in the help message. 2206 2207@item -h 2208@itemx --help 2209Output help message to standard error, then exit. 2210 2211@item -v 2212@itemx --version 2213Output version number to standard error, then exit. 2214 2215@item -@var{n} 2216@itemx --fast 2217@itemx --best 2218These options are passed to @code{gzip} and @code{bzip2} 2219(@pxref{Invoking gzip, , Invoking @code{gzip}, gzip, Gzip User's Manual}, 2220for more details). 2221If neither @code{gzip} nor @code{bzip2} is used, these options are merely 2222ignored. 2223@end table 2224 2225@c =================================================================== 2226@node Network License, , Daily Works, Top 2227@chapter Network License 2228 2229Some CD-ROM book publishers optionally provide network license. 2230It allows multiple users on your LAN to access the book. 2231The license may limit the maximum number of users accessing to the 2232book at the same time (since the contents of network license is various, 2233please contact publishers of your book for more details). 2234 2235In the configuration file (usually @code{ebnetd.conf}), there are two 2236@code{max-clients} parameters. 2237One is single directive 2238(@pxref{Single Directive List, ,@code{max-clients}}), 2239and another is sub-directive in the @code{book} 2240(@pxref{Book Group Directive, , @code{max-clients}}). 2241group directive. 2242Both limits the maximum number of clients. 2243 2244They help follow the the network license, but they are not perfect. 2245The book should be readable to an user only while his client connects 2246to a server, but neither server or client doesn't check connection 2247status frequently. 2248For example, server closes the connection when idle timeout occurs. 2249However, client keeps displaying contents of the CD-ROM book until 2250user requests another contents. 2251 2252Setting @code{max-clients} for network license is still a good idea. 2253It is important that you don't overestimate the abilities of 2254@code{max-clients}. 2255 2256@c ------------------------------------------------------------------- 2257@contents 2258@bye 2259