Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 297 trang
THÔNG TIN TÀI LIỆU
Cấu trúc
Linux System Administration
Table of Contents
Preface
How This Book Is Organized
Conventions Used in This Book
Using Code Examples
Safari® Enabled
How to Contact Us
Acknowledgments
Requirements for a Linux System Administrator
About This Book
How Can We Help?
Where Do You Start?
Do You Need a Book?
Who Needs You?
Help Wanted
Analyzing Skill Sets
What System Managers Should Know About Linux
What’s Next
Setting Up a Linux Multifunction Server
Server Requirements
Installing Debian
Logging in Remotely
Configuring the Network
Changing the Default Debian Packages
Setting Up Quotas
Providing Domain Name Services
Adding a Relational Database: MySQL
Configuring Mail Securely with Postfix, POP3, and IMAP
Putting Apache to Work
Adding FTP Services with ProFTPD
Summarizing Your Web Statistics with Webalizer
Synchronizing the System Clock
Installing Perl Modules Needed by SpamAssassin
What’s Next
The Domain Name System
DNS Basics
Advantages of Localized DNS Administration
Getting into the BIND
Components of BIND
Setting Up a DNS Server
Using a chroot Environment for Security
Configuring an Authoritative DNS Server
Your Responsibility in DNS
The Distributed Method of Resolving Domain Names
Finding a Domain
Answering Queries
Primary and Secondary DNS Servers
Caching-Only Servers
Editing the Configuration Files
named.conf
The Primary Zone File
Enhancements and advanced features
Putting it all together
The Reverse Zone File
PTR records
Testing Lookups
Configuring the Secondary Nameserver
BIND Tools
nslookup
rndc
Troubleshooting BIND
Cannot Connect Using rndc
named Starts but Does Not Resolve Names
Hosts Aren’t Recognized
What’s Next
An Initial Internet-Ready Environment
Installing ISPConfig
Requirements
Getting Started
ISPConfig Directory Structure
Setting Up a Server and Users with ISPConfig
Adding Clients and Web Sites
Managing Users and Email
User, email, home, and public web directories
Email Client Configuration
Safeguarding a Linux Web Server
The Role of a Daemon-Monitoring Daemon
Installing and Configuring monit
What’s Next
Mail
Key Mail Service Terms
Postfix, Sendmail, and Other MTAs
The Postfix SMTP Mail Server on Debian
Debian Postfix-Related Packages
Installing Postfix on Debian
Basic Postfix Configuration
Testing Mail
Adding Authentication and Encryption
SASL Authentication
Configuring Postfix with SASL to authenticate users with accounts
The saslauthd daemon
Configuring Postfix with SASL to authenticate users without accounts
TLS Encryption
Configuring POP3 and IMAP Mail Delivery Agents
Email Client Configuration
What’s Next
Administering Apache
Static and Dynamic Files
A Simple LAMP Setup
Installation
Apache
PHP
MySQL
Apache Configuration Files
Configuration File Directives
User and Group directives
Listen directive
DocumentRoot directive
Authentication and Authorization
User files
Group files
Containers and Aliases
Absolute pathnames: Directory
Relative pathnames: Location
Pattern matching: Files and FilesMatch
Aliases
Limits
Server-Side Includes
CGI
Location
File suffix
PHP Module-Specific Directives
Virtual Hosts
IP-based virtual hosts
Name-based virtual hosts
mod_vhost_alias
Logfiles
Log Splitting and Rotation
Splitting Logs with vlogger
Analyzing Logs with Webalizer
SSL/TLS Encryption
suEXEC Support
Benchmarking
Installing and Administering Drupal
Installing Drupal with apt-get
Installing Drupal from Source
Configuring Drupal
Troubleshooting
Web Page Doesn’t Appear in Browser
Virtual Hosts Don’t Work
SSI Doesn’t Work
CGI Program Doesn’t Run
SSL Doesn’t Work
Further Reading
Load-Balanced Clusters
Load Balancing and High Availability
Load-Balancing Software
IPVS on the Load Balancer
ldirectord
Configuring the Realservers (Apache Nodes)
Configuring the Load Balancer
Testing the System
Adding HA to LB
Adding Other LB Services
Scaling Without LB and HA
Further Reading
Local Network Services
Distributed Filesystems
Introduction to Samba
Configuring the Network
DHCP
Installing DHCP
Starting Your DHCP Service
Providing Static IP Addresses
Assigning IPv6 Addresses with radvd
Gateway Services
Another Approach to Gateway Services
Print Services
Printing Software Considerations
Cross-Platform Printing
Controlling Print Queues from the Command Line
User Management
Removing a User
Sealing the Home Directory
Graphical User Managers
Virtualization in the Modern Enterprise
Why Virtualization Is Popular
High-Performance Computing
Business Continuity and Workload Management
Rapid Provisioning
How Virtualization Helps
Installing Xen on Fedora 5
Installing a Xen Guest OS
Fedora Core 5
Other guests
Installing VMware
Installing a VMware Guest OS
Virtualization: A Passing Fad?
Scripting
bash Beginnings
Pathnames and Permissions
The Default Path
I/O Redirection
Variables
Useful Elements for bash Scripts
Expressions
Arithmetic
If...
Troubleshooting a Simple Script
Loops
cron Jobs
Scripting Language Shootout
Data Format: The /etc/passwd File
Script Versions
The bash script
The Perl script
The PHP script
The Python script
Choosing a Scripting Language
Further Reading
Backing Up Data
Backing Up User Data to a Server with rsync
rsync Basics
Making a User Backup Script
Listing Files on the Backup Server
Restoring Lost or Damaged Files
Automated Backups
tar Archives
Creating a New Archive
Extracting from an Archive
A Complete Example of Packing and Unpacking with tar
Summary
Saving Files on Optical Media
Accessing Your CD-R Drive
Setting Defaults
Preparing Files to Record on a CD-R
Recording the CD-R
Verifying the Recording
Backing Up and Archiving to Tape with Amanda
Installing Amanda
Configuring Amanda
Restoring Files Backed Up by Amanda
Backing Up MySQL Data
bash Script Samples
Adding Users
Random Password Generator
Authoritative DNS Lookup
Sending Files Between Shell Sessions
Integrating ssh and screen
Index
Nội dung
[...]... years ago, most Linux system administrators would have told you that they didn’t choose their careers Linux chose them In the old days, Linux was like an adolescent Unix Most Linux system administrators learned the ropes on single workstations and very small networks Linux inherited some servers from Unix (BIND, Sendmail, Apache), but little office software and few applications Today, Linux system administration... lack information about Linux They do not know what Linux professionals should know, and Linux professionals rarely understand those managers Many information system managers who understand Unix attempt to hold Linux administrators to Unix standards That rarely works While Unix administrators may believe they can easily transition to Linux, they quickly discover a knowledge gap Linux administrators have... this book The threshold to a new Linux world awaits you and your server So, let’s get started! Server Requirements You can use almost any distribution of Linux to configure a web server In this exercise, we’ll use Debian We chose Debian because we wanted to use a stable distribution of Linux The main commercial distributions—Red Hat Enterprise Linux and Novell’s SUSE Linux Enterprise Server—have price... Password: enter password for admin user here Linux server1 2.6.8-2-386 #1 Thu May 19 17:40:50 JST 2005 i686 GNU /Linux The programs included with the Debian GNU /Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright 12 | Chapter 2: Setting Up a Linux Multifunction Server Debian GNU /Linux comes with ABSOLUTELY NO WARRANTY,... without your total support Preface | xiii Chapter 1 CHAPTER 1 Requirements for a Linux System Administrator We like Linux Of all the Unix and Unix-like systems we’ve used, many now forgotten,* Linux is our favorite It’s an excellent server platform, a good desktop, and the center of much innovation in the current computing world Linux probably has the broadest reach of any operating system, from tiny systems... engineering, few schools offer courses in Linux administration, let alone entire degree programs So, if you want to learn Linux system administration, you will have to look for materials and courses outside the university setting But much of the existing materials you may find will not include what Linux strategists consider the most critical subject matter Most Linux administrators have taught themselves,... anything a system administrator had to do This is one area where Linux System Administration can contribute, helping you achieve proficiency in a broad range of tasks faster and more efficiently What System Managers Should Know About Linux One of the first things an information technology manager should know is that Linux is not Unix While Linux can certainly run the vast majority of Unix programs, it... booting up the system, “catalog” for a directory, and “command list” for a shell script But don’t sell Linux administrators short We once attended a two-day seminar with a group of Linux administrators who went out the day after the class and started deploying Linux on bare-metal IBM zSeries computers If Linux people have anything to offer, it’s that they learn quickly, adapt quickly, and have a broad... capabilities of Linux as an application platform If you use Linux and want to take the next step from a power user to an administrator, this book will help you make the transition We wrote this book with you in mind How This Book Is Organized Chapter 1, Requirements for a Linux System Administrator Lays out the goals of the book and what you’ll gain by reading it Chapter 2, Setting Up a Linux Multifunction... revolves around Exim, while other Linux distributions generally use Sendmail by default Sendmail has long been the de facto standard MTA, and early Linux distributions took advantage of that Nearly all processes in Linux related to mail involve Sendmail configuration files, and most free software applications expect Sendmail to exist on the operating system It’s possible to fool Linux into thinking it’s using . Guide Running Linux LPI Linux Certification in a Nutshell Linux Server Hacks ™ Linux Security Cookbook ™ Linux Books Resource Center linux. oreilly.com is a complete catalog of O’Reilly’s books on Linux. w0 h1" alt="" LINUX SYSTEM ADMINISTRATION Other Linux resources from O’Reilly Related titles DNS and BIND Linux in a Nutshell Linux iptables Pocket Reference Linux Pocket Guide Linux Network Administrator’s. years ago, most Linux system administrators would have told you that they didn’t choose their careers Linux chose them. In the old days, Linux was like an adolescent Unix. Most Linux system administrators