|
|||||||||
|
Running from the Internet services daemonUNIX programs that provide TCP/IP services can be started by the Internet services daemon, inetd. Services run from inetd are started when a request arrives for that service. This works well for lightweight or infrequently used services, since the program only needs to be running when servicing a request, but the downside is that the program must perform its initialization for each request. This can take considerable time and lead to delays in servicing requests. To configure a service to be run from inetd, you have to define the service name and add the server details to the list of services in the inetd configuration files. Service names are defined by a line in the services file, which is usually either /etc/services or /etc/inet/services, for example:
http 80/tcp # Hypertext Transfer Protocol The server details are specified in the inetd configuration file, which is usually /etc/inet/inetd.conf or /etc/inetd.conf:
# Web server http stream tcp nowait root /etc/httpd -r /etc/httpd.conf The precise syntax of this file varies from system to system. The inetd program can be prompted to reread its configuration files, without rebooting the system, by sending it a SIGHUP signal. You will probably need to be logged in as root to do this.
Next: Restricting access by Up: Server start-up mechanism Previous: Running standalone
Spinning the Web by Andrew Ford |
||||||
Copyright © 1996-2002 Ford & Mason Ltd |