Red_Hat_Enterprise_Linux-7-System_Administrators_Guide-en-US.pdf

(19179 KB) Pobierz
Red Hat Enterprise Linux 7
System Administrator's Guide
Deployment, Configuration and Administration of Red Hat Enterprise
Linux 7
Jaromír Hradílek
Stephen Wadeley
Miroslav Svoboda
Eliška Slobodová
David O'Brien
Douglas Silas
Tomáš Čapek
Petr Bokoč
Eva Kopalová
Michael Hideo
Martin Prpič
Petr Kovář
Peter Ondrejka
John Ha
Don Domingo
Red Hat Enterprise Linux 7 System Administrator's Guide
Deployment, Configuration and Administration of Red Hat Enterprise
Linux 7
Jaro mír Hradílek
Red Hat Engineering Co ntent Services
jhradilek@redhat.co m
Do uglas Silas
Red Hat Engineering Co ntent Services
silas@redhat.co m
Martin Prpič
Red Hat Engineering Co ntent Services
mprpic@redhat.co m
Stephen Wadeley
Red Hat Engineering Co ntent Services
swadeley@redhat.co m
To máš Čapek
Red Hat Engineering Co ntent Services
tcapek@redhat.co m
Petr Ko vář
Red Hat Engineering Co ntent Services
pko var@redhat.co m
Miro slav Svo bo da
Red Hat Engineering Co ntent Services
msvo bo da@redhat.co m
Petr Bo ko č
Red Hat Engineering Co ntent Services
pbo ko c@redhat.co m
Peter Ondrejka
Red Hat Engineering Co ntent Services
po ndrejk@redhat.co m
Eliška Slo bo do vá
Red Hat Engineering Co ntent Services
eslo bo do @redhat.co m
Eva Ko palo vá
Red Hat Engineering Co ntent Services
Jo hn Ha
Red Hat Engineering Co ntent Services
David O'Brien
Red Hat Engineering Co ntent Services
Michael Hideo
Red Hat Engineering Co ntent Services
Do n Do mingo
Red Hat Engineering Co ntent Services
Legal Notice
Copyright © 2014 Red Hat, Inc.
T his document is licensed by Red Hat under the
Creative Commons Attribution-ShareAlike 3.0 Unported
License.
If you distribute this document, or a modified version of it, you must provide attribution to Red
Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be
removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section
4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo,
and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux ® is the registered trademark of Linus T orvalds in the United States and other countries.
Java ® is a registered trademark of Oracle and/or its affiliates.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other
countries.
Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or
endorsed by the official Joyent Node.js open source or commercial project.
T he OpenStack ® Word Mark and OpenStack Logo are either registered trademarks/service marks or
trademarks/service marks of the OpenStack Foundation, in the United States and other countries and
are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or
sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Abstract
T he System Administrator's Guide documents relevant information regarding the deployment,
configuration and administration of Red Hat Enterprise Linux 7. It is oriented towards system
administrators with a basic understanding of the system.
Table of Contents
Table of Contents
⁠
P . . . . . . . . . . . . . . . . . . . . . . . . . .
. .art .I. Basic .System.Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 . . . . . . . .
.
⁠
C . . . . . . . System Locale . . . . . . . . . . . . . . . . . . . . . . .
. .hapter. 1. . . . . . . . . . . . . . . and .Keyboard. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 . . . . . . . .
.
⁠
1.1. Setting the System Locale
6
⁠
1.2. Changing the Keyboard Layout
8
⁠
1.3. Additional Resources
9
⁠
C . . . . . . . Configuring the . . . . . . . . . .
. .hapter. 2. . . . . . . . . . . . . . . .Date .and .T.ime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 . . . . . . . .
..
⁠
2.1. Using the timedatectl Command
11
⁠
2.2. Using the date Command
14
⁠
2.3. Using the hwclock Command
16
⁠
2.4. Additional Resources
18
⁠
C . . . . . . . . . . . . . . . . Users . . . . . . . . .
. .hapter. 3. Managing . . . . . . and. Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 . . . . . . . .
..
⁠
3.1. Introduction to Users and Groups
20
⁠
3.2. Using the User Manager T ool
21
⁠
3.3. Using Command Line T ools
25
⁠
3.4. Additional Resources
29
⁠
C . . . . . . Gaining . . . . . . . . .
. .hapter. 4 . . . . . . . . . Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 . . . . . . . .
..
⁠
4 .1. T he su Command
31
⁠
4 .2. T he sudo Command
32
⁠
4 .3. Additional Resources
33
⁠
P . . . . . . . . . . . . . . . . . . . . .
. .art .II. .Package. Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 . . . . . . . .
..
⁠
C . . . . . . . Yum
. .hapter. 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . .
..
⁠
5.1. Checking For and Updating Packages
36
⁠
5.2. Working with Packages
39
⁠
5.3. Working with Package Groups
48
⁠
5.4. Working with T ransaction History
51
⁠
5.5. Configuring Yum and Yum Repositories
58
⁠
5.6. Yum Plug-ins
68
⁠
5.7. Additional Resources
70
⁠
P . . . . . . . . . . . . . . . . . . . . . . . .
. .art .III. Infrastructure. Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 . . . . . . . .
..
⁠
C . . . . . . . Managing . . . . . . . . . . . . . . . . .
. .hapter. 6. . . . . . . . . . .Services.with. systemd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 . . . . . . . .
..
⁠
6.1. Introduction to systemd
73
⁠
6.2. Managing System Services
75
⁠
6.3. Working with systemd T argets
81
⁠
6.4. Shutting Down, Suspending, and Hibernating the System
86
⁠
6.5. Controlling systemd on a Remote Machine
88
⁠
6.6. Additional Resources
88
⁠
C . . . . . . . OpenSSH
. .hapter. 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 . . . . . . . .
..
⁠
7.1. T he SSH Protocol
91
⁠
7.2. Configuring OpenSSH
94
⁠
7.3. OpenSSH Clients
101
⁠
7.4. More T han a Secure Shell
104
⁠
7.5. Additional Resources
105
⁠
C . . . . . . . T . . . . . . .
. .hapter. 8. . .igerVNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 . . . . . . . .
...
⁠
8.1. VNC Server
107
⁠
8.2. VNC Viewer
109
⁠
8.3. Additional Resources
110
1
Zgłoś jeśli naruszono regulamin