Linux System Administration: A User's Guide

Marcel Gagné

  • 出版商: Addison Wesley
  • 出版日期: 2001-09-28
  • 定價: $1,900
  • 售價: 8.0$1,520
  • 語言: 英文
  • 頁數: 560
  • 裝訂: Paperback
  • ISBN: 0201719347
  • ISBN-13: 9780201719345
  • 相關分類: Linux
  • 立即出貨(限量) (庫存=2)



"Gagne is clearly an insider in the Linux community, familiar with both the technical details and the culture, which sets this book apart from others in the field."

--Joseph Sloan, Lead System Administrator, Mirai Consulting

This comprehensive, hands-on guide to Linux system administration provides you with the deeper understanding of the inner workings of Linux and the pragmatic techniques you need to become an outstanding Linux system administrator--whether you are a career administrator in a corporate environment or simply administering your home system.

Written both for those who are new to Linux and those who are already proficient and wish to hone their skills, Linux System Administration starts with the basics and builds up to more sophisticated material.

You will find complete coverage of all major system administration topics:

  • Linux versus UNIX
  • Installation tips and tricks
  • Working effectively with the Linux command line
  • Organizing and working with system users
  • Disks, file systems, backup, and restore
  • The inner workings of X and the graphical desktop
  • Configuring and using scanners, CD-Recordables, and other devices
  • Internet connectivity
  • Finding, building, and installing software
  • Kernel building and renovation
  • Scripting and automation
  • Network administration, electronic mail, and Web services
  • Integrating Windows with Linux
  • System logs and accounting
  • Security and firewalls
  • Performance monitoring and tuning

Using standard Linux tools (PostgreSQL, Apache, Perl, and more) this book will help you deploy a feature-rich corporate intranet featuring online discussion groups, bulletin boards, a company phone directory, and a document center. You will also learn everything you need to know to install a complete electronic mail and Internet gateway solution for your home or office on a single, shared connection. In addition, numerous anecdotes from the trenches, examples of techniques to try, and plenty of experience-based advice bring important concepts to life.

Written with good humor and enthusiasm for the profession of system administration, as well as a deep appreciation for the power and flexibility of Linux, Linux System Administration will teach you the tricks of the trade, guide your efforts, and serve as a definitive and comprehensive reference.

Table of Contents

1. Introduction.

What Is Linux?
Why Linux?

The System Administrator's Job.
About This Book.
The Command Line Rules!
GUIs Rule!
Is There Anything You Can't Do with Linux?
Regrets, I've Had a Few....

2. Linux versus Linux versus UNIX.

The UNIX Question.
The Windows Question
A Question of Distribution.
So Which Linux Distribution Should You Choose?
Red Hat Linux.

Getting Linux.
Getting Others to Try Linux.
Sharing Space with Windows.
How about No Disk Space At All?

A Changing Landscape.

3. Help (and the Truth) Is Out There.

Documentation and Man Pages
What If You Don't Know the Command Name?
Show Me the PATH, man!
Graphical Man Pages.

info (the Command, That Is).
HOWTOs and Distributed DOCs
The Linux Documentation Project
Linux User Groups.
Usenet News.

4. Linux System Installation.

Getting Ready for Your Installation.
Hardware Considerations.
Passing Boot Options
Dual Booting.
The 12 (13, 14, 15...) Steps to Any Installation.
Step 1: Booting.
Step 2: Selecting the Installation Type.
Step 3: Selecting a Language (Parlez-vous Francais?).
Step 4: Choosing a Keyboard Type.
Step 5: Selecting Your Mouse.
Step 6: Selecting a Time Zone.
Step 7: Creating a Partition
Step 8: Formatting the Partitions.
Step 9: To LILO or Not to LILO.
Step 10: Choosing and Installing Software Packages.
Step 11: Configuring the Network.
Step 12: Identifying Yourself.
Step 13: The Dreaded X Window Configuration.
Step 14: The Boot Disk Question.

The (Emergency) Boot Disk.
Starting Linux.
Shutting Down Linux.

5. Taking Command of Linux.

Linux Commands: Love at First Sight.
Working with Files.
File Naming Conventions.
Listing Files with Emotion!
File Permissions: A First Look
Making Your Life Easier with alias

Standard Input and Standard Output
tee: A Very Special Pipe.
The Road to Nowhere

Linux Commands: Working with Directories.
There's No Place Like $HOME
More on File Permissions
User and Group Ownership.
Who Can Do What?
Who Was That Masked User?
The setuid Bit

File Attributes
Finding Anything
grep’ping for Dollars (or Anything Else for That Matter) and Piping.
Forests and Trees.
Interrupting, Suspending, and Restarting Processes.

Killing Processes.
“I Am vi, the Great and Powerful”
:q, :w, :wq, and ZZ
Recovering a VIM Session
Power vi: Start-up Options.

Pico: A kinder, gentler editor.

6. Daemons and Runlevels.

Daemons and Other Not-So-Scary Things.
The inittab File.
The rc.local File and Runlevels.
Switching between Runlevels
The chkconfig Command.

Runlevels the Graphical Way.
The (Not) Last Word.

7. Users and Groups.

Living in a Multiuser World.
When Not to Use the root User.
Managing Users
Managing Groups
Adding Groups.
Modifying Groups.
Removing Groups.

Adding Users
About Home Directories.
Group Participation.
E-mail-Only Accounts
Yet More User-Creation Controls.

Modifying a User Account.
Deleting a User Account
Checking the Password File
User and Group Administration the GUI Way.
Choosing Good Passwords
How Crackers Crack Your Passwords.
Choosing Better Passwords.

What Next?
I Logged In from Where?
How Not to Be a “Sucker” .

8. Disks and File Systems.

Everything Is a File.
Understanding Your File Systems.
The File System Tree.
The Root File System (aka /, or Slash).
The /usr File System.

The /var File System
The /tmp File System
The /proc File System
The /lost+found File System.
fsck: The File System Check and Repair Tool.
Bad Superblock?

How Much Space Have I Got Again?
What's This about Inodes?
Mounting and Unmounting File Systems.
Creating File Systems.
Using the New File System.

Working with Quotas
Getting Ready for Quotas.
Turning Quotas On and Off
Setting Limits.
Back to Grace
Letting the Users Know.


9. X and the Graphical Desktop.

It's Just Window Dressing, Right?
Graphical Login Managers
Working without a Graphical Login Manager.

The World beneath the Surface.
The xinitrc File.
The .xserverrc File
The Xresources File
Specifying Resources on the Command Line.

Look, Ma! I Can Run Multiple Desktops!
Backing Up and Restoring the Desktop
Running X Applications Remotely
Choosing a Window Manager
The Tab Window Manager (twm).
Window Maker.
Tweaking X and Dealing with Problems.
Key Mapping.
Tuning Video Modes with xvidtune.
The “Messed Up” X Session.

Screen Captures

10. Dialing Up to the Internet with PPP.

The Basics.
What You Need from Your ISP.
Where the Information Goes

The Graphical Alternative.
Automagic PPP Connections.


11. Finding, Building, and Installing Software.

Finding Software and Software Review Sites.

Installing and Building Software.
Compiling from Source.
Step 1: Unpacking the Archive.
Step 2: Building Your Programs.

Downloading and Installing Perl Modules.
Package Managers.
Updating or Installing Packages on a Debian System.
Great, but Can You Tell Me What Is Already There?
Finding Out a Package's Current Release Level
What Is That Strange File?
Using apt-get to Install or Update Software.
Educating apt-get.
Graphical Alternatives.

Red Hat Package Manager.
Installing an RPM Package.
Upgrading an RPM Package.
Uninstalling an RPM Package.
Everything You Ever Wanted to Know about an RPM Package, but Were Afraid to Ask.
RPM: The Graphical Alternatives.

installpkg: Slackware's Lonely Child.

12. Kernel Building and Renovation.

What Is This Kernel, Anyhow?
When Should I Rebuild My Kernel?
Downloading and Building a New Kernel.
Automatic Build and Install
What about the 2.4 Kernel?

13. Printers and Printing.

Selecting Printers for Linux (and a Note about “WinPrinters” )
How Printing Works.
HP JetDirect Adaptors.
Printer Job Control.
Printing Anything to Any Printer.
Tying It Up: Advanced Filters with Ghostscript.
Why PostScript?
A Few PostScript Tricks.
Alternative Print Systems.
Miscellaneous Tips and Tricks.

14. Scripting and Scripting Languages.

Shells As Far As the Eye Can See.
It's Commands All the Way Down.
Passing Parameters.
A First Look at Variables.
More on Variables
Special Characters.
Really Programming the Shell.

Specifying the Shell.
Perl in Action: A Script for Monitoring Disk Space.

Other Languages Worthy of Consideration.

15. Simplified Administration through Automation.

Constructive Laziness.
cron: Punching Linux's Clock.
Testing Your Job.
Editing the crontab.

Could I See an Example?
Running Jobs with at
A Question of Permissions.
Other Tools for Automation.
Automatic Downloads: ncftp.
Automatic Web Fetch: wget.
Scripting for Interactive Sessions: expect.
Automating Interactive Automation.

16. Devices, Devices, and More Devices.

Creating Device Definitions.
Major Minor

SCSI versus IDE
Why Choose One over the Other?

CD-ROMs and CD-RWs
The Graphical Way to Burn

Back Ends.
Front Ends.

Tape Drives.
Other Tape Formats.

Miscellaneous Devices.

17. Backups and Restores.

The Need for Backups
Basic Tools in Every Linux System.
Using cpio.
Working with tar
Backing Up Windows Workstations.
Selecting a Backup Medium.
Backing Up with dump
Restoring with (You Guessed It) restore.

Identity Backups.
Backing Up to a CD-RW
Backups the Graphical Way.
Taper: A Text-Based Backup Utility.
Kdat: Graphical and Free

Commercial Solutions.

Other Considerations.
Final Words

18. Network Administration.

The Light-Speed Introduction to TCP/IP (Act 18, Scene 1).
Protocols and Suites.

Services and Ports
IP Addresses, Networks, and Subnets, Oh My!
What Are Domains?
IP Addresses and Networks
Subnets, Netmasks, and Broadcast Addresses.

Setting Up Your PC Network (Act 18, Scene 2).
Setting the IP Address.
Using netstat

Domain Name Services (Act 18, Scene 3).
The /etc/hosts File

Will the Real DNS Please Stand Up.
Setting Up Your Own Name Server.
Defining Your Domain
The /etc/named.conf File.
Listing of /etc/named.conf.
Your Own Zone File
And Now the Reverse DNS Zone.
Does It Work?
What's All This about “Lame Servers” ?
Who Gets to See the Information?
DNS Wrap-up

File Sharing Under Linux (Act 18, Scene 4).
Network File System.
How Does NFS Work?
Making a Remote File System Available.
Mounting an NFS Partition
Specifying Mounts with /etc/fstab

Simplifying Network Mounts with Linux autofs.
Network Information Service (Act 18, Scene 5).
Configuring the NIS Master Server.
Configuring the NIS Client.
The /etc/nsswitch.conf File.

Miscellaneous Network Tricks: Time Synchronization.

Wait! What about the GUIs?

19. Tools, Tools, and More Tools.

The Web Browser Angle.

Graphical Administration Tools.
Tiny but Powerful Tools.
Go-Anywhere Linux

The Tiny Conclusion.
There's No Control Like Remote Control.

20. Proof of Concept, Part 1.

Of Web Servers and Intranets
Building Your Own Corporate Portal.
Building Apache from Source.
Basic Apache Configuration.
Common Changes

The Basics of Web-Connected Databases.
An Introduction to PostgreSQL.
Perl DBI and DBD for Database Access.
Downloading and Installing the Modules.

The CGI Back End
The Face of the Intranet
Protecting Certain Pages.


21. Proof of Concept, Part 2.

The Connected Office, Linux Style
What to Look for in an ISP.
Setting Up Your ISP Dial-up Connection with diald.
Automatic Remote Mail Pickup with fetchmail
IP Forwarding and Masquerading.
DNS Revisited.
Putting It All Together.
Basic Firewall Services.
Setting Up the Mail Server with Linux.
Defining the Network.
The Components

Setting Up the POP3 Server.
Setting Up sendmail.
Stopping and Restarting sendmail.
Your DNS Setup.

Setting Up Users and Aliases.
Setting Up Your Client MUAs.
Let’s Send Some Mail

Not-So-Stupid sendmail Tricks
The Multiple Domain, Similar Address Dilemma.
The Multidrop Domain.

Stop the Spam!

22. Integrating Windows with Linux.

An Introduction to Samba.
Getting and Building Samba.
A Note on Passwords.
Configuring the Server.
The PC Side
Printing with Samba
Printing from the Windows Client.

The GUI Way to Administer Samba.
Backing Up Windows Workstations.
Running Windows on Linux.


23. System Logs and Accounting.

Your System Logs.
Looking at Your Log Files.
What the Names Mean
Cleaning Up and What the Numbers Mean.
syslogd: The Master Logger.
Back to the logger Program.
Automating the Log-Checking Process.
Web Site Log Analysis.
The Webalizer.


24. Secure Computing.

A Brief History of Encryption.
Personal Encryption
An Introduction to the Secure Shell.
What Are Your Options?

Secure Sockets Layer.
OpenSSH (Right Back Where You Started).
Secure File Transfers.

PGP and GnuPG.
Graphical Front Ends to GnuPG.

Building Trust Relationships.
Encrypting Electronic Mail.

Building a Secure Web Server.
Building the SSL-Enabled Apache Server.

25. Security: The Battle for Your System.

What Is a “Script Kiddie” ?
The Basics: Your TCP Wrappers.
What Your TCP Wrapper Is Telling You.
“Hey, My Logs Have Nothing in Them!”
Detecting the Cracker.
The Cracker's Not-So-Invisible Footsteps.
More Thoughts If You Have Been Cracked.
Port Scanners, Sniffers, and the Cracker's Tools.
PortSentry: Active Intrusion Detection and Response.
ipchains and Firewalls.
Quick and Easy Firewall Solutions.
Locating the Cracker and Reporting Him or Her.
Keeping Up-to-Date.

26. Performance Monitoring and Tuning.

The Search for the Holy Grail.
Monitoring and Analyzing Performance.
The uptime Command.
The top Command

Graphical tops.
The free Command
Working with vmstat
What about Good Ol' ps?

Performance Enhancing Tweaks.
/proc Revisited.
File System Tweaks.
Improving Disk Drive Performance.
Do-It-Yourself Benchmarks.

Appendix A: The All-Linux Office?
Appendix B: The GNU General Public License.


- Joseph Sloan,Mirai Consulting首席系統管理員



- Linux與UNIX的比較
- 安裝技巧和訣竅
- 有效使用Linux命令行
- 組織和管理系統使用者
- 磁盤、文件系統、備份和還原
- X和圖形桌面的內部運作
- 配置和使用掃描儀、CD-Recordables和其他設備
- 網際網路連接
- 尋找、構建和安裝軟體
- 內核構建和更新
- 腳本和自動化
- 網路管理、電子郵件和網頁服務
- 將Windows與Linux整合
- 系統日誌和帳務
- 安全性和防火牆
- 效能監控和調優



1. 簡介
- 什麼是Linux?
- 為什麼選擇Linux?
- 系統管理員的工作
- 本書概述
- 命令行的規則!
- 圖形界面的規則!
- 靈活性
- Linux有什麼不能做的嗎?
- 我有一些遺憾...
- 資源

2. Linux vs Linux vs UNIX
- UNIX的問題
- Windows的問題
- 發行版的問題
- 那麼,您應該選擇哪個Linux發行版?
- Red Hat Linux
- SuSE
- Caldera
- Mandrake
- Slackware
- Debian
- Turbolinux
- 獲取Linux
- 讓其他人嘗試Linux
- 與Windows共享空間
- 那麼沒有磁盤空間怎麼辦?
- 不斷變化的局勢
- 資源

3. 幫助(和真相)在那裡
- 文件和手冊
- 如果您不知道命令名稱怎麼辦?
- 顯示PATH
- 圖形手冊
- info命令
- HOWTO和分佈式文檔
- Linux文檔項目
- Linux```