Table of Contents
Acknowledgments xviii
Check-In xix
Installing and Configuring Linux 1
Basic Installation 3
Determine Customer Needs 4
The History of Linux 4
What Applications Linux Can Include for Clients 5
What Server Services Can Be Installed 6
Selecting a Distribution 6
Identify Required Hardware 7
Basic Hardware 8
Required Space 8
Scalability 9
Understand That Linux Is Just the Kernel 9
Numbering Schemes 9
Upgrades 10
Custom Kernels 10
Determine the Appropriate Installation Method 11
Boot Method 11
Local Source 12
Network Source 13
Define Multimedia Options 14
Video 14
Sound 15
Codecs 16
Identify Machine Requirements 16
Packages and Package Groups 16
Appliance 18
Functional Server 18
Desktop 19
Checkpoint 19
Review Questions 20
Review Answers 22
Configuring During and After Installation 23
Select Appropriate Parameters for Installation 24
Language 25
Keyboard 26
Pointing Device 26
Time Zone 27
Partition with fdisk and More 27
Appropriate Directories for Dedicated Partitions 27
RAID Configuration 28
Logical Volume Management Configuration 30
Other Partition Management Tools 31
Configure a Filesystem 31
Standard Linux Filesystems 31
Other Filesystems 33
Understand and Reinstall a Boot Manager 33
The Linux Loader (LILO) 34
The Grand Unified Bootloader (GRUB) 35
Other Bootloaders 37
Identify Network Configuration Issues 37
Network Fundamentals 37
IP Addresses 38
Connecting to a LAN 39
Connecting via Telephone Modern 40
The Internet Super Server 41
Configure Peripherals as Needed 41
Printers 41
Scanners 42
Other Devices 42
Perform Post-Installation Package Management 42
Installing New RPM Packages 43
Upgrading RPM Packages 43
Installing from a Compressed Tarball 44
Checkpoint 45
Review Questions 46
Review Answers 48
Managing Linux Users, Files, Packages, Processes, and Services 49
Managing Files and Directories 51
Work with Files and Directories 52
Basic Navigation 53
Using the find and locate Commands 57
Searching with grep 59
Comparing with diff 59
Create Files and Directories 60
Creating Files with touch 60
Creating Files with cp 60
Modifying Filenames with mv 61
Deleting Files with rm 61
Creating and Removing Directories with mkdir and rmdir 62
Manage Text Files 63
File Reading Commands 63
The Stream Editor, sed 65
The awk Text Manipulation Tool 65
The Visual Editor 65
Create Linked Files 68
Hard Links 68
Soft Links 68
Modify Ownership and Permissions 69
File Ownership 69
Changing Ownership with chown and chgrp 70
Defining Permissions, Octally 71
Changing Permissions with chmod 72
The SUID, SGID, and Sticky Bits 73
Defining Default Permissions with umask 74
Shell Command Management 75
Standard Output 75
Standard Input 76
Error Output 76
Quotes in the Shell 76
Interactivity 78
Command Completion 79
Escaping Special Characters 79
Create, Modify, and Run Basic Scripts 80
Shell Script Examples 80
Making a Shell Script Executable 81
Checkpoint 81
Review Questions 82
Review Answers 84
Media, Process, and Package Management 87
Manage Storage Devices and Filesystems 88
The Filesystem Hierarchy Standard 88
Configuring with fdisk 90
Checking with fsck 91
Formatting with mkfs 92
Tuning with tune2fs 93
Mount Locally and Remotely 93
Mounting on Your Own 94
Mounting a Shared NFS Directory 94
Mounting a Shared Samba/CIFS Directory 94
Back Up and Restore Data 95
Tape Archives and Compression with tar 95
Input and Output with cpio 96
Use Recordable Media 96
Mounting Devices 97
Writing to CD/DVDs 98
Manage Runlevels 99
The Boot Process 99
Setting the Default Runlevel 100
Changing Runlevels 101
Services in Each Runlevel 101
Other Initialization Scripts 101
Learn Process Management 101
Process Collections with ps 101
Core Kernel and init Processes 102
Stopping and Restarting a Job 103
Load Monitoring with top 105
Listing Open Files with Isof 105
Changing Job Priorities 106
Identify Package Problems and Solve with Updates 107
Importing the Keyfile 107
Identifying a Problem 108
Dependency Resolution 108
Package Updates 110
Checkpoint 110
Review Questions 111
Review Answers 113
User and Service Management 115
Understand Network Troubleshooting 116
Confirming Connectivity with ping 116
Reviewing Network Connections with netstat 117
Tracing a Network Path with traceroute 118
Administer with Remote Management Tools 119
The "r" Commands 120
The Secure Shell 121
Configure Printer Systems 122
The Line Printer Daemon 122
The Common Unix Printing System 123
Running a Print Job 124
Checking Print Queues and Spools 124
Removing Print Jobs 125
Control Mail Servers 126
Basic sendmail 126
Basic Postfix 127
Understand Text-based Mail Clients 127
The mail Client 127
The mutt Client 128
Administrative Job Management 129
Standard and User cron Jobs 129
Creating an at Job 131
Manage User Accounts 132
User and Group Configuration Files 132
Adding User Accounts in Configuration Files 134
Adding Users and Groups from the Command Line 135
User and Group Management Commands 135
Managing Users and Groups with Quotas 137
Configure the Network Information Service 138
Basic NIS Client Configuration 138
NIS Commands 138
Common File Management 139
Checkpoint 140
Review Questions 140
Review Answers 142
Configuring Linux Clients and Servers 145
Basic Client Configuration 147
Set Up Environment Variables 148
Configure Mounted Directories 149
Editing/etc/fstab 150
Configuring Local Mounts in/etc/fstab 153
Configuring Network Mounts in/etc/fstab 154
/etc/mtab 155
Work Client Network Settings 155
Network Client Commands 155
Network Client Configuration Files 157
Manage a Network Card 158
Running ifconfig 158
Associated Configuration Files 159
Dynamic IP Configuration 161
Implement Name Resolution 161
/etc/hosts 162
Name Resolution Order 162
Remote DNS Services 163
Testing DNS Databases 163
Work with Log Files 165
As Defined in /etc/syslog.conf 165
Logs in the /var/log Directory 167
Log Rotation 168
Set Up Remote Logging 169
Use Makefiles 169
Compiling Drivers and Other Packages 170
Compiling a Kernel 170
Configure the X Window System 171
The X Window Server, Old and New 171
Different Meanings for Client and Server 172
X Window Configuration Tools 172
The X Window Configuration File 174
X Window Management 174
Configuring the X Window System from the Command Line 174
Checkpoint 175
Review Questions 176
Review Answers 178
Basic Server Configuration 181
Implement Basic Routing and Subnetting 182
Managing Routing Tables 182
IP Forwarding 183
IP Masquerading 184
Configure Basic Network Server Services 186
Domain Name Service 186
Dynamic Host Configuration Protocol 190
Squid 191
Configure Samba 192
The Basic Configuration File 193
Stanzas and Directives 194
Samba Configuration Commands 195
Configure Apache 197
The Structure of Apache Directories 197
Associated Configuration Files 198
Apache Command Controls 201
Set Up Linux Print Services 202
The Line Printer, Next Generation Service 202
The Common Unix Printing System 203
Sharing Printers with Samba 206
Apply Basic Printer Permissions 208
Limiting Access by Address 208
Limiting Access by User 208
Checkpoint 209
Review Questions 210
Review Answers 212
Securing Accounts and Services 215
Security and Users 217
Manage User Accounts 218
Deactivating Accounts 218
Deleting Accounts While Keeping the Data 220
Deactivating Regular Accounts 221
Changing Groups 221
Control Administrative Accounts 222
Regular and Administrative Accounts 223
Temporary Administrative Access with su 223
Administrative Privileges with sudo 224
Set Up Security Environment Files 225
Users as Administrators in /etc/sudoers 225
Secure Shell Limits 226
Pluggable Authentication Module User Limits 228
FTP Access with ftpusers 230
Server Limits with /etc/hosts.allow and /etc/hosts.deny 231
Work with Special File Permissions 232
Identifying Files with Specialized Permissions 233
Preventing Specialized Permissions 233
Immutability Protects Files 234
Special Group Directories 235
Configure Password Policies 236
The Shadow Password Suite 236
Password Aging 237
Account Aging 237
PAM and Password Complexity 238
Promote User-level Security 239
Login Limits 239
Memory Usage and Process Limits with ulimit 241
Checkpoint 242
Review Questions 243
Review Answers 245
System Security 247
Configure Encryption 248
Shadow Passwords 249
Password Strength 250
Disk Encryption 250
Other Encryption Schemes 250
Detect Intrusion Attempts 252
Logging Logins 252
Other Log Files 253
The w and who Commands 253
Checking Up on Users with last and utmpdump 254
Understand Intrusion Detection Systems 255
Snort 256
PortSentry 256
Command-line Monitoring 257
Decipher Basic Firewall Configurations 258
Common Ports 259
Configuring iptables 260
Audit Key Security Files 264
Security-related /etc/ Configuration Files 264
The Internet Super Server 264
Security Logs 266
Other Security Configuration Issues 266
Identify File Corruption 267
Verifying with rpm 267
Running Tripwire 268
Checking Download Integrity 268
Checkpoint 269
Review Questions 270
Review Answers 271
An Overview of Linux Documentation 273
Documentation and Configuration 275
Document a System Performance Baseline 276
Display Linux Performance with top 276
System Activity Reports with sar 277
Memory Statistics with vmstat 278
Review the Process Tree with pstree 278
Create Installation, Configuration, and Security Management Procedures 280
Document the Installation Configuration 280
Back Up Configuration Files 280
Set Up Security Procedures 281
Document the Installed Configuration 281
Find the Package List 281
Document Compiled Package Options 284
Documented Hardware 284
Set Up Consistent Networking 285
Create Maintenance Procedures 285
When to Update the Kernel 285
Troubleshoot System and Application Errors with Logs 286
Monitoring Logs with head and tail 286
Searching Through Logs with grep 286
Access System Documentation 287
Command Manuals 287
Package Documentation 288
Online Documentation 289
Licensing 289
Checkpoint 290
Review Questions 290
Review Answers 292
Hardware Issues 295
Hardware on Linux 297
Describe Common Hardware Components 298
Connectors 298
Basic Hardware Channels 299
Module Management 302
Hardware Compatibility Lists 303
Diagnose Hardware Issues 304
Hardware Detected in /proc 304
Using Disk Utilities 304
Using a Live CD as a Rescue Disk 305
Network Hardware 306
Hardware Detection Commands 307
Reviewing Device Files 307
Reviewing dmesg Output 308
Kernel Hardware Boot Parameters 309
Understand Hardware Power Management 310
Working with Advanced Power Management 310
Managing the Advanced Configuration and Power Interface 311
Identify and Configure Removable System Hardware 311
PC Cards 312
USB Devices 312
IEEE 1394 Devices 312
Identify and Configure Mass Storage Devices 313
Hard Drives 313
Floppy Drives 315
Tape Drives 315
Flash Memory Devices 316
CD/DVD Drives 316
Checkpoint 316
Review Questions 317
Review Answers 319
Appendixes 321
About the CD-ROM 323
Mike Meyers' Certification Passport CD-ROM Instructions 323
System Requirements 323
Installing and Running Wine 323
Installing and Running MasterExam 324
MasterExam 327
Help 328
Removing an Installation 328
LearnKey Technical Support 328
Content Support 328
Career Flight Path 329
Red Hat Certifications 329
Red Hat Certified Technician (RHCT) 329
Red Hat Certified Engineer (RHCE) 330
Red Hat Certified Security Specialist (RHCSS) 330
Red Hat Certified Datacenter Specialist (RHCDS) 330
Red Hat Certified Architect (RHCA) 331
Novell/SUSE Certifications 331
Novell Certified Linux Professional (CLP) 332
Novell Certified Linux Engineer (CLE) 332
Linux Professional Institute (LPI) 332
LPI Level 1 333
LPI Level 2 333
LPI Level 3 333
Installing CentOS-5, Step by Step 335
Download CentOS-5 335
Install CentOS-5 336
Testing Linux with VMware 343
Acquiring VMware Server 344
Installing VMware Server on Microsoft Windows 345
Installing VMware Server on Ubuntu Dapper Drake 346
Preparing VMware for Linux Installation 348
VMware Snapshots 352
Glossary 353
Index 377