Installing an Internet Daemon on Cygwin


In Unix-speak, a daemon is a specialized program that exists only to provide a service for users (including other programs) on the local machine or the network. Daemons can be started when necessary by a super-server that monitors network ports (such as inetd and xinetd), or they can start at boot time and sit around waiting for requests (such as cupsd, which handles printing on a number of modern Unix systems). By convention, daemons have names that end in d, such as inetd, cupsd, ntpd, and named.

When you install Cygwin (see Appendix D), you don't automatically get one of the Internet daemons, inetd or xinetd. Generally, you'd want to use native Windows services to handle things like file transfer and Web serving to maximize performance.

If you want to use inetd or xinetd with Cygwin, you can install them, but you'll probably want to disable the Telnet service in the Services control panel if it isn't already disabled.

To install an Internet daemon (Cygwin)

We're going to install inetd because it's more integrated with the Windows notion of services.

1.

Launch the Cygwin setup.exe, then click the Next button until you get to the package-selection screen.

2.

Expand the Net category by clicking the plus sign next to it (Figure 5.4).

Figure 5.4. Expanding the Net category in the Cygwin Setup application to find the inetutils package.


3.

Click the circle-arrow icon for the inetutils package, so that the Skip entry changes to a version number.

4.

Click Next in the Cygwin Setup window to install the new package and any updates to packages you already have installed.

5.

Click Finish to exit the Cygwin Setup program.

To activate inetd (Cygwin)

The inetd server is installed as part of the inetutils package, but it's not active as a service until you set it up.

1.

Open a Cygwin window.

2.

inetd --install-as-service

This installs a Windows service, controllable through the standard Services control panel, for the Cygwin inetd.

3.

Use your favorite text editor to edit /etc/inetd.conf and add a # character to the start of every line that doesn't already have one.

This disables all of the services; it's a good idea to disable everything, and then go back to enable the services you actually want.

4.

Click the Windows Start menu, then open Control Panel.

5.

Double-click the System control panel.

6.

Click the Advanced tab, then the Environment Variables button.

The Environment Variables dialog is displayed (Figure 5.5).

Figure 5.5. Setting environment variables in Windows.


7.

Click the New button in the "System variables" section.

8.

In the New System Variable dialog (Figure 5.6), type CYGWIN in the "Variable name" field. Type ntsec in the "Variable value" field.

Figure 5.6. Adding a new systemwide environment variable.


This tells Cygwin to use Windows users and groups for authentication, which lets you add users and groups through the standard graphical tools.

9.

Click OK to close the New System Variable dialog.

10.

Select the Path variable in the "System variables" section of the Environment Variables dialog, then click the Edit button.

11.

Add c:\cygwin\bin to the start of the "Variable value" field in the Edit System Variable dialog (Figure 5.7).

Figure 5.7. Editing a systemwide environment variable.


12.

Click OK to exit the dialog. Click OK in the Environment Variables dialog and System control panel to close them.

13.

Reboot.

Yes, this isn't very Unix-like, but it's necessary. When your system finishes rebooting, the Cygwin inetd service is running.



    Unix Advanced. Visual QuickPro Guide
    Unix Advanced: Visual QuickPro Guide
    ISBN: 0321205499
    EAN: 2147483647
    Year: 2003
    Pages: 116

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net