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», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

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

Интервал:

Закладка:

Сделать

It is time to start Apache up for the first time. The following sections show how to start and stop Apache, or configure Fedora to start or not start Apache when booting.

Starting the Apache Server Manually

You can start Apache from the command line of a text-based console or X terminal window, and you must have root permission to do so. The server daemon, httpd, recognizes several command-line options you can use to set some defaults, such as specifying where httpdreads its configuration directives. The Apache httpdexecutable also understands other options that enable you to selectively use parts of its configuration file, specify a different location of the actual server and supporting files, use a different configuration file (perhaps for testing), and save startup errors to a specific log. The -voption causes Apache to print its development version and quit. The -Voption shows all the settings that were in effect when the server was compiled.

The -hoption prints the following usage information for the server (assuming that you're running the command as root):

# httpd -h

Usage: httpd [-D name] [-d directory] [-f file]

[-C "directive"] [-c "directive"]

[-k start|restart|graceful|stop]

[-v] [-V] [-h] [-l] [-L] [-t]

Options:

-D name : define a name for use in directives

-d directory : specify an alternate initial ServerRoot

-f file : specify an alternate ServerConfigFile

-C "directive" : process directive before reading config files

-c "directive" : process directive after reading config files

-e level : show startup errors of level (see LogLevel)

-E file : log startup errors to file

-v : show version number

-V : show compile settings

-h : list available command-line options (this page)

-l : list compiled in modules

-L : list available configuration directives

-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)

-t : run syntax check for config files

Other options include listing Apache's static modules , or special, built-in independent parts of the server, along with options that can be used with the modules. These options are called configuration directives and are commands that control how a static module works. Note that Apache also includes nearly 50 dynamic modules , or software portions of the server that can be optionally loaded and used while the server is running.

The -toption is used to check your configuration files. It's a good idea to run this check before restarting your server, especially if you've made changes to your configuration files.

Such tests are important because a configuration file error can result in your server shut ting down when you try to restart it.

NOTE

When you build and install Apache from source and don't use Fedora's Apache RPM files, start the server manually from the command line as root (such as when testing). You do this for two reasons:

► The standalone server uses the default HTTP port (port 80), and only the super- user can bind to Internet ports that are lower than 1024.

► Only processes owned by root can change their UID and GID as specified by Apache's Userand Groupdirectives. If you start the server under another UID, it runs with the permissions of the user starting the process.

Note that although some of the following examples show how to start the server as root, you should do so only for testing after building and installing Apache. Fedora is set up to run web services as the apacheuser if you use Fedora RPM files to install Apache.

Using /etc/rc.d/init.d/httpd

Fedora uses the scripts in the /etc/rc.d/init.ddirectory to control the startup and shut down of various services, including the Apache web server. The main script installed for the Apache web server is /etc/rc.d/init.d/httpd, although the actual work is done by the apachectlshell script included with Apache.

NOTE

/etc/rc.d/init.d/httpdis a shell script and isn't the same as the Apache server located in /usr/sbin. That is, /usr/sbin/httpdis the program executable file (the server); /etc/rc.d/init.d/httpdis a shell script that uses another shell script, apachectl, to control the server. See Chapter 11 for a description of some service scripts under /etc/rc.d/init.dand how the scripts are used to manage services such as httpd.

You can use the /etc/rc.d/init.d/httpdscript and the following options to control the web server:

start— The system uses this option to start the web server during bootup. You, as root, can also use this script to start the server.

stop— The system uses this option to stop the server gracefully. You should use this script, rather than the kill command, to stop the server.

reload— You can use this option to send the HUPsignal to the httpdserver to have it reread the configuration files after modification.

restart— This option is a convenient way to stop and then immediately start the web server. If the httpdserver isn't running, it is started.

condrestart— The same as the restartparameter, except that it restarts the httpdserver only if it's actually running.

status— This option indicates whether the server is running; if it is, it provides the various PIDs for each instance of the server.

For example, to check on the status of your server, use the command

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

This prints the following for me:

httpd (pid 15997 1791 1790 1789 1788 1787 1786 1785 1784 1781) is running...

This indicates that the web server is running; in fact, 10 instances of the server are currently running in this configuration.

In addition to the previous options, the httpdscript also offers these features:

help— Prints a list of valid options to the httpdscript (which are passed onto the server as if called from the command line).

configtest— A simple test of the server's configuration, which reports Status OKif the setup is correct. You can also use httpd's -t option to perform the same test, like this:

# httpd -t

fullstatus— Displays a verbose status report.

graceful— The same as the restartparameter, except that the configtestoption is used first and open connections are not aborted.

TIP

Use the reloadoption if you're making many changes to the various server configuration files. This saves time when you're stopping and starting the server by having the system simply reread the configuration files.

Controlling Apache with Fedora's serviceCommand

Instead of directly calling the /etc/rc.d/init.d/httpdscript, you can use Red Hat's servicecommand to start, stop, and restart Apache. The servicecommand is used with the name of a service (listed under /etc/rc.d/init.d) and an optional keyword:

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

Интервал:

Закладка:

Сделать

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

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


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

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

x