RAISE FOR LINUX QUICK FIX NOTEBOOK - Pearsoncmg

3m ago
1 Views
0 Downloads
8.31 MB
696 Pages
Last View : 1m ago
Last Download : n/a
Upload by : Madison Stoltz
Transcription

00Harrison FM.qxd 2/25/05 PRAISE FOR 12:38 PM Page i LINUX QUICK FIX NOTEBOOK “Where has this book been all my professional life? It is about time someone wrote this book. The author covers many basic, practical issues that other authors omit in a format that makes for a great troubleshooting reference and for casual perusing. There are a lot of books available that give a broad overview of system and network administration, and there are a lot of detailed books on each specific topic covered in this book, but I don’t know of any other place where I can get so much useful, practical information on such a wide range of topics in such a concise and readable form. I will highly recommend it to my friends and colleagues who are trying to manage their own systems. I am anxious to show it to our instructors who teach data communications and networks as a possible text or lab manual.” —Ron McCarty, instructor and program chair, Computer Science, Penn State Erie “This book takes a very unique approach and is very flexible. It offers a great deal to the home user, students, small businesses—all the way to any Linux sys admin that needs a handy reference. I found it very refreshing in terms of style, stated goals, presentation, ease of use, direction, and the “present and future” value of the content. In other words the author is very current and knowledgeable. I would recommend this book to every level from programmer to manager.” —Joe Brazeal, Information Technician III, Southwest Power Pool “This book is an excellent resource for new Linux administrators. I was impressed with the comprehensive set of 35 topic chapters, making this book a very useful reference. I know of no other work like this.” —George Vish II, Linux curriculum program manager and senior education consultant, Hewlett-Packard Education “I would recommend this book to novice Linux users and administrators. It covers a lot of topics, and makes it easy for readers to follow along.” —Bret Strong, education consultant, Hewlett-Packard Company “Linux Quick Fix Notebook is a well-written guide to designing, installing, and maintaining Linux servers. Many Linux reference texts are just simple rewrites of Linux man and info pages, but this book addresses the real issues that systems administrators encounter when working with Linux. The author provides a pedagogical guide to learning Linux server administration. In addition, the book includes step-by-step information so that users can quickly take advantage of the best that open source software has to offer today. I would recommend this book to both beginning and intermediate users of Linux.” —Joseph Naberhaus, Professor of Networking, Universidad Del Mar

00Harrison FM.qxd 2/25/05 12:38 PM Page ii

00Harrison FM.qxd 2/25/05 12:38 PM Page iii Linux Quick Fix Notebook

00Harrison FM.qxd 2/25/05 12:38 PM Page iv BRUCE PERENS’ OPEN SOURCE SERIES http://www.phptr.com/perens C GUI Programming with Qt 3 Jasmin Blanchette, Mark Summerfield Managing Linux Systems with Webmin: System Administration and Module Development Jamie Cameron Understanding the Linux Virtual Memory Manager Mel Gorman Implementing CIFS: The Common Internet File System Christopher Hertel Embedded Software Development with eCos Anthony Massa Rapid Application Development with Mozilla Nigel McFarlane The Linux Development Platform: Configuring, Using, and Maintaining a Complete Programming Environment Rafeeq Ur Rehman, Christopher Paul Intrusion Detection with SNORT: Advanced IDS Techniques Using SNORT, Apache, MySQL, PHP, and ACID Rafeeq Ur Rehman The Official Samba-3 HOWTO and Reference Guide John H. Terpstra, Jelmer R. Vernooij, Editors Samba-3 by Example: Practical Exercises to Successful Deployment John H. Terpstra

00Harrison FM.qxd 2/25/05 12:39 PM Page v Linux Quick Fix Notebook Peter Harrison Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney Tokyo Singapore Mexico City

00Harrison FM.qxd 3/1/05 4:08 PM Page vi Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U. S. Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com For sales outside the U. S., please contact: International Sales international@pearsoned.com Visit us on the Web: www.phptr.com Library of Congress Number: 2004117224 Copyright 2005 Pearson Education, Inc. Printed in the United States of America. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). ISBN 0-13-186150-6 Text printed in the United States on recycled paper at R.R. Donnelley and Sons Company in Crawfordsville, Indiana. First printing, March 2005

00Harrison FM.qxd 2/25/05 12:39 PM Page vii Dedicated to Diana “Turn off the light and come to bed.” Blaze and Jade “Daddy, can we stop being quiet now?” Jack and Barbara By my side every day.

00Harrison FM.qxd 2/25/05 12:39 PM Page viii

00Harrison FM.qxd 2/25/05 12:39 PM Page ix Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxxi Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xl About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xli Part 1 The Linux File Server Project 1 Why Host Your Own Site? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Our Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Alternatives to In-House Web Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Virtual Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 Dedicated Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 Factors to Consider Before Hosting Yourself . . . . . . . . . . . . . . . . . . . . . . . . . .6 Is In-House Hosting Preferred? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 How to Migrate From an External Provider . . . . . . . . . . . . . . . . . . . . . . . . . . .8 In-House Server Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 2 Introduction to Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 The OSI Networking Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 An Introduction to TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 TCP Is a Connection-Oriented Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . .14 How TCP Establishes a Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 UDP, TCP’s “Connectionless” Cousin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 TCP and UDP Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 The TCP/IP Time to Live Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 The ICMP Protocol and Its Relationship to TCP/IP . . . . . . . . . . . . . . . . . .16 ix

00Harrison FM.qxd x 2/25/05 12:39 PM Page x Contents How IP Addresses Are Used to Access Network Devices . . . . . . . . . . . . . . .17 Private IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 The localhost IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 Network Address Translation (NAT) Makes Private IPs Public . . . . . . . .18 Port Forwarding with NAT Facilitates Home-Based Web Sites . . . . . . . .19 DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 How DNS Links Your IP Address to Your Web Domain . . . . . . . . . . . . . . .20 IP Version 6 (IPv6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 How Subnet Masks Group IP Addresses into Networks . . . . . . . . . . . . . . . .21 Calculating the Number of Addresses Assigned to a Subnet . . . . . . . . . . .22 Calculating the Range of Addresses on Your Network . . . . . . . . . . . . . . . .22 Subnet Masks for the Typical Business DSL Line . . . . . . . . . . . . . . . . . . .24 The Physical and Link Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Networking Equipment Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Network Interface Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 The Two Broad Types of Networking Equipment . . . . . . . . . . . . . . . . . . .27 Connectivity Using Hubs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 Using Switches as a Faster Alternative to Hubs . . . . . . . . . . . . . . . . . . . .29 Local Area Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 How Routers Interconnect LANs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 How Simple Routing Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 Default Gateways, the Routers of Last Resort . . . . . . . . . . . . . . . . . . . . . .31 Firewalls Help Provide a Secure Routing Environment . . . . . . . . . . . . . .31 Additional Introductory Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 The File Transfer Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Linux Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33 3 Linux Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 How to Configure Your NIC’s IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Determining Your IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Changing Your IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Multiple IP Addresses on a Single NIC . . . . . . . . . . . . . . . . . . . . . . . . . . .39 IP Address Assignment for a Direct DSL Connection . . . . . . . . . . . . . . . .40 IP Address Assignment for a Cable Modem Connection . . . . . . . . . . . . . .45 How to Activate/Shut Down Your NIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 How to View Your Current Routing Table . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 How to Change Your Default Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 How to Configure Two Gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Adding Routes from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Adding Routes with /etc/sysconfig/network-scripts/ Files . . . . . . . . . . .48 How to Delete a Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Changing NIC Speed and Duplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Using mii-tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Using ethtool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50

00Harrison FM.qxd Contents 2/25/05 12:39 PM Page xi xi How to Convert Your Linux Server into a Router . . . . . . . . . . . . . . . . . . . . . .52 Configuring IP Forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 Configuring Proxy ARP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 Configuring Your /etc/hosts File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 The loopback Interface’s localhost Entry . . . . . . . . . . . . . . . . . . . . . . . . . .55 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 4 Simple Network Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 Sources of Network Slowness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Sources of a Lack of Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Doing Basic Cable and Link Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Testing Your NIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Viewing Your Activated Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Viewing All Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Testing Link Status from the Command Line . . . . . . . . . . . . . . . . . . . . . .60 Viewing NIC Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 How to See MAC Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Using ping to Test Network Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Using telnet to Test Network Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . .65 Linux telnet Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Successful Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Connection Refused Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 telnet Timeout or Hanging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 telnet Troubleshooting Using Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 Screen Goes Blank—Successful Connection . . . . . . . . . . . . . . . . . . . . . . . .68 Connect Failed Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 telnet Timeout or Hanging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Testing Web Sites with the curl and wget Utilities . . . . . . . . . . . . . . . . . . . . .68 Using curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Using wget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 The netstat Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 The Linux iptables Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Determining Whether iptables Is Running . . . . . . . . . . . . . . . . . . . . . . . .71 How to Stop iptables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 How to Configure iptables Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Using traceroute to Test Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Sample traceroute Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 Possible traceroute Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 traceroute Time Exceeded False Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . .73 traceroute Internet Slowness False Alarm . . . . . . . . . . . . . . . . . . . . . . . . .74 traceroute Dies at the Router Just Before the Server . . . . . . . . . . . . . . . .75 Always Get a Bidirectional traceroute . . . . . . . . . . . . . . . . . . . . . . . . . . . .75 ping and traceroute Troubleshooting Example . . . . . . . . . . . . . . . . . . . . . .77 traceroute Web Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Possible Reasons for a Failed traceroute . . . . . . . . . . . . . . . . . . . . . . . . . .78

00Harrison FM.qxd xii 2/25/05 12:39 PM Page xii Contents Using MTR to Detect Network Congestion . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Viewing Packet Flows with tcpdump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Analyzing tcpdump files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 Common Problems with tcpdump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 Viewing Packet Flows with tethereal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 Basic DNS Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 Using nslookup to Test DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 Using the host Command to Test DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . .86 Using nmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 Determining the Source of an Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Who Has Used My System? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 The last Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 The who Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 5 Troubleshooting Linux with syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 The /etc/syslog.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 Activating Changes to the syslog Configuration File . . . . . . . . . . . . . . . .93 How to View New Log Entries as They Happen . . . . . . . . . . . . . . . . . . . . .93 Logging syslog Messages to a Remote Linux Server . . . . . . . . . . . . . . . . .94 syslog Configuration and Cisco Network Devices . . . . . . . . . . . . . . . . . . .96 syslog and Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 logrotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 The /etc/logrotate.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 Sample Contents of /etc/logrotate.conf . . . . . . . . . . . . . . . . . . . . . . . . . .97 The /etc/logrotate.d Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 Activating logrotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Compressing Your Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 6 Installing RPM Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101 Where to Get Commonly Used RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102 RPMs on Your Installation CDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102 RPMs Downloaded from Fedora . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102 RPMs Downloaded from rpmfind.net . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Getting RPMs Using Web-Based FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Using the Fedora Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Using the rpmfind Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Getting RPMs Using Command-Line Anonymous FTP . . . . . . . . . . . . . . . .104 Getting RPMs Using wget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 Automatic Updates with yum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 Configuring yum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 Creating Your Own yum Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109

00Harrison FM.qxd Contents 2/25/05 12:39 PM Page xiii xiii Before You Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 Keeping Your System Current with yum . . . . . . . . . . . . . . . . . . . . . . . . . .110 Example of a yum Package Installation . . . . . . . . . . . . . . . . . . . . . . . . . . .112 How to Install RPMs Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 Using Downloaded Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 Using CD-ROMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 How to Install Source RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 RPM Installation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115 Failed Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115 Signature Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116 How to List Installed RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Listing Files Associated with RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Listing Files for Already Installed RPMs . . . . . . . . . . . . . . . . . . . . . . . . .118 Listing Files in RPM Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118 Listing the RPM to Which a File Belongs . . . . . . . . . . . . . . . . . . . . . . . . .119 Uninstalling RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Which RPMs Start at Boot Time? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Installing Software Using tar Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 7 The Linux Boot Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121 The Fedora Boot Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121 Determining the Default Boot runlevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 Getting a GUI Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 Get a Basic Text Terminal Without Exiting the GUI . . . . . . . . . . . . . . . . . .125 Using a GUI Terminal Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Using Virtual Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 System Shutdown and Rebooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Halt/Shut Down the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Reboot the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126 Entering Single-user Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127 How to Set Programs to Run at Each runlevel . . . . . . . . . . . . . . . . . . . . . . .129 chkconfig Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129 Using chkconfig to Improve Security . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 Final Tips on chkconfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133 8 Configuring the DHCP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135 Download and Install the DHCP Package . . . . . . . . . . . . . . . . . . . . . . . . . .135 The /etc/dhcpd.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136 How to Get DHCP Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 DHCP Servers with Multiple NICs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Temporary Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 Permanent Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139

00Harrison FM.qxd xiv 2/25/05 12:39 PM Page xiv Contents Configuring Linux Clients to Use DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . .139 Configuring Windows Clients to Use DHCP . . . . . . . . . . . . . . . . . . . . . . . . .139 Simple DHCP Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 DHCP Clients Obtaining 169.254.0.0 Addresses . . . . . . . . . . . . . . . . . . .140 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 9 Linux Users and sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Adding Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Who Is the Super User? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 How to Add Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 How to Change Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 How to Delete Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 How to Tell the Groups to Which a User Belongs . . . . . . . . . . . . . . . . . .143 How to Change the Ownership of a File . . . . . . . . . . . . . . . . . . . . . . . . . .144 Using sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Example of a User Using sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Downloading and Installing the sudo Package . . . . . . . . . . . . . . . . . . . . .145 Simple /etc/sudoers Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148 10 Windows, Linux, and Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 Download and Install Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 How to Get Samba Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151 The Samba Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151 How SWAT Makes Samba Simpler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Basic SWAT Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Controlling SWAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154 Encrypting SWAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154 How to Make SWAT Changes Immediate . . . . . . . . . . . . . . . . . . . . . . . . .158 Creating a Starter Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 The [global] Section . . . . . . . . . . . . . . . . .

"Linux Quick Fix Notebookis a well-written guide to designing, installing, and maintain-ing Linux servers. Many Linux reference texts are just simple rewrites of Linux man and info pages, but this book addresses the real issues that systems administrators encounter when working with Linux. The author provides a pedagogical guide to learn-

Related Documents:

Linux in a Nutshell Linux Network Administrator’s Guide Linux Pocket Guide Linux Security Cookbook Linux Server Hacks Linux Server Security Running Linux SELinux Understanding Linux Network Internals Linux Books Resource Center linux.oreilly.comis a complete catalog of O’Reilly’s books on Linux and Unix and related technologies .

Mar 21, 2019 · Pilates Fix and Total Body Cardio Fix Cardio Fix and Upper Fix Dirty 30 and Pilates Fix Yoga Fix *Flat Abs Fix and Barre Legs are part of the 21 Day Fix Ultimate Upgrade available on Beachbody On Demand. First you’ll need to cal

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

Other Linux resources from O’Reilly Related titles Building Embedded Linux Systems Linux Device Drivers Linux in a Nutshell Linux Pocket Guide Running Linux Understanding Linux Network Internals Understanding the Linux Kernel Linux Books Resource Center linu

Perfection PC Perfection PC Inc. Philips Philips Electronics Planar Planar Systems Inc PLEXON Plexon, Inc. Pogo Linux Pogo Linux, Inc. Pogo Linux Altura M2 Pogo Linux, Inc. Pogo Linux Velocity -D50 Pogo Linux, Inc. Pogo Linux Verona 330 Pogo Linux, Inc. Pogo Linux Vor

10 tips och tricks för att lyckas med ert sap-projekt 20 SAPSANYTT 2/2015 De flesta projektledare känner säkert till Cobb’s paradox. Martin Cobb verkade som CIO för sekretariatet för Treasury Board of Canada 1995 då han ställde frågan

service i Norge och Finland drivs inom ramen för ett enskilt företag (NRK. 1 och Yleisradio), fin ns det i Sverige tre: Ett för tv (Sveriges Television , SVT ), ett för radio (Sveriges Radio , SR ) och ett för utbildnings program (Sveriges Utbildningsradio, UR, vilket till följd av sin begränsade storlek inte återfinns bland de 25 största

Etika, Ligji dhe Performanca në Administratën tonë Publike E. Saliaga 5 “Statusi i Nënpunësit Civil”, Ligj Nr. 8549, datë 11.11.1999, Republika e Shqipërisë.