Книга: Fedora™ Unleashed, 2008 edition

Installing Through Pirut

Installing Through Pirut

Although the "Web Server" category was available during install, it's often best to install Fedora clean of any services so that you minimize your attack vectors out of the box. As soon as Fedora is installed, you can use Pirut to add Apache by choosing Web Server from the Servers category.

However, you might find it useful to use the List tab rather than the Browse tab, because all the Apache modules start with "mod" to help you find them easily. Fedora ships with many Apache modules, some of which are discussed in the following sections. However, only a handful are enabled by default — you need to use Pirut to install and activate them.

Installing from the RPM

You can find the Apache RPM on the Fedora installation media, on the Fedora FTP server, or at one of its many mirror sites. Check the Fedora site as often as possible to download updates as they become available. Updated RPM files usually contain important bug and security fixes. When an updated version is released, install it as quickly as possible to keep your system secure.

NOTE

Check the Apache site for security reports. Browse to http://httpd.apache.org/security_report.html for links to security vulnerabilities for Apache 1.3, 2.0, and 2.2. Subscribe to a support list or browse through up-to-date archives of all Apache mailing lists at http://httpd.apache.org/mail/ (for various articles) or http://httpd.apache.org/lists.html (for comprehensive and organized archives).

If you want the most recent, experimental version of Apache for testing, check Red Hat's Rawhide distribution, which is also available on the Fedora FTP server (http://download.fedora.redhat.com/pub/fedora/linux/core/development/). This distribution is experimental and always contains the latest versions of all RPMs. However, note that the Apache package might depend on new functionality available in other RPMs. Therefore, you might need to install many new RPMs to be able to use packages from Rawhide. If you still want to use an Apache version from the Rawhide distribution for testing, a better option might be to download the source code RPM (SRPM) and compile it yourself. That way, you avoid dependencies on other new packages.

CAUTION

You should be wary of installing experimental packages, and never install them on production servers (that is, servers used in "real life"). Very carefully test the pack ages beforehand on a host that isn't connected to a network!

After you have obtained an Apache RPM, you can install it with the command-line rpm tool by typing the following:

rpm -Uvh latest_apache.rpm

where latest_apache.rpm is the name of the latest Apache RPM.

The Apache RPM installs files in the following directories:

/etc/httpd/conf — This directory contains the Apache configuration file, httpd.conf. See the section "Configuring Apache for Peak Performance" later in this chapter for more information.

/etc/rc.d/ — The tree under this directory contains the system startup scripts. The Apache RPM installs a startup script named httpd for the web server under the /etc/rc.d/init.d directory. This script, which you can use to start and stop the server from the command line, also automatically starts and stops the server when the computer is halted, started, or rebooted.

? /var/www — The RPM installs the default server icons, Common Gateway Interface (CGI) programs, and HTML files in this location. If you want to keep web content elsewhere, you can do so by making the appropriate changes in the server configuration files.

/var/www/manual/ — If you've installed the apache-manual RPM, you'll find a copy of the Apache documentation in HTML format here. You can access it with a web browser by going to http://localhost/manual/.

/usr/share/man — Fedora's Apache RPM also contains man pages, which are placed underneath this directory. For example, the httpd man page is in section 8 of the man directory.

/usr/bin — Some of the utilities from the Apache package are placed here — for example, the htpasswd program, which is used for generating authentication password files.

/var/log/httpd — The server log files are placed in this directory. By default, there are two important log files (among several others): access_log and error_log. However, you can define any number of custom logs containing a variety of information. See the "Logging" section, later in this chapter, for more detail.

/usr/src/redhat/SOURCES/ — This directory might contain a tar archive containing the source code for Apache and, in some cases, patches for the source. You must have installed the Apache SRPM for these files to be created.

When Apache is running, it also creates the file httpd.pid, containing the process ID of Apache's parent process in the /var/run/ directory.

NOTE

If you are upgrading to a newer version of Apache, RPM doesn't write over your current configuration files. RPM moves your current files and appends the extension .rpmnew to them. For example, srm.conf becomes srm.conf.rpmnew.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.097. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз