Beyond From Scratch Beyond Linux From Scratch

Table of Contents

Beyond Linux From Scratch...... 1 Version 20020311...... 1 BLFS Development Team...... 1

Dedication...... 2

Preface...... 5

Foreword...... 6

Who would want to read this book...... 7

Organization...... 8 Part I − Introduction...... 8 Part II − General system software...... 8 Part III − Networking...... 8 Part IV − The X Window System...... 8 Part V − Printer and Scanner Support...... 8 Part − Multimedia Support...... 8 Appendices...... 8

I. Introduction...... 9

Chapter 1. Introduction...... 10

Welcome to BLFS...... 11

Conventions used in this book...... 12

Book version...... 13 HTTP Mirrors...... 13 North America...... 13 Europe...... 13

Acknowledgments...... 14

Credits...... 15 Editors...... 15 Text Authors...... 15 Installation Instruction Authors...... 15 General Acknowledgments...... 16

Changelog...... 17

Which sections of the book do I want?...... 21

ii Beyond Linux From Scratch

Table of Contents

Mailing lists and archives...... 22 blfs−dev...... 22 blfs−book...... 22 blfs−support...... 23 lfs−support...... 23 lfs−dev...... 23 lfs−announce...... 23 lfs−security...... 23 lfs−book...... 23 alfs−discuss...... 23 Mail archives...... 24 How to subscribe?...... 24 How to unsubscribe?...... 24 Other list modes...... 25 Digests...... 25 Vacation...... 25

News server...... 26

Contact information...... 27

Chapter 2. Important Information...... 28

Getting and unpacking the software...... 29 Unpacking the software...... 29

The /usr versus /usr/local debate...... 30

Using BLFS bootscripts...... 32

II. General System Software...... 33

Chapter 3. After LFS Configuration Issues...... 34

Introduction...... 35

Customising your logon (/etc/issue)...... 36

/etc/inputrc...... 37

/etc/vimrc, ~/.vimrc...... 38

Creating a custom bootdisk...... 40

Chapter 4. Shared Libraries...... 41

iiii Beyond Linux From Scratch

Table of Contents

Introduction...... 42

Installing zlib−1.1.4...... 43 zlib−1.1.4...... 43 Introduction to zlib...... 43 Installation of zlib...... 43 Command explanations...... 43 Configuring zlib...... 43 Contents...... 44

Installing openssl−0.9.6b...... 45 openssl−0.9.6b...... 45 Introduction to openssl...... 45 Installation of openssl...... 45 Command explanations...... 45 Configuring Openssl...... 45 Contents...... 46 Description...... 46

Graphics libraries...... 47

Installing lcms−1.08...... 48 lcms−1.08...... 48 Introduction to lcms...... 48 Installation of lcms...... 48 Command explanations...... 48 Configuring lcms...... 48 Contents...... 48 Description...... 48

Installing libjpeg−6b...... 49 libjpeg−6b...... 49 Introduction to libjpeg...... 49 Installation of libjpeg...... 49 Command explanations...... 49 Configuring libjpeg...... 49 Contents...... 49 Description...... 49

Installing libpng−1.2.1...... 51 libpng−1.2.1...... 51 Introduction to libpng...... 51 Installation of libpng...... 51 Command explanations...... 51 Configuring libpng...... 51 Contents...... 51 Description...... 52

iii Beyond Linux From Scratch

Table of Contents

Installing libtiff−3.5.7...... 53 libtiff−3.5.7...... 53 Introduction to libtiff...... 53 Installation of libtiff...... 53 Command explanations...... 53 Configuring libtiff...... 53 Contents...... 53 Description...... 54

Installing libungif−4.1.0b1...... 56 libungif−4.1.0b1...... 56 Introduction to libungif...... 56 Installation of libungif...... 56 Configuring libungif...... 56 Contents...... 56 Description...... 56

Installing libmng−1.0.3...... 60 libmng−1.0.3...... 60 Introduction to libmng...... 60 Installation of libmng...... 60 Command explanations...... 60 Configuring libmng...... 60 Contents...... 60 Description...... 60

Chapter 5. Basic software and drivers...... 62

Introduction...... 63

Installing ALSA−0.5.12a/0.9.0beta10...... 64 alsa−0.5.12a/0.9.0beta10...... 64 Introduction to alsa...... 64 Contents...... 64 Installation of alsa...... 65 Configuring alsa...... 67 Soundcards supported by alsa...... 68

Installing cvs−1.11.1p1...... 69 cvs−1.11.1p1...... 69 Introduction to cvs...... 69 Installation of cvs...... 69 Configuring cvs...... 69 Contents...... 69 Description...... 69

iv Beyond Linux From Scratch

Table of Contents

Installing db−4.0.14...... 71 db−4.0.14...... 71 Introduction to db...... 71 Installation of db...... 71 Command explanations...... 71 Configuring db...... 71 Contents...... 71 Description...... 72

Installing fcron−2.0.0...... 73 fcron−2.0.0...... 73 Introduction to f ...... 73 Installation of fcron...... 73 Install fcron without MTA...... 73 Configuring fcron...... 74 Contents...... 74 Description...... 74

Installing gpm−1.20.0...... 75 gpm−1.20.0...... 75 Introduction to gpm...... 75 Installation of gpm...... 75 Configuring gpm...... 75 Contents...... 77 Description...... 77

Installing hdparm−4.6...... 78 hdparm−4.6...... 78 Introduction to hdparm...... 78 Installation of hdparm...... 78 Contents...... 78 Description...... 78

III. Networking...... 79

Chapter 6. Connecting to networks...... 80

Introduction...... 81

DHCP...... 82

Installing dhcpcd−1.3.22−pl1...... 83 dhcpcd−1.3.22−pl1...... 83 Introduction to dhcpcd...... 83 Installation of dhcpcd...... 83 Command explanations...... 83 Configuring dhcpcd...... 83 Contents...... 83

v Beyond Linux From Scratch

Table of Contents

Setting up a network firewall Packetfilter / partly accessible net [partly described here, see BusyBox]...... 96 Disclaimer...... 96 Getting a firewalling−enabled Kernel...... 96 Now you can start to build your Firewall...... 97 Personal Firewall...... 97 Masquerading Router...... 98 BusyBox...... 100 Editor's Note...... 101 Extra Information...... 102 Where to start with further reading on firewalling...... 102 firewall.status...... 102 firewall.stop...... 103

Chapter 7. Basic network software...... 104

Installing ncftp−3.1.2...... 105 ncftp−3.1.2...... 105 Introduction to ncftp...... 105 Installation of ncftp...... 105 Command explanations...... 105 Configuring ncftp...... 105 Contents...... 106 Description...... 106

Text−mode browsers...... 107

Installing links−0.96...... 108 links−0.96...... 108 Introduction to links...... 108 Installation of links...... 108 Configuring links...... 108 Contents...... 108 Description...... 108

Installing lynx−2.8.4...... 109 lynx−2.8.4...... 109 Introduction to lynx...... 109 Installation of lynx...... 109 Command explanations...... 109 Configuring lynx...... 110 Contents...... 110 Description...... 110

The openssh−3.1p1 client...... 111

vii Beyond Linux From Scratch

Table of Contents

Chapter 8. Setting up mail...... 112

Chapter 9. Server software...... 113

Installing openssh−3.1p1...... 114 openssh−3.1p1...... 114 Introduction to openSSH...... 114 Installation of openSSH...... 114 Command explanations...... 114 Configuring openSSH...... 114 Contents...... 115 Description...... 116

IV. The X Window System...... 117

Chapter 10. Installing X11...... 118

Chapter 11. GNOME, KDE or what else?...... 119

Chapter 12. Installing GNOME...... 120

Chapter 13. Installing KDE...... 121

Chapter 14. Other possibilities...... 122

V. Printer and Scanner Support...... 123

Chapter 15. Setting up your printer...... 124

Chapter 16. Scanner support...... 125

VI. Multimedia Support...... 126

Chapter 17. Multimedia Libraries...... 127

Introduction...... 128

Installing SDL−1.2.2...... 129 SDL−1.2.2...... 129 Introduction to SDL...... 129 Installation of SDL...... 129 Command explanations...... 129 Configuring SDL...... 129 Contents...... 129 Description...... 129

viii Beyond Linux From Scratch

Table of Contents

Chapter 18. Audio...... 130

Introduction...... 131

Installing CDParanoia−III−9.8...... 132 CDParanoia−III−9.8...... 132 Introduction to CDParanoia...... 132 Installation of CDParanoia...... 132 Configuring CDParanoia...... 132 Contents...... 132 Description...... 132

Installing mpg123−0.59r...... 133 mpg123−0.59r...... 133 Introduction to mpg123...... 133 Installation of mpg123...... 133 Command explanations...... 133 Contents...... 133 Description...... 133

Installing xmms−1.2.5...... 134 xmms−1.2.5...... 134 Introduction to XMMS...... 134 Installation of XMMS...... 134 Command explanations...... 134 Configuring xmms...... 134 Contents...... 134 Description...... 135

Chapter 19. Video...... 136

Chapter 20. Writing...... 137

VII. Appendices...... 138

Appendix A. Installation Instructions...... 139

Introduction...... 140 daemontools−0.76...... 141 Introduction to Daemontools...... 141 Installation of daemontools...... 141 Command explanations...... 141 Contents...... 142 Description...... 142 svscanboot...... 142 svscan...... 142 supervise...... 142

ix Welcome to BLFS

The Beyond LinuxFromScratch book is designed to carry on from where the LFS book leaves off. Unlike the LFS book, it isn't designed to be followed straight through. Reading the Which sections of the book do I want? part of this chapter should help guide you through the book.

Please read most of Part 1 of the book carefully as it explains quite a few of the conventions we use throughout the book.

WelcometoBL FS 11