482 484




Using Linux:Managing Daemons






-->















Previous
Table of Contents
Next




Starting and Stopping Network Services
When starting and stopping network services, make sure that you stop all network-related services first. For the most part, these services continue to run if not stopped, generating errors and filling up log files. Furthermore, stopping the services properly ensures that all network connections have had the time to close down properly.

Using the ntsysv Tool

ntsysv is the text-mode service manager for Red Hat Linux. It is quite a bit simpler to use than tksysv, mainly because it deals with things one run level at a time.
To start ntsysv, type the command ntsysv --level <runlevel>, in which <runlevel> is the run level you want to edit. To edit multiple run levels with ntsysv, list them all (for example, 234).


Run a chkconfig
When editing multiple run levels, ntsysv marks a service as being started if it is started on any run level that is currently being edited. You should confirm that any changes made did not have any undesirable effects by running chkconfig after running ntsysv this way.

Adding or removing a service to a run level by using ntsysv


1.  Log on as root.
2.  Issue the command ntsysv --level <runlevel> in which <runlevel> is the number of the run level you wish to edit.
3.  Use the up and down arrow keys to move to the service that you want to modify.
4.  Press the Spacebar to turn the service on or off for the run level.
5.  Repeat steps 3 and 4 to turn any additional services on or off, as you need.
6.  Press the Tab key to highlight the OK button.
7.  Press Enter while OK is selected to save your work.

Enabling FTP Access
The FTP network service is controlled by the Internet service daemon, inetd. To ensure that inetd knows how to respond to FTP connection requests, you must edit /etc/inetd.conf to ensure that the FTP service is enabled.
There are two types of FTP access—one type for regular users of your system (who have user accounts), and the other for anonymous user access. Anonymous user access allows anyone to download files from a set of defined directories on your system by logging on as user anonymous and by convention, leaving his email address as a password.
Determining whether FTP is enabled on your system

1.  Make sure you have the FTP server installed on your system. Issue the command rpm -q wu-ftpd. If the system responds with the message package wu-ftpd is not installed then you must install the package before continuing.
2.  Ensure that the FTP service line in /etc/inetd.conf exists and not commented out. Issue the command less /etc/inetd.conf and then make less perform a forward search for the word ftp by using the command /ftp. less should stop at a line like the following:


ftp stream tcp nowait root /usr/sbin/tcpd
in.ftpd -l -a


If this line starts with a # you need to remove this before continuing.
3.  If you had to edit the inetd.conf file, you must notify inetd of the change to the file. Issuing /etc/rc.d/init.d/inet restart should do this for you.

Your system is now configured to accept incoming FTP connections.

To enable anonymous FTP access, first follow the preceding steps. The wu-ftpd server included with Red Hat Linux provides anonymous FTP server capabilities immediately upon installation, but the additional directories are not installed with the server. You will need the package anonftp for this.
To check if you have anonftp installed, type rpm -q anonftp at the command line, and install the file if necessary.
The anonymous FTP server directories are in /home/ftp. Anything in the /home/ftp/pub directory can be downloaded by anonymous users.
Provide support for anonymous uploads

1.  Log on as root.
2.  Change directories to /home/ftp.
3.  Create a directory called incoming.
4.  Change the write permissions to all everyone write access to the chmod a+w /home/ftp/incoming directory.

Test your FTP server before letting other users onto it

1.  FTP to your server with the command ftp localhost.
2.  Log on as user anonymous. Enter a password when prompted. If the password was not a valid email address, the server should issue a warning but still let you in.
3.  Change to the incoming directory.
4.  Set your FTP client’s binary mode by typing the command bin at the ftp> prompt.
5.  Attempt to upload a file to the server using the command <filename> where filename is the name of the file you want to upload.
6.  Try to download a file from your FTP server to make sure that everything works as expected.





Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
482 484
22 Bazy danych – wykład wstępnyid)482
482 485
484 Reklamacja towarów uznana i nieuznana przez dostawcę
479 482
482 485
482 Wazne informacje i terminy dla osób ubiegających się o certyfikat księgowy
478 482
01 (484)
01 (482)

więcej podobnych podstron