Выбрать главу

The Debian Administrator's Handbook

Table of Contents

Preface

Foreword

1. The Debian Project

1.1. What Is Debian?

1.2. The Foundation Documents

1.3. The Inner Workings of the Debian Project

1.4. The Role of Distributions

1.5. Lifecycle of a Release

2. Presenting the Case Study

2.1. Fast Growing IT Needs

2.2. Master Plan

2.3. Why a GNU/Linux Distribution?

2.4. Why the Debian Distribution?

2.5. Why Debian Squeeze?

3. Analyzing the Existing Setup and Migrating

3.1. Coexistence in Heterogeneous Environments

3.2. How To Migrate

4. Installation

4.1. Installation Methods

4.2. Installing, Step by Step

4.3. After the First Boot

5. Packaging System: Tools and Fundamental Principles

5.1. Structure of a Binary Package

5.2. Package Meta-Information

5.3. Structure of a Source Package

5.4. Manipulating Packages with dpkg

5.5. Coexistence with Other Packaging Systems

6. Maintenance and Updates: The APT Tools

6.1. Filling in the sources.list File

6.2. aptitude and apt-get Commands

6.3. The apt-cache Command

6.4. Frontends: aptitude, synaptic

6.5. Checking Package Authenticity

6.6. Upgrading from One Stable Distribution to the Next

6.7. Keeping a System Up to Date

6.8. Automatic Upgrades

6.9. Searching for Packages

7. Solving Problems and Finding Relevant Information

7.1. Documentation Sources

7.2. Common Procedures

8. Basic Configuration: Network, Accounts, Printing...

8.1. Configuring the System for Another Language

8.2. Configuring the Network

8.3. Setting the Hostname and Configuring the Name Service

8.4. User and Group Databases

8.5. Creating Accounts

8.6. Shell Environment

8.7. Printer Configuration

8.8. Configuring the Bootloader

8.9. Other Configurations: Time Synchronization, Logs, Sharing Access...

8.10. Compiling a Kernel

8.11. Installing a Kernel

9. Unix Services

9.1. System Boot

9.2. Remote Login

9.3. Managing Rights

9.4. Administration Interfaces

9.5. syslog System Events

9.6. The inetd Super-Server

9.7. Scheduling Tasks with cron and atd

9.8. Scheduling Asynchronous Tasks: anacron

9.9. Quotas

9.10. Backup

9.11. Hot Plugging: hotplug

9.12. Power Management

9.13. Laptop Extension Cards: PCMCIA

10. Network Infrastructure

10.1. Gateway

10.2. Virtual Private Network

10.3. Quality of Service

10.4. Dynamic Routing

10.5. IPv6

10.6. Domain Name Servers (DNS)

10.7. DHCP

10.8. Network Diagnosis Tools

11. Network Services: Postfix, Apache, NFS, Samba, Squid, LDAP

11.1. Mail Server

11.2. Web Server (HTTP)

11.3. FTP File Server

11.4. NFS File Server

11.5. Setting Up Windows Shares with Samba

11.6. HTTP/FTP Proxy

11.7. LDAP Directory

12. Advanced Administration

12.1. RAID and LVM

12.2. Virtualization

12.3. Automated Installation

12.4. Monitoring

13. Workstation

13.1. Configuring the X11 Server

13.2. Customizing the Graphical Interface

13.3. Graphical Desktops

13.4. Tools

13.5. Emulating Windows: Wine

14. Security

14.1. Defining a Security Policy

14.2. Firewall or Packet Filtering

14.3. Supervision: Prevention, Detection, Deterrence

14.4. Introduction to SELinux

14.5. Other Security-Related Considerations

14.6. Dealing with a Compromised Machine

15. Creating a Debian Package

15.1. Rebuilding a Package from its Sources

15.2. Building your First Package

15.3. Creating a Package Repository for APT

15.4. Becoming a Package Maintainer

16. Conclusion: Debian's Future

16.1. Upcoming Developments

16.2. Debian's Future

16.3. Future of this Book

A. Derivative Distributions

A.1. Census and Cooperation

A.2. Ubuntu

A.3. Knoppix

A.4. Linux Mint

A.5. SimplyMEPIS

A.6. Aptosid (Formerly Sidux)

A.7. Damn Small Linux

A.8. And Many More

B. Short Remedial Course

B.1. Shell and Basic Commands

B.2. Organization of the Filesystem Hierarchy

B.3. Inner Workings of a Computer: the Different Layers Involved

B.4. Some Tasks Handled by the Kernel

B.5. The User Space

The Debian Administrator's Handbook

Debian Squeeze from Discovery to Mastery

Raphaël Hertzog

<hertzog@debian.org>

Roland Mas

<lolando@debian.org>

Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Raphaël Hertzog

Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012 Roland Mas

Copyright © 2012 Freexian SARL

ISBN: 979-10-91414-00-5 (paperback)

ISBN: 979-10-91414-01-2 (ebook)

This book is available under the terms of two licenses compatible with the Debian Free Software Guidelines.

Creative Commons License Notice: This book is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

→ http://creativecommons.org/licenses/by-sa/3.0/

GNU General Public License Notice: This book is free documentation: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This book is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Show your appreciation

This book is published under a free license because we want everybody to benefit from it. That said maintaining it takes time and lots of efforts, and we appreciate being thanked for this. If you find this book valuable, please consider contributing to its continued maintenance either by buying a paperback copy or by making a donation through the book's official website:

→ http://debian-handbook.info

Abstract

A reference book presenting the Debian distribution, from initial installation to configuration of services.

Preface

Many professionals are increasingly embracing Debian GNU/Linux, whose goal to create a rich and flexible distribution that does not require too much maintenance fits their expectations. They generally appreciate its robustness and reliability, its automation of secondary tasks, as well as the coherence brought by the strict application of specifications and therefore the durability of achievements and skills.

At the same time, many influential actors in the computing industry have now come to understand the strategic interest of using an elaborate distribution that is not managed by a commercial entity. Some of their customers also understand — following the same logic — that a software platform that does not depend on agreements between suppliers reduces the constraints they will have after the purchase.

Finally, many beginners discover Debian through the Knoppix and Ubuntu projects, while others “look under the hood” because they want to avoid empiricism.

Debian — which used to be low-profile — was first adopted by passionate users, who were often attracted by the spirit it embodies. They found a project with clear goals and visible achievements, whose developers focus on creating a good design before building — thereby rejecting the deadlines that often compromise the quality of so many other software projects. Debian is led by its very actors. In other words, Debian users join a project that fully benefits from the advantages of free software… so as to produce free software themselves.