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

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

Интервал:

Закладка:

Сделать

Nightly yum update is enabled: [ OK ]

Of course, the GUI tools mentioned earlier also have the functionality to start and stop specific services in your current runlevel. The tool you choose is a matter of personal preference; a good system administrator is aware of them all.

Relevant Fedora Commands

Here are some of the commands you learned so far:

chkconfig — Fedora's text-only command-line runlevel configuration utility

ntsysv — Fedora's text-based system services configuration tool for the command line

setup — Actually a bash script, it is a menu to all the individual ncurses-basedconfiguration tools, including ntsysv

system-config-services — Fedora's GUI runlevel configuration tool, named Configure Services

telinit — Changes the current runlevel

Scheduling Tasks

There are three ways to schedule commands in Fedora, all of which work in different ways. The first is the atcommand, which specifies a command to run at a specific time and date relative to today. The second is the batchcommand, which is actually a script that redirects you to the atcommand with some extra options set so that your command runs when the system is quiet. The last option is the crondaemon, which is the Linux way of executing tasks at a given time.

Using atand batchto Schedule Tasks for Later

If there is a time-intensive task you want to run, but you do not want to do it while you are still logged in, you can tell Fedora to run it later with the atcommand. To use at, you need to tell it the time at which you want to run and then press Enter. You then see a new prompt that starts with at>, and everything you type there — until you press Ctrl+D — comprises the commands you want atto run.

When the designated time arrives, atperforms each action individually and in order, which means later commands can rely on the results of earlier commands. In this next example, run at just after 5 p.m., at is used to download and extract the latest Linux kernel at a time when the network should be quiet:

[paul@caitlin ~]$ at now + 7 hours

at> wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2

at> tar xvfjp linux-2.6.10.tar.bz2

at>

job 2 at 2005-01-09 17:01

Specifying now + 7 hoursas the time does what you would expect: atwas run at 5 p.m., so the command runs just after midnight that night. When your job finishes, atsends you mail with a full log of your job's output; type mail at the console to bring up your mailbox and then press the relevant number to read at'smail.

If you have a more complex job, you can use the -fparameter to have atread its commands from a file, like this:

echo wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2; \

tar xvfjp linux-2.6.10.tar.bz2 > myjob.job

at -f myjob.job tomorrow

As you can see, atis flexible about the time format it takes; you can specify it in three ways:

► Using the nowparameter, you can specify a number of minutes, hours, days, or weeks relative to the current time — for example, now + 4 weekswould run the command one month from today.

► You can also specify several special times, including tomorrow, midnight, noon, or teatime(4 p.m.). If you do not specify a time with tomorrow, your job is set for precisely 24 hours from the current time.

► You can specify an exact date and time using HH:MM MM/DD/YYformat — for example, 16:40 22/12/05 for 4:40 p.m. on the 22nd of December 2005.

When your job is submitted, at reports the job number, date, and time that the job will be executed; the queue identifier; plus the job owner (you). It also captures all your environment variables and stores them along with the job so that, when your job runs, it can restore the variables, preserving your execution environment.

The job number and job queue identifier are both important. When you schedule a job using at, it is placed into queue a by default, which means it runs at your specified time and takes up a normal amount of resources.

There is an alternative command, batch, which is really just a shell script that calls atwith a few extra options. These options ( -q b -m now, if you were interested) set atto run on queue b ( -q b), mailing the user on completion ( -m), and running immediately ( now). The queue part is what is important: Jobs scheduled on queue b are executed only when the system load falls below 0.8 — that is, when the system is not running at full load. Furthermore, they run with a lower niceness, meaning queue a jobs usually have a niceness of 2, whereas queue b jobs have a niceness of 4.

Because batchalways specifies nowas its time, you need not specify your own time; it simply runs as soon as the system is quiet. Having a default niceness of 4 means that batched commands get fewer system resources than queue jobs ( at'sdefault) and fewer system resources than most other programs. You can optionally specify other queues using at.Queue c runs at niceness 6, queue d runs at niceness 8, and so on. However, it is important to note that the system load is checked only before the command is run. If the load is lower than 0.8, your batch job is run. If the system load subsequently rises beyond 0.8, your batch job continues to run, albeit in the background, thanks to its niceness value.

When you submit a job for execution, you are also returned a job number. If you forget this or just want to see a list of other jobs you have scheduled to run later, use the atqcommand with no parameters. If you run this as a normal user, it prints only your jobs; running it as a super-user prints everyone's jobs. The output is in the same format as when you submit a job, so you get the ID number, execution time, queue ID, and owner of each job.

If you want to delete a job, use the atrmcommand followed by the ID number of the job you want to delete. The next example shows atqand atrmbeing used to list jobs and delete one:

[paul@caitlin ~]$ atq

14 2005-01-20 23:33 a paul

16 2005-02-03 22:34 a paul

17 2005-01-25 22:34 a paul

15 2005-01-22 04:34 a paul

18 2005-01-22 01:35 b paul

[paul@caitlin ~]$ atrm 16

[paul@caitlin ~]$ atq

14 2005-01-20 23:33 a paul

17 2005-01-25 22:34 a paul

15 2005-01-22 04:34 a paul

18 2005-01-22 01:35 b paul

In that example, job 16 is deleted by atrm, and so it does not show up in the second call to atq.

The default configuration for atand batchis to allow everyone to use it, which is not always the desired behavior. Access is controlled through two files: /etc/at.allow, and /etc/at.deny. By default, at.denyexists but is empty, which allows everyone to use atand batch.You can enter usernames into at.deny, one per line, to stop those users scheduling jobs.

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

Интервал:

Закладка:

Сделать

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

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


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

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

x