Andrew Hudson - Fedora™ Unleashed, 2008 edition

Здесь есть возможность читать онлайн «Andrew Hudson - Fedora™ Unleashed, 2008 edition» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Город: Indianapolis, Год выпуска: 2008, ISBN: 2008, Издательство: Sams Publishing, Жанр: ОС и Сети, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Fedora™ Unleashed, 2008 edition: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Fedora™ Unleashed, 2008 edition»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Quick Glance Guide
Finding information you need is not always easy. This short index provides a list of common tasks discussed inside this book. Browse the table of contents or index for detailed listings and consult the specified chapter for in-depth discussions about each subject.
left How Do I…?
See…
How Do I…?
See…
left Back up my system?
Chapter 13
Partition a hard drive?
Appendix B, Chapters 1, 35
left Build a new Linux kernel?
Chapter 36
Play MP3s and other music?
Chapter 7
left Burn a CD?
Chapter 7
Print a file?
Chapter 8
left Change a password?
Chapter 4
Read a text file?
Chapter 4
left Change the date and time?
Chapter 32
Read or send email?
Chapter 21
left Compress a file?
Chapter 13
Read or post to newsgroups?
Chapter 5
left Configure a modem?
Chapter 2
Reboot Fedora?
Chapter 1
left Configure a printer?
Chapter 8
Rescue my system?
Chapter 13
left Configure a scanner?
Chapter 7
Set up a DNS server?
Chapter 23
left Configure a sound card?
Chapter 7
Set up a firewall?
Chapter 14
left Configure my desktop settings?
Chapter 3
Set up a web server?
Chapter 15
left Connect to the Internet?
Chapter 5
Set up an FTP server?
Chapter 20
left Control a network interface?
Chapter 14
Set up Samba with SWAT?
Chapter 19
left Copy files or directories?
Chapters 13, 32
Set up wireless networking?
Chapter 14
left Create a boot disk to boot Fedora?
Chapter 1
Shut down Fedora?
Chapter 1
left Create a database?
Chapter 16
Use a spreadsheet?
Chapter 6
left Create a user?
Chapter 4
Use Instant Messaging?
Chapter 5
left Delete a file or directory?
Chapter 32
Watch television on my computer?
Chapter 7
left Get images from a digital camera?
Chapter 7
Edit a text file?
Chapter 4
left Install Fedora?
Chapter 1
Make Fedora more secure?
Chapter 14
left Log in to Fedora?
Chapter 1
Mount a CD-ROM or hard drive?
Chapter 35

Fedora™ Unleashed, 2008 edition — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Fedora™ Unleashed, 2008 edition», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

/usr/src/redhat/SOURCES/— This directory might contain a tararchive 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 ht tpd.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 . rpmnewto them. For example, srm.confbecomes srm.conf.rpmnew.

Building the Source Yourself

There are several ways to obtain the source code for Apache. Fedora provides SRPMs containing the source of Apache, which include patches to make it work better with the Fedora distribution. The most up-to-date, stable binary version for Fedora can be installed through Pirut, or by installing a source RPM from Fedora's source repository. When you install one of these SRPMs, a tararchive containing the Apache source is created in /usr/src/redhat/SOURCES/.

After you have the tarfile, you must unroll it in a temporary directory, such as /tmp. Unrolling this tarfile creates a directory called apache_ version_number , where version_number is the version you've downloaded (for example, apache_1.3.21).

You can also download the source directly from http://www.apache.org/. The latest version at the time of this writing, 2.2.6, is a 6MB compressed tape archive, and the latest pre-2.0 version of Apache is 1.3.31. Although many sites continue to use the older version (for script and other compatibility reasons), many new sites are migrating to or starting out with the latest stable version.

TIP

As with many software packages distributed in source code form for Linux and other Unix-like operating systems, extracting the source code results in a directory that contains a READMEand an INSTALLfile. Be sure to peruse the INSTALLfile before attempting to build and install the software.

Using ./configureto Build Apache

To build Apache the easy way, run the . /configurescript in the directory just created. You can provide it with a --prefixargument to install it in a directory other than the default, which is /usr/local/apache/. Use this command:

# ./configure --prefix=/preferred/directory/

This generates the makefile that's used to compile the server code.

Next, type make to compile the server code. After the compilation is complete, type make install as root to install the server. You can now configure the server via the configuration files. See the "Runtime Server Configuration Settings" section, later in this chapter, for more information.

TIP

A safer way to install a new version of Apache from source is to use the lncommand to create symbolic links of the existing file locations (listed in the "Installing from the RPM" section earlier in this chapter) to the new locations of the files. This method is safer because the default install locations are different from those used when the RPM installs the files. Failure to use this installation method could result in your web server process not being started automatically at system startup.

Another safe way to install a new version of Apache is to first back up any important configuration directories and files (such as /etc/httpd) and then use the rpmcommand to remove the server. You can then install and test your new version and, if needed, easily restore your original server and settings.

It is strongly recommended that you use Fedora's RPM version of Apache until you really know what happens at system startup. No "uninstall" option is available when installing Apache from source!

Apache File Locations After a Build and Install

Files are placed in various subdirectories of /usr/local/apache(or whatever directory you specified with the --prefixparameter) if you build the server from source.

The following is a list of the directories used by Apache, as well as brief comments on their usage:

/usr/local/apache/conf— This contains several subdirectories and the Apache configuration file, httpd.conf. See the "Editing httpd.conf" section, later in this chapter, to learn more about configuration files.

/usr/local/apache— The cgi-bin, icons, and htdocssubdirectories contain the CGI programs, standard icons, and default HTML documents, respectively.

/usr/local/apache/bin— The executable programs are placed in this directory.

/usr/local/apache/logs— The server log files are placed in this directory. By default, there are two log files — access_logand error_log— but you can define any number of custom logs containing a variety of information (see the "Logging" section later in this chapter). The default location for Apache's logs as installed by Fedora is /var/log/httpd.

A Quick Guide to Getting Started with Apache

Setting up, testing a web page, and starting Apache with Fedora can be accomplished in just a few steps. First, make sure that Apache is installed on your system. Either select it during installation or install the server and related RPM files.

Next, set up a home page for your system by editing (as root) the file named index.htmlunder the /var/http/www/htmldirectory on your system. Make a backup copy of the original page or wwwdirectory before you begin so that you can restore your web server to its default state if necessary.

Start Apache (again, as root) by using the servicecommand with the keywords httpdand start, like this:

# service httpd start

You can also use the httpdscript under the /etc/rc.d/init.d/directory, like this:

# /etc/rc.d/init.d/httpd start

You can then check your home page by running a favorite browser and using localhost, your system's hostname, or its Internet Protocol (IP) address in the URL. For example, with the linkstext browser, use a command line like this:

# links http://localhost/

For security reasons, you shouldn't start and run Apache as root if your host is connected to the Internet or a company intranet. Fortunately, Apache is set to run as the user and group apacheno matter how it's started (by the Userand Groupsettings in /etc/httpd/httpd.conf). Despite this safe default, Apache should be started and managed by the user named apache, defined in /etc/passwdas:

apache:x:48:48:Apache:/var/www:/sbin/nologin

After you are satisfied with your website, use the setup(select Services) or ntsysv(select httpd) command to ensure that Apache is started properly.

Starting and Stopping Apache

At this point, you have installed your Apache server with its default configuration. Fedora provides a default home page named index.htmlas a test under the /var/www/html/usagedirectory. The proper way to run Apache is to set system initialization to have the server run after booting, network configuration, and any firewall configuration. See Chapter 11, "Automating Tasks," for more information about how Fedora boots.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Fedora™ Unleashed, 2008 edition»

Представляем Вашему вниманию похожие книги на «Fedora™ Unleashed, 2008 edition» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Fedora™ Unleashed, 2008 edition»

Обсуждение, отзывы о книге «Fedora™ Unleashed, 2008 edition» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x