19.04.2013 Views

2KKUU7ita

2KKUU7ita

2KKUU7ita

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 12-9:<br />

Viewing the<br />

process IDs<br />

for running<br />

daemons<br />

by using<br />

ps -aux.<br />

1. Enter the following command at the Linux prompt:<br />

ps -aux<br />

Chapter 12: Linux<br />

The process ID (PID) for each daemon, including inetd, is listed on the<br />

screen. In Figure 12-9, the PID for the sshd (Secure Shell daemon) is 646.<br />

2. Make note of the PID for inetd.<br />

3. Open /etc/inetd.conf in the Linux text editor vi by entering the<br />

following command:<br />

Or<br />

vi /etc/inetd.conf<br />

/etc/xinetd.conf<br />

4. When you have the file loaded in vi, enable the insert (edit) mode by<br />

pressing I.<br />

5. Move the cursor to the beginning of the line of the daemon that you<br />

want to disable, such as httpd (web server daemon), and type # at the<br />

beginning of the line.<br />

This step comments out the line and prevents it from loading when you<br />

reboot the server or restart inetd. It’s also good for record keeping and<br />

change management.<br />

6. To exit vi and save your changes, press Esc to exit the insert mode,<br />

type :wq, and then press Enter.<br />

This tells vi that you want to write your changes and quit.<br />

7. Restart inetd by entering this command with the inetd PID:<br />

kill –HUP PID<br />

237

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!