Tải bản đầy đủ (.pdf) (982 trang)

CentOS Bible docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (19.01 MB, 982 trang )

www.it-ebooks.info
CentOS Bible
www.it-ebooks.info
www.it-ebooks.info
CentOS Bible
Timothy Boronczyk
Christopher Negus
Wiley Publishing, Inc.
www.it-ebooks.info
CentOS Bible
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-48165-3
Manufactured in the United States of America
10987654321
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted
under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written per-
mission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copy-
right Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley
& Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at
/>Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or
warranties with respect to the accuracy or completeness of the contents of this work and specifically dis-
claim all warranties, including without limitation warranties of fitness for a particular purpose. No war-
ranty may be created or extended by sales or promotional materials. The advice and strategies contained


herein may not be suitable for every situation. This work is sold with the understanding that the pub-
lisher is not engaged in rendering legal, accounting, or other professional services. If professional assis-
tance is required, the services of a competent professional person should be sought. Neither the publisher
nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is
referred to in this work as a citation and/or a potential source of further information does not mean that
the author or the publisher endorses the information the organization or Web site may provide or recom-
mendations it may make. Further, readers should be aware that Internet Web sites listed in this work may
have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department
within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317)
572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
notbeavailableinelectronicbooks.
Library of Congress Control Number: 2009926357
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons,
Inc. and/or its affiliates, in the United States and other countries, and may not be used without written
permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not
associated with any product or vendor mentioned in this book.
Disclaimer: This eBook does not include ancillary media that was packaged with the
printed version of the book.
www.it-ebooks.info
About the Authors
Timothy Boronczyk is a native of Syracuse, NY, where he works as a software developer by
day and a freelance developer, writer, and technical editor by night. He has been involved in
web design since 1998, with Linux since 2001, and over the years has written several articles
and tutorials. Timothy holds a degree in software application programming. In his spare time,
he enjoys photography, hanging out with his friends, and sleeping with his feet hanging off the
end of his bed. He’s easily distracted by shiny objects.
Christopher Negus is the author of the best-selling Red Hat Linux Bible series,aswellas
the author of Linux Toys, Linux Toolbox series, Linux Troubleshooting Bible, Linux Bible 2009

edition, and dozens of other UNIX and Linux books. Chris is a Red Hat Certified Engineer
(RHCE, cert #805008815534875), instructor (RHCI), and examiner (RHCX). Since 2008, Chris
has been employed by Red Hat, Inc. as an instructor, teaching RHCE-track courses. Earlier in
his career, Chris worked for eight years on development teams for the UNIX operating system at
AT&T, where UNIX was created and developed.
About the Technical Editor
Ralph Angenendt has been working as a system and network administrator since 1998. After
being introduced to Linux in 1995, Ralph’s interest in non-UNIX-like operating systems has
dropped dramatically, so his work environment mostly consists of Linux servers.
Besides having a sweet tooth for domesticating wild mail servers, Ralph also has a strong interest
in automated system administration. Because of that he set up cfengine at his current employer
to ease the pain of administrating a growing site.
Since 2006, Ralph has been a member of the CentOS development team, where he leads the
documentation force and does some infrastructure management. He might be met at a few Open
Source conventions in Europe, largely Germany and the Benelux countries.
www.it-ebooks.info
www.it-ebooks.info
Credits
Acquisitions Editor
Jenny Watson
Development Editor
Tom Dinse
Technical Editor
Ralph Angenendt
Production Editor
Daniel Scribner
Copy Editor
Cate Caffrey
Editorial Manager
Mary Beth Wakefield

Production Manager
Tim Tate
Vice President and Executive Group
Publisher
Richard Swadley
Vice President and Executive
Publisher
Barry Pruett
Associate Publisher
Jim Minatel
Project Coordinator, Cover
Lynsey Stanford
Proofreader
Jen Larsen, Word One
Indexer
Ron Strauss
Cover Image
Joyce Haughey
Cover Designer
Michael E. Trent
www.it-ebooks.info
www.it-ebooks.info
Introduction xxv
Part I Getting Started
Chapter 1: An Overview of CentOS 3
Chapter 2: Installing CentOS 15
Chapter 3: Getting Started with the Desktop 69
Chapter 4: Using Linux Commands 119
Part II Using CentOS
Chapter 5: Accessing and Running Applications 165

Chapter 6: Publishing with CentOS 221
Chapter 7: Music, Video, and Images in Linux 249
Chapter 8: Using the Internet and the Web 297
Part III Adminstration
Chapter 9: Understanding System Administration 345
Chapter 10: Setting up and Maintaining User Accounts 395
Chapter 11: Automating System Tasks 427
Chapter 12: Creating Backups and Restoring Data 467
Chapter 13: Security 505
Part IV Networking
Chapter 14: Setting Up Network Connections and LANs 561
Chapter 15: Setting Up an Internet Connection 611
Chapter 16: Setting Up Printers and Printing 657
Chapter 17: Setting Up a File Server 679
Chapter 18: Setting Up a Mail Server 719
Chapter 19: Setting Up an FTP Server 751
Chapter 20: Setting Up a Web Server 763
Chapter 21: Setting Up an LDAP Address Book Server 815
Chapter 22: Setting Up a DHCP Boot Server 833
Chapter 23: Setting Up a MySQL Database Server 845
Chapter 24: Making Servers Public with DNS 879
Appendix A: About the Media 907
Index 911
ix
www.it-ebooks.info
www.it-ebooks.info
Introduction xxv
Part I Getting Started
Chapter1:AnOverviewofCentOS 3
What You Get with CentOS 5

Stepping Stone to Red Hat Enterprise Linux 6
What Is Linux? 7
Linux’s Roots in UNIX 7
Common Linux Features 10
Primary Advantages of Linux 11
Going Forward with CentOS 12
Help from the CentOS Project 12
Training and Certification 13
Documentation 13
Summary 14
Chapter 2: Installing CentOS . . . 15
Using the CentOS Live CD 16
Quick Installation 17
Detailed Installation Instructions 18
Installing CentOS 5 19
Choosing Computer Hardware 21
Preparing for Installation Using the Live CD 22
Beginning the Installation 25
Running CentOS Firstboot 32
Going Forward after Installation 34
Special Installation Procedures 35
Alternatives for Starting Installation 35
Installing from Other Media 37
Starting a VNC Install 40
Performing a Kickstart Installation 41
xi
www.it-ebooks.info
Contents
Special Installation Topics 46
Setting up to Dual-Boot Linux and Windows 46

Partitioning Your Disks 52
Using the GRUB Boot Loader 60
Troubleshooting Installation 65
Summary 67
Chapter3:GettingStartedwiththeDesktop 69
Logging in to CentOS 69
Getting Familiar with the Desktop 72
Touring Your Desktop 72
Tips for Configuring Your Desktop 79
Using the GNOME Desktop 80
Using the Metacity Window Manager 81
Using the GNOME Panels 83
Using the Nautilus File Manager 88
Changing GNOME Preferences 91
Managing Removable Media 92
Trying Other GNOME Applications 93
Exiting GNOME 95
Running 3D Accelerated Desktop Effects 96
Switching Desktop Environments 98
Using the KDE Desktop 98
Starting with KDE 99
KDE Desktop Basics 100
Managing Files with the Konqueror File Manager 102
Using the Konqueror Browser Features 107
Configuring Konqueror Options 107
Managing Windows 110
Configuring the Desktop 111
Adding Widgets 113
Using the Xfce Desktop Environment 113
Troubleshooting Your Desktop 114

GUI Doesn’t Work at Startup 115
Tuning Your Video Card and Monitor 116
Configuring Video Cards for Gaming 118
Getting More Information 118
Summary 118
Chapter4:UsingLinuxCommands 119
The Shell Interface 119
Checking Your Login Session 120
Checking Directories and Permissions 121
xii
www.it-ebooks.info
Contents
Checking System Activity 123
Exiting the Shell 125
Understanding the Shell 125
Using the Shell in Linux 126
Locating Commands 127
Rerunning Commands 129
Connecting and Expanding Commands 135
Using Shell Environment Variables 138
Managing Background and Foreground Processes 141
Configuring Your Shell 143
Working with the Linux File System 147
Creating Files and Directories 149
Moving, Copying, and Deleting Files 155
Using the vi Text Editor 155
Starting with Vi 156
Moving around the File 159
Searching for Text 159
Using Numbers with Commands 160

Summary 161
Part II Using CentOS
Chapter5:AccessingandRunningApplications 165
Getting and Installing Software Packages 166
Downloading and Installing Applications with yum 167
Getting CentOS Software Updates 175
Managing RPM Packages 176
Using the Add/Remove Window 176
Using the rpm Command 178
Using Software in Different Formats 188
Understanding Software Package Names and Formats 189
Understanding Different Archive Formats 191
Building and Installing from Source Code 191
Using CentOS to Run Applications 195
Finding Common Desktop Applications in Linux 196
Investigating Your Desktop 196
Starting Applications from a Menu 198
Starting Applications from a Run Application Window 198
Starting Applications from a Terminal Window 199
Running Remote X Applications 201
Running Microsoft Windows, DOS, and Macintosh Applications 205
Running DOS Applications 207
Running Microsoft Windows Applications in Linux 209
xiii
www.it-ebooks.info
Contents
Running Applications in Virtual Environments 214
Running Applications Virtually with Xen 214
Running Applications Virtually with KVM and QEMU 218
Summary 220

Chapter6:PublishingwithCentOS 221
Desktop Publishing in Linux 222
Using Text Editors and Notepads 222
Using Word Processors 222
Using Traditional Linux Publishing Tools 226
Creating Documents in Groff or LaTeX 227
Text Processing with Groff 228
Text Processing with TeX/LaTeX 231
Converting Documents 233
Creating DocBook Documents 234
Understanding SGML and XML 235
Displaying PDF Files with Evince 238
Doing Page Layout with Scribus 239
Working with Graphics 241
Manipulating Images with GIMP 241
Taking Screen Captures 243
Creating Vector Graphic Images with Inkscape 244
Using Scanners Driven by SANE 246
Web Publishing 247
Summary 248
Chapter 7: Music, Video, and Images in Linux . 249
Understanding Multimedia and Legal Issues in Linux 250
Extending Freedom to Codecs 251
Listening to Music in Linux 251
Configuring a Sound Card 253
Choosing Audio Players 259
Automatically Playing CDs 260
Playing and Managing Music with Rhythmbox 261
Playing Music with XMMS Audio Player 264
Using ogg123, mpg321, and play Command-Line Players 267

Using MIDI Audio Players 268
Converting Audio Files with SoX 268
Extracting and Encoding Music 271
Creating Your Own Music CDs 274
Creating CD Labels with cdlabelgen 277
Viewing TV and Webcams 278
Watching TV with Tvtime 279
Videoconferencing and VOIP with Ekiga 281
xiv
www.it-ebooks.info
Contents
Playing Video 285
Examining Laws Affecting Video and Linux 285
Understanding Video Content Types 286
Watching Video with Xine 288
Using Totem Movie Player 292
Using a Digital Camera 293
Displaying Images in gThumb 293
Using Your Camera as a Storage Device 295
Summary 296
Chapter8:UsingtheInternetandtheWeb 297
Overview of Internet Applications and Commands 297
Browsing the Web 300
Understanding Web Browsing 301
Browsing the Web with Firefox 305
Setting Up Firefox 308
Using Text-Based Web Browsers 316
Communicating with E-Mail 317
E-Mail Basics 319
Using Evolution E-Mail 320

Thunderbird Mail Client 322
Text-Based Mail Programs 324
Participating in Newsgroups 326
Instant Messaging with Pidgin 326
Sharing Files with BitTorrent 328
Using Remote Login, Copy, and Execution 329
Using Telnet for Remote Login 330
Copying Files with FTP 331
Getting Files with Wget 337
Using ssh for Remote Login/Remote Execution 339
Using scp for Remote File Copy 340
Using the ‘‘r’’ Commands: rlogin, rcp, and rsh 341
Summary 341
Part III Adminstration
Chapter9:UnderstandingSystemAdministration 345
Using the root User Account 346
Becoming Super User (the su Command) 346
Learning about Administrative GUI Tools, Commands, Configuration
Files, and Log Files 348
Using Graphical Administration Tools 348
Administrative Commands 353
Administrative Configuration Files 354
xv
www.it-ebooks.info
Contents
Administrative Log Files 358
Using Other Administrative Logins 358
Administering Your Linux System 360
Configuring Hardware 361
Checking Your Hardware 361

Managing Hardware with HAL 361
Reconfiguring Hardware with kudzu 362
Configuring Modules 364
Managing File Systems and Disk Space 366
Mounting File Systems 369
Using the mkfs Command to Create a File System 377
Adding a Hard Disk 378
Using RAID Disks 381
Checking System Space 382
Monitoring System Performance 385
Watch Computer Usage with System Monitor 385
Monitoring CPU Usage with top 386
Monitoring Power Usage on Laptop Computers 387
Using Security Enhanced Linux 388
Understanding Security Enhanced Linux 389
Types and Roles in SELinux 389
Users in SELinux 390
Policies in SELinux 390
Tools in SELinux 390
Using SELinux in CentOS 391
SELinux 391
Checking Whether SELinux Is On 392
Checking SELinux Status 393
Summary 394
Chapter 10: Setting up and Maintaining User Accounts . 395
Creating User Accounts 395
Adding Users with useradd 396
Adding Users with User Manager 400
Setting User Defaults 402
Supplying Initial Login Scripts 405

Supplying Initial .bashrc and .bash_profile Files 406
Supplying an Initial .tcshrc File 407
Configuring System-Wide Shell Options 407
Setting System Profiles 408
Adding User Accounts to Servers 409
Creating Portable Desktops 410
Providing Support to Users 411
xvi
www.it-ebooks.info
Contents
Creating a Technical Support Mailbox 412
Resetting a User’s Password 412
Modifying Accounts 413
Modifying User Accounts with usermod 413
Modifying User Accounts with User Manager 415
Deleting User Accounts 416
Deleting User Accounts with userdel 417
Deleting User Accounts with User Manager 418
Checking Disk Quotas 418
Using Quota to Check Disk Usage 418
Using du to Check Disk Use 423
Removing Temp Files Automatically 423
Sending Mail to All Users 424
Summary 425
Chapter11:AutomatingSystemTasks 427
Understanding Shell Scripts 427
Executing and Debugging Shell Scripts 428
Understanding Shell Variables 429
Performing Arithmetic in Shell Scripts 431
Using Programming Constructs in Shell Scripts 432

Some Useful External Programs 438
Trying Some Simple Shell Scripts 439
System Initialization 441
Starting init 442
The inittab File 442
System Startup and Shutdown 446
Starting Run-Level Scripts 447
Understanding Run-Level Scripts 447
Understanding What Start-Up Scripts Do 450
Changing Run-Level Script Behavior 452
Reorganizing or Removing Run-Level Scripts 453
Adding Run-Level Scripts 455
Managing xinetd Services 456
Manipulating Run Levels 457
Scheduling System Tasks 458
Using at.allow and at.deny 458
Specifying When Jobs Are Run 458
Submitting Scheduled Jobs 459
Viewing Scheduled Jobs 460
Deleting Scheduled Jobs 460
Using the batch Command 461
Using the cron Facility 461
Summary 465
xvii
www.it-ebooks.info
Contents
Chapter 12: Creating Backups and Restoring Data . . . 467
Making a Simple Backup Archive 467
Doing a Simple Backup with rsync 469
Backing Up Files Locally 469

Backing Up Files Remotely 470
Choosing Backup Tools 472
Selecting a Backup Strategy 472
Full Backup 473
Incremental Backup 473
Disk Mirroring 473
Network Backup 474
Selecting a Backup Medium 474
Magnetic Tape 474
Writable CD Drives 476
Writable DVD Drives 480
Writing CDs or DVDs with growisofs 481
Backing Up to a Hard Drive 482
Backing Up Files with dump 483
Creating a Backup with dump 484
Understanding Dump Levels 486
Automating Backups with cron 487
Restoring Backed-Up Files 488
Restoring an Entire File System 490
Recovering Individual Files 491
Configuring Amanda for Network Backups 493
Creating Amanda Directories 494
Creating the amanda.conf file 495
Creating a disklist File 497
Adding Amanda Network Services 498
Performing an Amanda Backup 499
Using the pax Archiving Tool 499
Summary 503
Chapter 13: Security . 505
Linux Security Checklist 505

Using Password Protection 508
Choosing Good Passwords 508
Using a Shadow Password File 509
Securing Linux with iptables Firewalls 511
Using the Security Level Configuration Window 512
Configuring an iptables Firewall 513
Controlling Access to Services with TCP Wrappers 525
Checking Log Files 528
xviii
www.it-ebooks.info
Contents
Replacing the sysklogd Package 528
Understanding the rsyslogd Service 528
Tracking Log Messages with logwatch 531
Using the Secure Shell Package 532
Starting the SSH Service 533
Using the ssh, sftp, and scp commands 533
Using SSH, SCP, and SFTP without Passwords 535
Securing Linux Servers 536
Understanding Attack Techniques 536
Protecting against Denial-of-Service Attacks 537
Protecting against Distributed DOS Attacks 540
Protecting against Intrusion Attacks 544
Securing Servers with SELinux 548
Protecting Web Servers with Certificates and Encryption 548
Summary 558
Part IV Networking
Chapter14:SettingUpNetworkConnectionsandLANs 561
Connecting to the Network with NetworkManager 561
Connecting to a Wireless Network 563

Connecting to a Wired Network 563
Setting Up a Virtual Private Network Connection 564
Understanding Local Area Networks 565
Planning, Getting, and Setting Up LAN Hardware 566
Configuring TCP/IP for Your LAN 571
Setting Up a Wireless LAN 575
Understanding Wireless Networks 576
Choosing Wireless Hardware 577
Getting Wireless Drivers 582
Installing Wireless Linux Software 584
Configuring the Wireless LAN 584
Testing Distances 590
Setting Wireless Extensions 590
Understanding Internet Protocol Addresses 591
IP Address Classes 593
Understanding Netmasks 593
Classless Inter-Domain Routing 594
Getting IP Addresses 596
Troubleshooting Your LAN 597
Did Linux Find Your Ethernet Driver at Boot Time? 597
Can You Reach Another Computer on the LAN? 597
Is Your Ethernet Connection Up? 598
xix
www.it-ebooks.info
Contents
Troubleshooting a Wireless LAN 600
Watching LAN Traffic with Wireshark 604
Summary 609
Chapter15:SettingUpanInternetConnection 611
Understanding How the Internet Is Structured 611

Internet Domains 613
Hostnames and IP Addresses 615
Routing 616
Proxies 617
Using Dial-Up Connections to the Internet 617
Getting Information 617
Setting Up Dial-Up PPP 618
Creating a Dial-Up Connection with the Network Configuration Window 619
Launching Your PPP Connection 621
Launching Your PPP Connection on Demand 621
Checking Your PPP Connection 622
Connecting Your LAN to the Internet 629
Setting Up Linux as a Router 630
Configuring the Linux Router 630
Configuring Network Clients 633
Configuring a Virtual Private Network Connection 634
Understanding IPsec 635
Using IPsec Protocols 635
Using IPsec in CentOS 636
Configuring an OpenVPN Server 637
Setting Up Linux as a Proxy Server 643
Starting the Squid Daemon 644
Using a Simple squid.conf File 645
Modifying the Squid Configuration File 648
Debugging Squid 651
Setting Up Proxy Clients 653
Configuring Firefox to Use a Proxy 654
Configuring Other Browsers to Use a Proxy 655
Summary 655
Chapter16:SettingUpPrintersandPrinting 657

Common UNIX Printing Service 658
Setting Up Printers 658
Using the Printer Configuration Window 659
Using Web-Based CUPS Administration 667
Configuring the CUPS Server (cupsd.conf) 670
Configuring CUPS Printer Options 672
Using Printing Commands 673
Using lpr to Print 673
xx
www.it-ebooks.info
Contents
Listing Status with lpc 674
Removing Print Jobs with lprm 674
Configuring Print Servers 675
Configuring a Shared CUPS Printer 675
Configuring a Shared Samba Printer 676
Summary 677
Chapter17:SettingUpaFileServer 679
Goals of Setting Up a File Server 679
Setting Up an NFS File Server 680
Sharing NFS File Systems 682
Using NFS File Systems 689
Unmounting NFS File Systems 694
Other Cool Things to Do with NFS 695
Setting Up a Samba File Server 696
Getting and Installing Samba 697
Configuring a Simple Samba Server 698
Configuring Samba with SWAT 701
Working with Samba Files and Commands 710
Setting Up Samba Clients 714

Troubleshooting Your Samba Server 715
Summary 718
Chapter18:SettingUpaMailServer 719
Introducing SMTP and Sendmail 719
Installing and Running Sendmail 720
Starting Sendmail 721
Other Programs 722
Logging Performed by Sendmail 722
Configuring Sendmail 724
Getting a Domain Name 725
Configuring Basic Sendmail Settings (sendmail.mc) 725
Defining Outgoing Mail Access 729
Configuring Virtual Servers 731
Configuring Virtual Users 732
Adding User Accounts 733
Starting Sendmail and Generating Database Files 733
Re-Directing Mail 734
Introducing Postfix 737
Stopping Spam with SpamAssassin 738
Using SpamAssassin 738
Setting Up SpamAssassin on Your Mail Server 739
Setting E-Mail Readers to Filter Spam 741
Getting Mail from the Server (POP3 or IMAPv4) 741
Accessing Mailboxes in Linux 742
xxi
www.it-ebooks.info
Contents
Configuring IMAPv4 and POP3 with Dovecot 743
Getting Mail from Your Browser with SquirrelMail 744
Administering a Mailing List with Mailman 746

Summary 749
Chapter19:SettingUpanFTPServer 751
Understanding FTP Servers 752
Attributes of FTP Servers 752
FTP User Types 753
Using the Very Secure FTP Server 753
Quick-Starting vsFTPd 754
Configuring vsFTPd 755
Getting More Information about FTP Servers 761
Summary 761
Chapter20:SettingUpaWebServer 763
Introduction to Web Servers 764
The Apache Web Server 764
Other Web Servers Available for CentOS 765
Quick-Starting the Apache Web Server 766
Configuring the Apache Server 768
Configuring the Web Server (httpd.conf) 769
Configuring Modules and Related Services (/etc/httpd/conf.d/*.conf) 804
Starting and Stopping the Server 806
Monitoring Server Activities 807
Displaying Server Information 808
Displaying Server Status 808
Further Security of Server-Info and Server-Status 810
Logging Errors 811
Logging Hits 811
Analyzing Web-Server Traffic 812
Summary 814
Chapter21:SettingUpanLDAPAddressBookServer 815
Understanding LDAP 816
Defining Information in Schemas 817

Structuring Your LDAP Directories 819
Setting Up the OpenLDAP Server 819
Installing OpenLDAP Packages 819
Configuring the OpenLDAP Server (slapd.conf) 819
Starting the OpenLDAP Service 822
Setting Up the Address Book 822
More Ways to Configure LDAP 828
Accessing an LDAP Address Book from Thunderbird 829
Summary 831
xxii
www.it-ebooks.info
Contents
Chapter22:SettingUpaDHCPBootServer 833
Using the Dynamic Host Configuration Protocol 834
Setting Up a DHCP Server 834
Opening Your Firewall and SELinux for DHCP 835
Configuring the /etc/dhcpd.conf File 836
Starting the DHCP Server 842
Setting Up a DHCP Client 843
Summary 844
Chapter23:SettingUpaMySQLDatabaseServer 845
Finding MySQL Packages 846
Configuring the MySQL Server 848
Using MySQL User/Group Accounts 848
Adding Administrative Users 848
Setting MySQL Options 849
Using Sample my.cnf Files 854
Starting the MySQL Server 855
Checking That MySQL Server Is Working 856
Working with MySQL Databases 857

Starting the mysql Command 857
Creating a Database with MySQL 858
Adding Data to a MySQL Database Table 860
Understanding MySQL Tables 863
Displaying MySQL Databases 868
Displaying All or Selected Records 868
Displaying Selected Columns 869
Sorting Data 870
Making Changes to Tables and Records 871
Altering the Structure of MySQL Tables 871
Updating and Deleting MySQL Records 872
Adding and Removing User Access 873
Adding Users and Granting Access 873
Revoking Access 874
Backing Up Databases 875
Checking and Fixing Databases 875
Summary 877
Chapter24:MakingServersPublicwithDNS 879
Determining Goals for Your Server 880
Using a Hosting Service 880
Connecting a Public Server 881
Choosing an ISP 881
Getting a Domain Name 884
Configuring Your Public Server 886
Configuring Networking 886
xxiii
www.it-ebooks.info
Contents
Configuring Servers 887
Managing Security 888

Setting Up a Domain Name System Server 890
Understanding DNS 890
DNS Name Server Example 894
Quick-Starting a DNS Server 895
Checking That DNS Is Working 903
Getting More Information about BIND 905
Summary 905
AppendixA:AbouttheMedia 907
Index 911
xxiv
www.it-ebooks.info

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×