(Ebook) Sybex - Linux Apache Web Server Administration (2Nd Edition).pdf

(6198 KB) Pobierz
Linux System Administration
Linux System Administration
282005954.001.png
Table of Contents
Linux System Administration, Second Edition...............................................................................1
Foreword............................................................................................................................................3
Acknowledgments....................................................................................................................3
Introduction........................................................................................................................................4
The Benefits of Linux...............................................................................................................4
Who Should Buy This Book.....................................................................................................5
About the Second Edition........................................................................................................5
How This Book Is Organized...................................................................................................6
Chapter 1: The Basics of System Administration...............................................................6
Chapter 2: Installing Linux..................................................................................................6
Chapter 3: Startup and Shutdown......................................................................................6
Chapter 4: Tools of the Trade............................................................................................7
Chapter 5: Creating and Maintaining User Accounts.........................................................7
Chapter 6: Filesystems and Disk Management.................................................................7
Chapter 7: Linux Files and Processes...............................................................................7
Chapter 8: Software Administration...................................................................................7
Chapter 9: Backup and Restore.........................................................................................7
Chapter 10: Printers and the Spooling Subsystem............................................................7
Chapter 11: Serial Communications, Terminals, and Modems..........................................7
Chapter 12: TCP/IP Linux Networking...............................................................................8
Chapter 13: The X Window System...................................................................................8
Chapter 14: Setting Up Your Mail Server...........................................................................8
Chapter 15: Security..........................................................................................................8
Chapter 16: Performance Tuning.......................................................................................8
Chapter 17: Making Your Job Easier with Scripts..............................................................8
Chapter 18: Troubleshooting Your Linux System..............................................................8
Conventions Used in This Book...............................................................................................9
Help Us Help You..................................................................................................................10
Part I: The Basics.............................................................................................................................11
Chapter Lis............................................................................................................................11
Featuring................................................................................................................................11
Chapter 1: The Basics of System Administration........................................................................12
Overview................................................................................................................................12
Your Role as a System Administrator....................................................................................12
Tasks of a System Administrator...........................................................................................13
Configuring Hardware......................................................................................................13
Installing the Operating System.......................................................................................14
Installing Application Software.........................................................................................14
System Security...............................................................................................................14
Configuring the Kernel.....................................................................................................14
Creating Users and Groups.............................................................................................15
Software Updates.............................................................................................................15
Performance Tuning.........................................................................................................15
Disaster Recovery............................................................................................................15
Capacity Planning............................................................................................................16
Network Administration....................................................................................................16
i
Table of Contents
Chapter 1: The Basics of System Administration
"When You Have a Minute..............................................................................................16
Tools of the Linux Administrator............................................................................................16
Commands.......................................................................................................................17
System Logbook..............................................................................................................18
Communicating with Users..............................................................................................20
Working on the System as Root............................................................................................21
Becoming the Root User..................................................................................................21
In Sum....................................................................................................................................23
Chapter 2: Installing Linux..............................................................................................................24
Overview................................................................................................................................24
Benchmarks...........................................................................................................................24
Selecting Hardware................................................................................................................25
Minimal Acceptable Hardware.........................................................................................25
CPU Performance............................................................................................................25
Random Access Memory.................................................................................................26
Selecting Hardware by Intended Usage...........................................................................27
Specialized Hardware Performance Solutions.................................................................28
Types of Hardware to Avoid.............................................................................................33
Selecting a Linux Distribution.................................................................................................35
Red Hat Linux..................................................................................................................35
Mandrake.........................................................................................................................37
Caldera.............................................................................................................................37
SuSE Linux......................................................................................................................38
Slackware Linux...............................................................................................................38
Debian..............................................................................................................................39
The Choice Is Yours.........................................................................................................39
Installing Red Hat Linux.........................................................................................................40
Preparing for Installation..................................................................................................40
Choosing a Partitioning Scheme......................................................................................41
Installing a Server............................................................................................................42
Installing a Workstation....................................................................................................50
Tying Up Loose Ends.......................................................................................................51
In Sum....................................................................................................................................51
Chapter 3: Startup and Shutdown..................................................................................................52
Overview................................................................................................................................52
The Linux Boot Process.........................................................................................................52
The Master Boot Record..................................................................................................53
Boot Loaders..........................................................................................................................55
GRUB: Definition and Configuration................................................................................55
LILO: Definition and Configuration...................................................................................57
Creating a Boot Floppy..........................................................................................................60
Creating a LILO Boot Floppy............................................................................................60
Creating a Boot Floppy without a Boot Loader................................................................61
Using LOADLIN.....................................................................................................................61
Single−User Mode.................................................................................................................62
Initialization and Startup Scripts.............................................................................................63
The Red Hat Model..........................................................................................................63
ii
Table of Contents
Chapter 3: Startup and Shutdown
The Debian Mode............................................................................................................67
User Initialization Files...........................................................................................................70
Modifying the Startup Procedure......................................................................................71
Startup Log Files..............................................................................................................75
Shutdown...............................................................................................................................76
Warning Users.................................................................................................................76
Shutdown Log Files..........................................................................................................76
In Sum....................................................................................................................................77
Chapter 4: Tools of the Trade.........................................................................................................78
Overview................................................................................................................................78
Locating Help Resources.......................................................................................................78
Man Pages.......................................................................................................................79
Info Pages........................................................................................................................81
Technical Support..................................................................................................................83
Configuration Support......................................................................................................83
Tailored Linux Development............................................................................................84
General Web Support......................................................................................................84
Webmin..................................................................................................................................85
Command−Line Tools............................................................................................................85
The Bash Shel.................................................................................................................86
Basic Commands.............................................................................................................91
In Sum..................................................................................................................................109
Part II: Managing Users, Processes, and Files...........................................................................110
Chapter Lis..........................................................................................................................110
Featuring..............................................................................................................................110
Chapter 5: Creating and Maintaining User Accounts.................................................................111
Overview..............................................................................................................................111
User Accounts......................................................................................................................111
The /etc/passwd File......................................................................................................112
Shadowed Passwords....................................................................................................113
Adding New Users.........................................................................................................116
Modifying User Accounts...............................................................................................118
Disabling User Accounts................................................................................................121
Deleting User Accounts..................................................................................................122
Groups.................................................................................................................................123
The Function of Groups.................................................................................................124
The /etc/group File.........................................................................................................124
Adding New Groups.......................................................................................................126
Modifying Groups...........................................................................................................128
Deleting Groups.............................................................................................................129
In Sum..................................................................................................................................130
Chapter 6: Filesystems and Disk Management..........................................................................131
Overview..............................................................................................................................131
Linux Filesystem Suppor.....................................................................................................131
Locating Filesystems......................................................................................................131
iii
Table of Contents
Chapter 6: Filesystems and Disk Management
Linux Native Filesystems...............................................................................................133
Foreign Filesystems.......................................................................................................137
Network Filesystems......................................................................................................140
Filesystem Design................................................................................................................141
The Physical Structure...................................................................................................141
Inodes and Directories...................................................................................................141
Accessing Filesystems.........................................................................................................142
Mounting and Unmounting Filesystems.........................................................................142
Using Removable Media................................................................................................149
Using Swap Space.........................................................................................................153
Updating and Maintaining Filesystems................................................................................154
Disk Partitioning.............................................................................................................154
Creating a Filesystem....................................................................................................158
Adding a Disk.................................................................................................................159
Replacing a Disk............................................................................................................160
Checking Filesystem Integrity........................................................................................161
In Sum..................................................................................................................................162
Chapter 7: Linux Files and Processes.........................................................................................163
Overview..............................................................................................................................163
The Filesystem Hierarchy Standard.....................................................................................163
Directory Layout.............................................................................................................165
File Characteristics..............................................................................................................167
Determining a Linux File's Type.....................................................................................168
File Types Defined.........................................................................................................170
Processes............................................................................................................................174
The Concept of Multitasking...........................................................................................174
Types of Processes........................................................................................................175
Parent Processes and Their Children............................................................................178
The init Process.............................................................................................................179
Managing Processes......................................................................................................180
Terminating/Restarting with the kill Command...............................................................182
Terminating/Restarting Processes Using Scripts...........................................................183
In Sum..................................................................................................................................184
Chapter 8: Software Administration............................................................................................185
Overview..............................................................................................................................185
Installing Binary Packages...................................................................................................185
Installing an RPM...........................................................................................................185
Installing a Debian Package...........................................................................................189
Installing a Tarball..........................................................................................................190
Compiling Source Code.......................................................................................................191
Compiling from Packages..............................................................................................191
Compiling Tarballs.........................................................................................................192
Kernel Compilation...............................................................................................................194
Why Compile Your Kernel?............................................................................................194
Obtaining a Kernel.........................................................................................................195
Kernel Configuration Options.........................................................................................195
Compiling the Kerne......................................................................................................199
iv
Zgłoś jeśli naruszono regulamin