Installing and Starting the Web Server

The Apache Web server software is usually installed automatically during the system installation, so you shouldn't have to install it manually. I recommend, though, checking to be sure that it is there before you try to start it. You can check for the Web server by entering the following command:

rpm -q httpd

If the Apache software is installed, the system responds with the name and version number of the installed software. If the Web server is not installed, your query results in the system responding that the server is not installed. You can install the Web server as follows:

1. Choose ApplicationsOSystem SettingsO Add/Remove Applications.

If you're not logged in as the root user, you are prompted to enter the root password.

The Package Management dialog box, as shown in Figure 15-1, appears.

Figure 15-1:

Use the Package Management dialog box to add packages to your system.

Add or Remove Packages

ÇÛ ""----------------------------


0 Server Configuration Tools



This group contains all of Red Hat's custom server ^^ configuration tools.

0 Web Server



These tools allow you to run a Web server on the system.

0 Mail Server



These packages allow you to configure an IMAP or Postfix mail server.

0 Windows File Server



ffTiL This package group allows you to share files between Linux and MS Windows(tm) systems.

0 DNS Name Server



Total install I size: 2,974 Megabytes

33 Quit


Total install I size: 2,974 Megabytes

33 Quit


2. Scroll down to the Servers section and mark the Web Server check box.

Be sure to click the Details link for the Web server to see whether you need to install any additional Web server tools. For example, if you plan to use a database with your Web server, you want to install the tools for using databases with the Web server.

3. Click the Update button, click Continue when the summary dialog box appears, enter the appropriate Enterprise Linux installation disk when prompted, and then click OK.

4. When the Update Complete dialog box appears, click OK and then click Quit to close the Package Management dialog box.

After the Web server software is installed, you can start the Web server to check that it's working. After you're sure that the Web server is working, you can make any configuration changes for the Web server. You also need to put the files for your Web site into the proper directory on your system so that the Web server can find them. First things first. Start the Web server and then open a browser to see whether you can use the Web server. You start the Web server as follows:

1. Choose ApplicationsOSystem SettingsOServer SettingsOServices.

If you're not logged in as the root user, you are prompted to enter the root password.

The Service Configuration dialog box, as shown in Figure 15-2, appears.

Figure 15-2:

Use the Service Configuration dialog box to start and stop services.

Service Configuration

_ H Kl

File View Actions Edit Runlevel Help

Start 5top Restart

5ave Revert

îvel: 5 Editing Rnnlcvcl: 5


Apache is a World Wide Web server. It is used to serve HTML files and CGI.

ZU itind

0 iptables □ Irda fi Irqbalance

ZU itind

0 iptables □ Irda fi Irqbalance

îvel: 5 Editing Rnnlcvcl: 5


Apache is a World Wide Web server. It is used to serve HTML files and CGI.

Status httpd is stopped

2. Scroll down the list of services on the left side of the dialog box until you find httpd.

3. Mark the httpd check box.

This ensures that the Web server starts whenever the system boots up.

4. Click the Start button on the tool bar to start the Apache server.

You see a small dialog box indicating that the server started successfully.

5. Click OK to close the dialog box.

6. Click the Save icon from the toolbar and then choose FileOQuit to close the Service Configuration dialog box.

You can now check whether your Web server is functioning. You can get to it by following these steps:

1. Open your Web browser by clicking the Web browser icon from the panel.

2. In the browser location box, enter the URL http://localhost.

You see a Test Page screen, as shown in Figure 15-3, indicating that your Web server is properly installed and working.

term LinG - Live, informative, NDn-cD5t and Genuine !

Figure 15-3:

The Enterprise Linux Web server test page.

This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page* it means that the Apache HTTP server installed at this site is wording property,

If you are a member of the general public:

If you are the website administrator:

The fact that you are seeing this page indicates that the website you just visited is either experiencing problems, or is undergoing routine maintenance.

If you would like to let the administrators of this website know that you've seen this page instead of the page you expected, you should send them e-mail. In general, mail sent to the name "webmaster* and directed to the website's domain should reach the appropriate person.

You may now add content to the directory /var/wm/htiil/. Note that until you do so, people visiting your website will see this page, and not your content. To prevent this page from ever being used, follow the instructions in the file /'et c /ht tpd/conf. d/welcome. c onf.

You are free to use the images below on an Apache and Red Hat powered HTTP server. Thanks for using Apache and Red Hat Enterprise Linux 1

For example, if you experienced problems while visiting, you should send e mail to "webmaster'^".

'"J^^Eewarad by 2 .0 ^■¡■¡■■■■■h

Far information on Red Hat Enterprise Linux, please visit the Red Hat, Inc. website. The documentation for Red Hat Enterprise Linux is available on the Red Hat, Inc. website.

£B> m |


Notice the text on the right of the screen meant for system administrators. This text tells you that you can now put your Web pages into the directory on your server. I show you how to do this in the next section.

Was this article helpful?

0 0

Post a comment