Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

310 Technique 42: Keeping an Apache Server in Top Form

Figure 42-4: The Package Management window.

4.Click Update.

A dialog opens confirming that the system preparation is completed.

5.Click the Continue button.

A dialog opens, confirming that your system is being updated.

6.Click Continue, and when prompted, insert the Fedora disc and click OK.

The last few steps may vary a bit depending on which disc images you’re using. Just follow along and click — the Package Manager is easy to get along with.

When the system updates are complete, a window opens confirming the successful installation. Now, you need to start the service, which we explain in detail in the next section.

Starting the Apache Service

The Apache Web server is a daemon — it lurks in the background, waiting for inquiries from browsers that just happen to come looking for you on TCP port 80.

To start the Apache Web server on a Fedora system, you need to start the httpd service. To start the service, follow these steps:

1. Open the Main Menu and choose System Settings Server Settings Services.

A dialog opens, prompting you for the root password.

2. Enter the password and click OK.

The Service Configuration window opens, as shown in Figure 42-5.

Figure 42-5: The Service Configuration window.

3.Use the scroll bar to scroll down through the list of services, and check the box next to httpd when you find it.

The Status frame shows that the httpd service is stopped.

4.Click the Start button on the toolbar.

An Information pop-up informs you that httpd started successfully (see Figure 42-6).

5.Click OK to close the pop-up.

6.Click the Save button in the Service Configuration window and then close the window.

Your Apache Web server is up and running!

Starting the Apache Service 311

• Figure 42-6: The httpd service is Apache.

If you’re running SuSE, you can use YaST to start the Apache Web server by following these steps:

1. Open the Main Menu and choose System YaST.

2. If you’re not logged in as the superuser, SuSE prompts you for the root password. Type in the root password and click OK.

3. Click Network Services, and then click HTTP

Server.

4. When the HTTP Server Configuration window appears, click Enabled and then Finish.

After a short delay, your Apache Web server is ready to serve browser requests.

If you’re a Mandrake user, follow these steps to start the Apache Web server using the Mandrake Control Center:

1. Open the Main Menu and choose System Configuration Configure Your Computer.

2. If you’re not logged in as the superuser,

Mandrake prompts you for the root password. Type in the root password and click OK.

3. Choose System Services.

4. Use the scroll bar to scroll down through the list of services, and select the On Boot check box next to httpd.

5. Click the Start button (next to httpd).

The Apache Web servers starts.

6. Click OK, and then close the Mandrake Control center.

The Apache Web server is up and running and will automatically start each time you reboot your Mandrake computer.

To check the installation and service status of your new Apache Web server, open a Web browser and surf to http://127.0.0.1. Your browser displays the Apache Server Test Page, shown in Figure 42-7.

• Figure 42-7: The Test Page for Apache Installation.

At this point, you’re ready to serve up Web content to machines on your local network. Apache is a quick way to distribute a company newsletter or share other in-house information. In the next section, we show you how to create simple Web content with OpenOffice.

To make your server accessible to your company or network, but not vulnerable to the outside world, allow traffic from port 80 at your local interface, but disallow traffic on port 80 from the outside world. See Technique 34 for helpful ideas about using Webmin to set up a functional firewall.

312 Technique 42: Keeping an Apache Server in Top Form

If you want to serve up data to the rest of the world, you need an IP address and domain name — more about that later.

Building a Quick Web Page with OpenOffice.org

After you have a server up and running, you need to provide some content for your users. A quick and easy way to set up and maintain an internal newsletter is with OpenOffice.org. One of the great features of OpenOffice.org Writer is a WYSIWIG editor that lets you create and save HTML documents in no time. It’s also very affordable.

If you haven’t already installed OpenOffice, you need to install it before you proceed with the steps in this section. See Technique 17 if you need help installing software on your system.

To create a simple Web page with OpenOffice.org Writer, follow these steps:

1. Open a terminal window and give yourself superuser privileges with the su command.

2. Enter the following command and press Enter:

# oowriter

OpenOffice.org Writer opens to a blank document, waiting for you to add content to your new Web page.

3. Add content to the Web page — text, pictures, and any graphics you want to distribute.

If you add graphics, don’t forget to copy them into place within the directory structure of your Web page so that Apache can find them. If you copy pictures into an OpenOffice.org document that you later save to an HTML file, the pictures are added as links. The links are replaced with images when the document is viewed in a browser.

4. When you’re finished creating your opening Web page, choose File Save As from the menu bar.

If you’re running Fedora or Mandrake Linux, save your file as

/var/www/html/index.html

If you’re running SuSE, save your file as

/srv/www/htdocs/index.html

5. Use the scroll bar next to the File Type field to highlight the HTML Document (OpenOffice,org Writer)(.html;htm) option in the drop-down list.

6. Click the Save button.

Your new Web page is saved where your Apache server can find it.

To check out your new network Web site, open your browser and surf to http://127.0.0.1.

Your new page is displayed; it should appear nearly identical to the document you created in Writer (see Figure 42-8).

• Figure 42-8: Start your site quick with OpenOffice.org.

For a top-notch tour of OpenOffice.org and a complete rundown of its capabilities, look for

OpenOffice.org For Dummies, by Gurdy Leete, Ellen Finkelstein, and Marty Leete (Wiley) at your favorite online or local bookstore.

Соседние файлы в предмете Операционные системы