Debian Reference

Debian Reference

Osamu Aoki `Authors' on page 247

CVS, Thu Jan 18 11:52:15 UTC 2007

Abstract

This Debian Reference () is intended to provide a broad overview of the Debian system as a post-installation user's guide. It covers many aspects of system administration through shell-command examples. Basic tutorials, tips, and other information are provided for topics including fundamental concepts of the Debian system, system installation hints, Debian package management, the Linux kernel under Debian, system tuning, building a gateway, text editors, CVS, programming, and GnuPG for non-developers.

Copyright Notice

Copyright ? 2001?2005 by Osamu Aoki . Copyright (Chapter 2) ? 1996?2001 by Software in the Public Interest.

This document may be used under the terms of the GNU General Public License version 2 or higher. ()

Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.

i

Contents

1 Preface

1

1.1 Official document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Document conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Example scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.4 Basic setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.5 Basics of the Debian distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Debian fundamentals

5

2.1 The Debian archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 Directory structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.2 Debian distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.3 The stable distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.4 The testing distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.5 The unstable distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.6 The frozen distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.7 Debian distribution codenames . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.8 Codenames used in the past . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.9 The source for codenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.10 The pool directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.11 Historical notes about Sid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.12 Uploaded packages in incoming/ . . . . . . . . . . . . . . . . . . . . . . 9

2.1.13 Retrieving an older package . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1.14 Architecture sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1.15 The source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

CONTENTS

ii

2.2 The Debian package management system . . . . . . . . . . . . . . . . . . . . . . . 11 2.2.1 Overview of Debian packages . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2.2 Debian package format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.3 Naming conventions for Debian package filenames . . . . . . . . . . . . . 12 2.2.4 Preservation of local configuration . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.5 Debian maintenance scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.6 Package priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.7 Virtual packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.8 Package dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2.9 The meaning of "Pre-Depends" . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.10 Package status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.11 Holding back packages from an upgrade . . . . . . . . . . . . . . . . . . . 16 2.2.12 Source packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.13 Building binary packages from a source package . . . . . . . . . . . . . . . 17 2.2.14 Creating new Debian packages . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.3 Upgrading a Debian system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3.1 dpkg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.3.2 APT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.3 dselect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.4 Upgrading a running system . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.5 Downloaded and cached .deb archive files . . . . . . . . . . . . . . . . . . 19 2.3.6 Record-keeping for upgrades . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2.4 The Debian boot process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.4.1 The init program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.4.2 Runlevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.4.3 Customizing runlevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.5 Supporting diversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.6 Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.7 Debian and the kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.7.1 Compiling a kernel from non-Debian source . . . . . . . . . . . . . . . . . 22 2.7.2 Tools to build custom kernels . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.7.3 Special provisions for dealing with modules . . . . . . . . . . . . . . . . . 23 2.7.4 De-installing an old kernel package . . . . . . . . . . . . . . . . . . . . . . 23

CONTENTS

iii

3 Debian System installation hints

25

3.1 General Linux system installation hints . . . . . . . . . . . . . . . . . . . . . . . . 25

3.1.1 Hardware compatibility basics . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.1.2 Determining a PC's hardware and chip set . . . . . . . . . . . . . . . . . . 26

3.1.3 Determining a PC's hardware via Debian . . . . . . . . . . . . . . . . . . . 26

3.1.4 Determining a PC's hardware via other OSs . . . . . . . . . . . . . . . . . 27

3.1.5 A Lilo myth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.1.6 GRUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.1.7 Choice of boot floppies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.1.8 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.1.9 Hosts and IP to use for LAN . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.1.10 User accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.1.11 Creating filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.1.12 DRAM memory guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.1.13 Swap space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.2 Bash configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.3 Mouse configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.3.1 PS/2 mice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.3.2 USB mice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.3.3 Touchpad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

3.4 NFS configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.5 Samba configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.6 Printer configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.6.1 lpr/lpd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.6.2 CUPSTM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.7 CRON for desktop PCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.8 Other host installation hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.8.1 Install a few more packages after initial install . . . . . . . . . . . . . . . . 40

3.8.2 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.8.3 CD-RW basic setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.8.4 Large memory and auto power-off . . . . . . . . . . . . . . . . . . . . . . . 41

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download