1003
Beyond Linux ® From Scratch Version 6.1 BLFS Development Team

blfs-book-6.1

Embed Size (px)

DESCRIPTION

blfs-book-6.1

Citation preview

  • Beyond Linux From ScratchVersion 6.1

    BLFS Development Team

  • Beyond Linux From Scratch: Version 6.1by BLFS Development Team

    Published 2005-08-14Copyright 2001-2005 BLFS Development Team

    Abstract

    This book follows on from the Linux From Scratch book. It introduces and guides the reader through additions to the system includingnetworking, graphical interfaces, sound support, and printer and scanner support.Copyright 2001-2005, BLFS Development TeamAll rights reserved.Descriptive text is licensed under a Creative Commons License.Computer instructions are licensed under the Academic Free License v. 2.1.Linux is a registered trademark of Linus Torvalds.

  • DedicationThis book is dedicated to the LFS community

    Beyond Linux From Scratch - Version 6.1

    i

  • Table of ContentsPreface .............................................................................................................................................................. xii

    Foreword .................................................................................................................................................... xiiWho Would Want to Read this Book ........................................................................................................ xvOrganization .............................................................................................................................................. xvi

    I. Introduction .................................................................................................................................................. 181. Welcome to BLFS .................................................................................................................................. 19

    Acknowledgments ................................................................................................................................ 19Credits .................................................................................................................................................. 20Which Sections of the Book Do I Want? ............................................................................................. 24Conventions Used in this Book ........................................................................................................... 25Book Version ....................................................................................................................................... 27Mirror Sites .......................................................................................................................................... 28Getting the Source Packages ................................................................................................................ 29Change Log .......................................................................................................................................... 30Mailing Lists ........................................................................................................................................ 40News Server ......................................................................................................................................... 41Asking for Help and the FAQ .............................................................................................................. 42Contact Information ............................................................................................................................. 44

    2. Important Information ............................................................................................................................ 45Package Management .......................................................................................................................... 45Notes on Building Software ................................................................................................................. 48The /usr Versus /usr/local Debate ........................................................................................................ 50Optional Patches .................................................................................................................................. 51BLFS Boot Scripts ............................................................................................................................... 52Going Beyond BLFS ........................................................................................................................... 53

    II. Post LFS Configuration and Extra Software ............................................................................................... 553. After LFS Configuration Issues ............................................................................................................. 56

    Creating a Custom Boot Device .......................................................................................................... 56Configuring for Adding Users ............................................................................................................. 58About System Users and Groups ......................................................................................................... 60The Bash Shell Startup Files ................................................................................................................ 62The /etc/vimrc and ~/.vimrc Files ........................................................................................................ 71Customizing your Logon with /etc/issue ............................................................................................. 72The /etc/shells File ............................................................................................................................... 73Random Number Generation ............................................................................................................... 74Compressing Man and Info Pages ....................................................................................................... 75Automate Mounting of File Systems ................................................................................................... 85Configuring for Network Filesystems ................................................................................................. 88

    4. Security .................................................................................................................................................. 89OpenSSL-0.9.7g ................................................................................................................................... 89CrackLib-2.8.3 ..................................................................................................................................... 92Linux-PAM-0.80 .................................................................................................................................. 95Shadow-4.0.9 ....................................................................................................................................... 98Iptables-1.3.3 ...................................................................................................................................... 104

    Beyond Linux From Scratch - Version 6.1

    ii

  • Setting Up a Network Firewall .......................................................................................................... 106GnuPG-1.4.1 ...................................................................................................................................... 115Tripwire-portable-0.9 ......................................................................................................................... 117Heimdal-0.7 ....................................................................................................................................... 120MIT Krb5-1.4.1 .................................................................................................................................. 128Cyrus SASL-2.1.21 ............................................................................................................................ 129Stunnel-4.11 ....................................................................................................................................... 132

    5. File Systems ......................................................................................................................................... 135Ext3 .................................................................................................................................................... 135ReiserFS-3.6.19 .................................................................................................................................. 136XFS-2.6.25 ......................................................................................................................................... 138

    6. Editors .................................................................................................................................................. 140Vim-6.3 .............................................................................................................................................. 140Emacs-21.4a ....................................................................................................................................... 142Nano-1.2.5 .......................................................................................................................................... 144JOE-3.3 .............................................................................................................................................. 146Ed-0.2 ................................................................................................................................................. 148Bluefish-1.0.2 ..................................................................................................................................... 150Other Editors ...................................................................................................................................... 152

    7. Shells .................................................................................................................................................... 153ASH-0.4.0 .......................................................................................................................................... 153Tcsh-6.14.00 ...................................................................................................................................... 155ZSH-4.2.5 ........................................................................................................................................... 157

    III. General Libraries and Utilities ................................................................................................................. 1598. General Libraries ................................................................................................................................. 160

    PCRE-6.1 ........................................................................................................................................... 160Popt-1.7-5 ........................................................................................................................................... 162Slang-1.4.9 ......................................................................................................................................... 164FAM-2.7.0 .......................................................................................................................................... 166Libxml-1.8.17 .................................................................................................................................... 169Libxml2-2.6.20 .................................................................................................................................. 170Libxslt-1.1.14 ..................................................................................................................................... 172GMP-4.1.4 .......................................................................................................................................... 174GDBM-1.8.3 ...................................................................................................................................... 175GLib-1.2.10 ........................................................................................................................................ 177GLib-2.6.4 .......................................................................................................................................... 179LibIDL-0.8.5 ...................................................................................................................................... 181Libcroco-0.6.0 .................................................................................................................................... 183Libgsf-1.12.0 ...................................................................................................................................... 184Libglade-2.5.1 .................................................................................................................................... 185Expat-1.95.8 ....................................................................................................................................... 187Libesmtp-1.0.3r1 ................................................................................................................................ 188Aspell-0.60.3 ...................................................................................................................................... 189Ispell-3.2.06.epa7 ............................................................................................................................... 192SLIB-3a1 ............................................................................................................................................ 194G-Wrap-1.3.4 ..................................................................................................................................... 196LZO-2.01 ........................................................................................................................................... 197Libusb-0.1.10a ................................................................................................................................... 198

    9. Graphics and Font Libraries ................................................................................................................. 200

    Beyond Linux From Scratch - Version 6.1

    iii

  • Libjpeg-6b .......................................................................................................................................... 200Libpng-1.2.8 ....................................................................................................................................... 202Libtiff-3.7.3 ........................................................................................................................................ 204Libungif-4.1.3 .................................................................................................................................... 206Giflib-4.1.3 ......................................................................................................................................... 209Lcms-1.14 .......................................................................................................................................... 212Libmng-1.0.9 ...................................................................................................................................... 214FreeType-2.1.10 ................................................................................................................................. 216Fontconfig-2.3.2 ................................................................................................................................. 217Libart_lgpl-2.3.17 .............................................................................................................................. 220Librsvg-2.9.5 ...................................................................................................................................... 221Imlib-1.9.15 ........................................................................................................................................ 223AAlib-1.4rc5 ...................................................................................................................................... 225Imlib2-1.2.1 ........................................................................................................................................ 227libexif-0.6.12 ...................................................................................................................................... 229FriBidi-0.10.5 ..................................................................................................................................... 230

    10. General Utilities ................................................................................................................................. 231Bc-1.06 ............................................................................................................................................... 231Rep-gtk-0.18 ...................................................................................................................................... 233Compface-1.4 ..................................................................................................................................... 235ImageMagick-6.2.3-5 ......................................................................................................................... 237Hd2u-1.0.0 ......................................................................................................................................... 239GTK-Doc-1.3 ..................................................................................................................................... 240Intltool-0.33 ....................................................................................................................................... 242Screen-4.0.2 ....................................................................................................................................... 244HTML Tidy-050722 .......................................................................................................................... 246desktop-file-utils-0.10 ........................................................................................................................ 249XScreenSaver-4.21 ............................................................................................................................ 251Pilot-link-0.11.8 ................................................................................................................................. 253

    11. System Utilities .................................................................................................................................. 255GPM-1.20.1 ........................................................................................................................................ 255Fcron-2.9.7 ......................................................................................................................................... 258Hdparm-6.1 ........................................................................................................................................ 261Which-2.16 and Alternatives ............................................................................................................. 263UnZip-5.52 ......................................................................................................................................... 265Zip-2.31 .............................................................................................................................................. 267PCI Utilities-2.1.11 ............................................................................................................................ 269Pkg-config-0.19 ................................................................................................................................. 271Cpio-2.6 ............................................................................................................................................. 273MC-4.6.1 ............................................................................................................................................ 275Sysstat-6.0.0 ....................................................................................................................................... 277Apache Ant-1.6.2 ............................................................................................................................... 280

    12. Programming ...................................................................................................................................... 283DejaGnu-1.4.4 .................................................................................................................................... 283Doxygen-1.4.3 .................................................................................................................................... 285Expect-5.43.0 ..................................................................................................................................... 287GCC-3.4.3 .......................................................................................................................................... 290GCC-3.3.4 .......................................................................................................................................... 295Guile-1.6.7 ......................................................................................................................................... 297

    Beyond Linux From Scratch - Version 6.1

    iv

  • JDK-1.5.0 ........................................................................................................................................... 299Librep-0.17 ......................................................................................................................................... 305NASM-0.98.39 ................................................................................................................................... 307PDL-2.4.2 ........................................................................................................................................... 309Perl Modules ...................................................................................................................................... 314PHP-5.0.4 ........................................................................................................................................... 321Python-2.4.1 ....................................................................................................................................... 324Ruby-1.8.2 .......................................................................................................................................... 326Tcl-8.4.11 ........................................................................................................................................... 328Tk-8.4.11 ............................................................................................................................................ 330Other Programming Tools ................................................................................................................. 332

    IV. Connecting to a Network ......................................................................................................................... 33713. Dial-up Networking ........................................................................................................................... 338

    PPP-2.4.3 ........................................................................................................................................... 338WvDial-1.54.0 .................................................................................................................................... 340

    14. DHCP Clients .................................................................................................................................... 342DHCP-3.0.2 Client ............................................................................................................................. 342Dhcpcd-1.3.22-pl4 ............................................................................................................................. 344

    15. Other Connections ............................................................................................................................. 347RP-PPPoE-3.5 .................................................................................................................................... 347

    V. Basic Networking ...................................................................................................................................... 35016. Networking Libraries ......................................................................................................................... 351

    CURL-7.14.0 ...................................................................................................................................... 351WvStreams-4.0.1 ................................................................................................................................ 353GNet-2.0.7 .......................................................................................................................................... 356Libsoup-2.2.3 ..................................................................................................................................... 357Libpcap-0.9.3 ..................................................................................................................................... 358

    17. Text Web Browsers ............................................................................................................................ 359Links-2.1pre17 ................................................................................................................................... 359Lynx-2.8.5 .......................................................................................................................................... 361W3m-0.5.1 ......................................................................................................................................... 363

    18. Basic Networking Programs .............................................................................................................. 365CVS-1.11.20 ...................................................................................................................................... 365Inetutils-1.4.2 ..................................................................................................................................... 367NcFTP-3.1.9 ....................................................................................................................................... 369NCPFS-2.2.4 ...................................................................................................................................... 371Net-tools-1.60 .................................................................................................................................... 374NTP-4.2.0 ........................................................................................................................................... 377OpenSSH-4.1p1 Client ...................................................................................................................... 380Portmap-5beta .................................................................................................................................... 381Rsync-2.6.5 Client ............................................................................................................................. 383Samba-3.0.14a Client ......................................................................................................................... 384Subversion-1.1.4 ................................................................................................................................ 385Tcpwrappers-7.6 ................................................................................................................................ 388Wget-1.9.1 .......................................................................................................................................... 390

    19. Basic Networking Utilities ................................................................................................................. 392Traceroute-1.4a12 .............................................................................................................................. 392Nmap-3.81 ......................................................................................................................................... 394Whois-4.7.5 ........................................................................................................................................ 395

    Beyond Linux From Scratch - Version 6.1

    v

  • BIND Utilities-9.3.1 ........................................................................................................................... 396Ethereal-0.10.12 ................................................................................................................................. 398

    20. Mail/News Clients ............................................................................................................................. 401Nail-11.24 .......................................................................................................................................... 401Procmail-3.22 ..................................................................................................................................... 403Fetchmail-6.2.5.2 ............................................................................................................................... 405Mutt-1.4.2.1i ...................................................................................................................................... 407Pine-4.63 ............................................................................................................................................ 409Slrn-0.9.8.1 ......................................................................................................................................... 411Other Mail and News Programs ......................................................................................................... 413

    VI. Servers ..................................................................................................................................................... 41421. Major Servers ..................................................................................................................................... 415

    Apache-2.0.54 .................................................................................................................................... 415BIND-9.3.1 ........................................................................................................................................ 418NFS Utilities-1.0.7 ............................................................................................................................. 425OpenSSH-4.1p1 ................................................................................................................................. 429ProFTPD-1.2.10 ................................................................................................................................. 432Samba-3.0.14a .................................................................................................................................... 436vsFTPD-2.0.3 ..................................................................................................................................... 445xinetd-2.3.13 ...................................................................................................................................... 447

    22. Mail Server Software ......................................................................................................................... 458Exim-4.52 ........................................................................................................................................... 458Postfix-2.2.5 ....................................................................................................................................... 462Qpopper-4.0.5 .................................................................................................................................... 467Sendmail-8.13.4 ................................................................................................................................. 469

    23. Databases ........................................................................................................................................... 473Berkeley DB-4.3.28 ........................................................................................................................... 473MySQL-4.1.12 ................................................................................................................................... 476PostgreSQL-8.0.3 ............................................................................................................................... 479

    24. Other Server Software ........................................................................................................................ 483DHCP-3.0.2 ........................................................................................................................................ 483Leafnode-1.10.8 ................................................................................................................................. 486OpenLDAP-2.2.24 ............................................................................................................................. 489rsync-2.6.5 .......................................................................................................................................... 493Running a CVS Server ....................................................................................................................... 496Running a Subversion Server ............................................................................................................. 499

    VII. X + Window Managers .......................................................................................................................... 50325. X Window System Environment ....................................................................................................... 504

    Xorg-6.8.2 .......................................................................................................................................... 504XFree86-4.5.0 .................................................................................................................................... 511Additional X Window System Configuration .................................................................................... 520X Window System Components ........................................................................................................ 522

    26. X Libraries ......................................................................................................................................... 526Qt-3.3.4 .............................................................................................................................................. 526GTK+-1.2.10 ...................................................................................................................................... 531Pango-1.8.1 ........................................................................................................................................ 533ATK-1.9.1 .......................................................................................................................................... 535GTK+-2.6.7 ........................................................................................................................................ 537LessTif-0.94.4 .................................................................................................................................... 539

    Beyond Linux From Scratch - Version 6.1

    vi

  • startup-notification-0.8 ....................................................................................................................... 542Libwnck-2.10.0 .................................................................................................................................. 544shared-mime-info-0.16 ....................................................................................................................... 546hicolor-icon-theme-0.8 ....................................................................................................................... 548libxklavier-2.0 .................................................................................................................................... 549freeglut-2.4.0 ...................................................................................................................................... 550

    27. Window Managers ............................................................................................................................. 552Introduction ........................................................................................................................................ 552sawfish-1.3 ......................................................................................................................................... 553Fluxbox-0.9.13 ................................................................................................................................... 555Metacity-2.10.1 .................................................................................................................................. 557XFce-4.2.2 .......................................................................................................................................... 559Other Window Managers ................................................................................................................... 562

    VIII. KDE ...................................................................................................................................................... 56328. KDE Core Packages ........................................................................................................................... 565

    KDE Pre-installation Configuration .................................................................................................. 565aRts-1.4.1 ........................................................................................................................................... 567Kdelibs-3.4.1 ...................................................................................................................................... 569Kdebase-3.4.1 .................................................................................................................................... 571Configuring the Core KDE Packages ................................................................................................ 574

    29. KDE Additional Packages ................................................................................................................. 575Kdeadmin-3.4.1 .................................................................................................................................. 575Kdenetwork-3.4.1 .............................................................................................................................. 577Kdepim-3.4.1 ..................................................................................................................................... 579Kdemultimedia-3.4.1 ......................................................................................................................... 581Kdegraphics-3.4.1 .............................................................................................................................. 583Kdeutils-3.4.1 ..................................................................................................................................... 585Kdeedu-3.4.1 ...................................................................................................................................... 587Kdesdk-3.4.1 ...................................................................................................................................... 589Kdevelop-3.2.1 ................................................................................................................................... 591Kdewebdev-3.4.1 ............................................................................................................................... 593Kdebindings-3.4.1 .............................................................................................................................. 595Kdeaccessibility-3.4.1 ........................................................................................................................ 597Kdetoys-3.4.1 ..................................................................................................................................... 599Kdegames-3.4.1 ................................................................................................................................. 601Kdeartwork-3.4.1 ............................................................................................................................... 603Kdeaddons-3.4.1 ................................................................................................................................ 604Kde-i18n-3.4.1 ................................................................................................................................... 605

    IX. GNOME ................................................................................................................................................... 60730. GNOME Core Packages .................................................................................................................... 609

    Pre-installation Configuration ............................................................................................................ 609ORBit2-2.12.2 .................................................................................................................................... 610Libbonobo-2.8.1 ................................................................................................................................. 612GConf-2.10.0 ..................................................................................................................................... 614Desktop-file-utils-0.10 ....................................................................................................................... 616GNOME MIME Data-2.4.2 ............................................................................................................... 617GNOME Virtual File System-2.10.1 ................................................................................................. 619Libgnome-2.10.0 ................................................................................................................................ 621Libgnomecanvas-2.10.0 ..................................................................................................................... 623

    Beyond Linux From Scratch - Version 6.1

    vii

  • Libbonoboui-2.8.1 .............................................................................................................................. 625GNOME Icon Theme-2.10.1 ............................................................................................................. 627Gnome-keyring-0.4.2 ......................................................................................................................... 628Libgnomeui-2.10.0 ............................................................................................................................. 630GTK Engines-2.6.3 ............................................................................................................................ 632GNOME Themes-2.10.1 .................................................................................................................... 633ScrollKeeper-0.3.14 ........................................................................................................................... 634GNOME Desktop-2.10.1 ................................................................................................................... 636Gnome-backgrounds-2.10.1 ............................................................................................................... 638Gnome-menus-2.10.1 ......................................................................................................................... 640GNOME Panel-2.10.1 ........................................................................................................................ 642GNOME Session-2.10.0 .................................................................................................................... 644VTE-0.11.13 ...................................................................................................................................... 646GNOME Terminal-2.10.0 .................................................................................................................. 648LibGTop-2.10.1 ................................................................................................................................. 650GAIL-1.8.3 ......................................................................................................................................... 652GNOME Applets-2.10.1 .................................................................................................................... 654EEL-2.10.1 ......................................................................................................................................... 656Nautilus-2.10.1 ................................................................................................................................... 657GNOME Doc Utils-0.2.0 ................................................................................................................... 659Libgtkhtml-2.6.3 ................................................................................................................................ 661Yelp-2.6.5 .......................................................................................................................................... 663Control Center-2.10.1 ........................................................................................................................ 665GNOME2 User Docs-2.8.1 ................................................................................................................ 667Configuring the Core GNOME Packages .......................................................................................... 669

    31. GNOME Additional Packages ........................................................................................................... 670libgnomecups-0.2.0 ............................................................................................................................ 670libgnomeprint-2.10.3 .......................................................................................................................... 672libgnomeprintui-2.10.2 ...................................................................................................................... 674GAL-2.4.2 .......................................................................................................................................... 676GtkHTML-3.6.2 ................................................................................................................................. 678Evolution Data Server-1.2.2 .............................................................................................................. 680bug-buddy-2.10.0 ............................................................................................................................... 682gtksourceview-1.2.0 ........................................................................................................................... 684gedit-2.10.2 ........................................................................................................................................ 686EOG-2.10.0 ........................................................................................................................................ 688GGV-2.8.4 .......................................................................................................................................... 690File Roller-2.10.3 ............................................................................................................................... 692GConf Editor-2.10.0 .......................................................................................................................... 694GNOME Utilities-2.10.1 .................................................................................................................... 696system-tools-backends-1.2.0 .............................................................................................................. 698GNOME System Monitor-2.10.1 ....................................................................................................... 700Nautilus CD Burner-2.10.1 ................................................................................................................ 702GNOME Media-2.10.2 ...................................................................................................................... 704gnome-audio-2.0.0 ............................................................................................................................. 706GNOME Netstatus-2.10.0 .................................................................................................................. 707gcalctool-5.5.42 .................................................................................................................................. 709GPdf-2.10.0 ........................................................................................................................................ 711gucharmap-1.4.3 ................................................................................................................................ 713

    Beyond Linux From Scratch - Version 6.1

    viii

  • Zenity-2.10.0 ...................................................................................................................................... 715AT SPI-1.6.4 ...................................................................................................................................... 717libgail-gnome-1.1.1 ............................................................................................................................ 719Java Access Bridge-1.4.5 ................................................................................................................... 720GNOME Speech-0.3.7 ....................................................................................................................... 722GNOME Magnifier-0.12.1 ................................................................................................................. 724Gnopernicus-0.10.9 ............................................................................................................................ 726GOK-1.0.4 .......................................................................................................................................... 728Epiphany-1.6.2 ................................................................................................................................... 730GnomeMeeting-1.2.1 ......................................................................................................................... 732GNOME Games-2.10.1 ..................................................................................................................... 734GDM-2.6.0.9 ...................................................................................................................................... 736

    32. GNOME 1.4 Libraries ....................................................................................................................... 739Pre-installation Configuration ............................................................................................................ 739ORBit-0.5.17 ...................................................................................................................................... 740OAF-0.6.10 ........................................................................................................................................ 742GNOME Libraries-1.4.2 .................................................................................................................... 744GDK Pixel Buffer-0.22.0 ................................................................................................................... 746GNOME Print-0.37 ............................................................................................................................ 748Bonobo-1.0.22 .................................................................................................................................... 749GConf-1.0.9 ....................................................................................................................................... 751GNOME Virtual File System-1.0.5 ................................................................................................... 753Libglade-0.17 ..................................................................................................................................... 755GAL-0.24 ........................................................................................................................................... 757Guppi-0.40.3 ...................................................................................................................................... 759Libcapplet-1.5.11 ............................................................................................................................... 761Soup-0.7.11 ........................................................................................................................................ 762Libghttp-1.0.9 .................................................................................................................................... 764GtkHTML-1.1.7 ................................................................................................................................. 765

    X. X Software ................................................................................................................................................ 76733. Individual Office Programs ................................................................................................................ 768

    AbiWord-2.2.8 ................................................................................................................................... 768Gnumeric-1.4.3 .................................................................................................................................. 771GnuCash-1.8.11 ................................................................................................................................. 773GIMP-2.2.8 ........................................................................................................................................ 776Evolution-2.2.2 .................................................................................................................................. 779

    34. Office Suites ....................................................................................................................................... 781KOffice-1.4.0b ................................................................................................................................... 781OpenOffice-1.1.4 ............................................................................................................................... 783

    35. Graphical Web Browsers ................................................................................................................... 788Mozilla-1.7.8 ...................................................................................................................................... 788Firefox-1.0.6 ...................................................................................................................................... 793Galeon-1.3.21 ..................................................................................................................................... 796Konqueror-3.4.1 ................................................................................................................................. 798Dillo-0.8.5 .......................................................................................................................................... 799

    36. Other X-based Internet Programs ...................................................................................................... 801Thunderbird-1.0.6 .............................................................................................................................. 801Pan-0.14.2 .......................................................................................................................................... 804Balsa-2.2.6 ......................................................................................................................................... 805

    Beyond Linux From Scratch - Version 6.1

    ix

  • XI. Multimedia ............................................................................................................................................... 80737. Multimedia Libraries and Drivers ...................................................................................................... 808

    ALSA-1.0.9 ........................................................................................................................................ 808ALSA Library-1.0.9 ........................................................................................................................... 809ALSA Plugins-1.0.9 ........................................................................................................................... 811ALSA Utilities-1.0.9a ........................................................................................................................ 813ALSA Tools-1.0.9 .............................................................................................................................. 816ALSA Firmware-1.0.9 ....................................................................................................................... 819ALSA OSS-1.0.9 ............................................................................................................................... 820aRts-1.4.1 ........................................................................................................................................... 822Audio File-0.2.6 ................................................................................................................................. 823EsounD-0.2.35 ................................................................................................................................... 824SDL-1.2.8 ........................................................................................................................................... 826Libao-0.8.6 ......................................................................................................................................... 828Libogg-1.1.2 ....................................................................................................................................... 830Libvorbis-1.1.1 ................................................................................................................................... 831NAS-1.7 ............................................................................................................................................. 833Libmpeg3-1.5.4 .................................................................................................................................. 835Libmad-0.15.1b .................................................................................................................................. 837OpenQuicktime-1.0 ............................................................................................................................ 838LibFAME-0.9.1 .................................................................................................................................. 840Speex-1.0.5 ........................................................................................................................................ 841Id3lib-3.8.3 ......................................................................................................................................... 842FLAC-1.1.2 ........................................................................................................................................ 843Libdvdcss-1.2.8 .................................................................................................................................. 845Libdvdread-0.9.4 ................................................................................................................................ 847Libdv-0.104 ........................................................................................................................................ 848Liba52-0.7.4 ....................................................................................................................................... 850XviD-1.0.3 ......................................................................................................................................... 851Xine Libraries-1.0.1 ........................................................................................................................... 853Libmikmod-3.1.11 ............................................................................................................................. 855GStreamer-0.8.10 ............................................................................................................................... 857Gst-plugins-0.8.10 .............................................................................................................................. 859

    38. Audio Utilities .................................................................................................................................... 861Mpg123-0.59r .................................................................................................................................... 861Vorbis Tools-1.1.1 ............................................................................................................................. 863XMMS-1.2.10 .................................................................................................................................... 865LAME-3.96.1 ..................................................................................................................................... 867CDParanoia-III-9.8 ............................................................................................................................ 869FreeTTS-1.2.1 .................................................................................................................................... 871

    39. Video Utilities .................................................................................................................................... 874FFmpeg-0.4.9-pre1 ............................................................................................................................ 874Avifile-0.7.43 ..................................................................................................................................... 877MPlayer-1.0pre7 ................................................................................................................................ 879Xine User Interface-0.99.3 ................................................................................................................. 885Transcode-0.6.14 ................................................................................................................................ 887

    40. CD-Writing Utilities .......................................................................................................................... 890Cdrtools-2.01 ..................................................................................................................................... 890Cdrdao-1.2.0 ...................................................................................................................................... 892

    Beyond Linux From Scratch - Version 6.1

    x

  • UDFtools-1.0.0b3 .............................................................................................................................. 894XII. Printing, Scanning and Typesetting ........................................................................................................ 896

    41. Printing ............................................................................................................................................... 897CUPS-1.1.23 ...................................................................................................................................... 897LPRng-3.8.28 ..................................................................................................................................... 900AFPL Ghostscript-8.51 ...................................................................................................................... 902ESP Ghostscript-7.07.1 ...................................................................................................................... 904Gimp-Print-4.2.7 ................................................................................................................................ 907

    42. Scanning ............................................................................................................................................. 909SANE-1.0.15 ...................................................................................................................................... 909XSane-0.97 ......................................................................................................................................... 913

    43. Standard Generalized Markup Language (SGML) ............................................................................ 915SGML Common-0.6.3 ....................................................................................................................... 915DocBook SGML DTD-3.1 ................................................................................................................. 917DocBook SGML DTD-4.4 ................................................................................................................. 919OpenSP-1.5.1 ..................................................................................................................................... 921OpenJade-1.3.2 .................................................................................................................................. 924DocBook DSSSL Stylesheets-1.79 .................................................................................................... 926DocBook-utils-0.6.14 ......................................................................................................................... 928

    44. Extensible Markup Language (XML) ................................................................................................ 931DocBook XML DTD-4.4 ................................................................................................................... 931DocBook XSL Stylesheets-1.68.1 ..................................................................................................... 935

    45. PostScript ........................................................................................................................................... 938a2ps-4.13b .......................................................................................................................................... 938Enscript-1.6.4 ..................................................................................................................................... 941PSUtils-p17 ........................................................................................................................................ 943GSview-4.7 ........................................................................................................................................ 945Xpdf-3.00pl3 ...................................................................................................................................... 947FOP-0.20.5 ......................................................................................................................................... 950Other PostScript Programs ................................................................................................................. 954

    46. Typesetting ......................................................................................................................................... 955TeX-3.0 .............................................................................................................................................. 955JadeTeX-3.13 ..................................................................................................................................... 958

    A. Creative Commons License ...................................................................................................................... 962B. Academic Free License v. 2.1 ................................................................................................................... 967Glossary ......................................................................................................................................................... 970Index .............................................................................................................................................................. 979

    Beyond Linux From Scratch - Version 6.1

    xi

  • PrefaceForeword

    Having helped out with Linux From Scratch for a short time, I noticed that we were getting many queries as tohow to do things beyond the base LFS system. At the time, the only assistance specifically offered relating toLFS were the LFS hints (http://www.linuxfromscratch.org/hints). Most of the LFS hints are extremely good andwell written but I (and others) could still see a need for more comprehensive help to go Beyond LFS - henceBLFS.BLFS aims to be more than the LFS-hints converted to XML although much of our work is based around thehints and indeed some authors write both hints and the relevant BLFS sections. We hope that we can provideyou with enough information to not only manage to build your system up to what you want, whether it be a webserver or a multimedia desktop system, but also that you will learn a lot about system configuration as you go.Thanks as ever go to everyone in the LFS/BLFS community; especially those who have contributedinstructions, written text, answered questions and generally shouted when things were wrong!Finally, we encourage you to become involved in the community; ask questions on the mailing list or newsgateway and join in the fun on #lfs at irc.linuxfromscratch.org. You can find more details about all of these inthe Introduction section of the book.Enjoy using BLFS.

    Mark Hymersmarkh linuxfromscratch.orgBLFS Editor (July 2001March 2003)

    I still remember how I found the BLFS project and started using the instructions that were completed at thetime. I could not believe how wonderful it was to get an application up and running very quickly, withexplanations as to why things were done a certain way. Unfortunately, for me, it wasn't long before I wasopening applications that had nothing more than "To be done" on the page. I did what most would do, I waitedfor someone else to do it. It wasn't too long before I am looking through Bugzilla for something easy to do. Aswith any learning experience, the definition of what was easy kept changing.We still encourage you to become involved as BLFS is never really finished. Contributing or just using, wehope you enjoy your BLFS experience.

    Larry Lawrencelarry linuxfromscratch.orgBLFS Editor (March 2003June 2004)

    The BLFS project is a natural progression of LFS. Together, these projects provide a unique resource for theOpen Source Community. They take the mystery out of the process of building a complete, functional softwaresystem from the source code contributed by many talented individuals throughout the world. They truly allowusers to implement the slogan "Your distro, your rules."Our goal is to continue to provide the best resource available that shows you how to integrate many significant

    Beyond Linux From Scratch - Version 6.1

    xii

  • Open Source applications. Since these applications are constantly updated and new applications are developed,this book will never be complete. Additionally, there is always room for improvement in explaining the nuancesof how to install the different packages. To make these improvements, we need your feedback. I encourage youto participate on the different mailing lists, news groups, and IRC channels to help meet these goals.

    Bruce Dubbsbdubbs linuxfromscratch.orgBLFS Editor (June 2004Present)

    Preface to Version 6.0Version 6.0 is a major milestone in the evolution of BLFS. This version provides installation instructions for357 packages and an additional 21 sections covering configuration and customization of different aspects ofyour system.

    Changes and upgrades to the individual packages are detailed in the Change Log. There you will see literallyhundreds of changes made since the last edition. In this change log, one name that you will see over and over isRandy McMurchy. Without his efforts this release would not have been possible. I want to take this opportunityto thank him for the hundreds of hours he has worked to produce this release. I also want to thank the othereditors, both past and present, whose insight and effort have made this current version possible. Last, butcertainly not least, I want to thank our resident XSL wizard, Manuel Canales Esparcia, whose ability to format acomplicated document such as BLFS is truly amazing.There are two other areas of change that are worthy of note. First, the license that BLFS is released under haschanged significantly. In fact, it is now released under two licenses. The first license, the Creative CommonsLicense, covers the descriptive text in the book. The second, the Academic Free License v. 2.1, covers theinstructions actually used to build and install the packages. These licenses, along with the book itself, representour ongoing commitment to open and free software.The final area of change is the addition of an Index. This section of the book is still incomplete, but as the bookcontinues to be developed, will become an excellent resource for finding programs, libraries, configuration files,and references to kernel configuration requirements. I hope you find it useful.

    Bruce DubbsMarch 17, 2005

    Preface to Version 6.1Version 6.1 is an incremental update of BLFS. This version continues the tradition of providing an extensive setof instructions for extending a basic Linux From Scratch system. The instructions in this version of BLFS arebased on the LFS 6.1 Book. As usual, the list of packages that have been upgraded or added are in the ChangeLog.

    One major accomplishment in this version of the book is the completion of the Index. This section is now arelatively complete (but not perfect) reference for the components of the various packages in the book.In any task as large and complex as this book, there are bound to be errors. The editors of the book are dedicatedto keeping the book up to date. We appreciate any feedback in helping us to make the book as accurate aspossible. The best place to provide comments is via the mailing list at mailto:[email protected].

    Beyond Linux From Scratch - Version 6.1

    xiii

  • Enjoy!Bruce DubbsAugust 1, 2005

    Beyond Linux From Scratch - Version 6.1

    xiv

  • Who Would Want to Read this BookThis book is mainly aimed at those who have built a system based on the LFS book. It will also be useful forthose who are using other distributions, but for one reason or another want to manually build software and are inneed of some assistance. BLFS can be used to create a range of diverse systems and so the target audience isprobably nearly as wide as that of the LFS book. If you found LFS useful, you should also like this!Since Release 5.0, the BLFS book version matches the LFS book version. This book may be incompatible witha previous or latter release of the LFS book.

    Beyond Linux From Scratch - Version 6.1

    xv

  • OrganizationThis book is divided into the following parts.

    Part I - IntroductionThis part contains information which is essential to the rest of the book.

    Part II - Post LFS Configuration and Extra SoftwareHere we introduce basic configuration and security issues. We also discuss a range of editors, file systems, andshells which aren't covered in the main LFS book.

    Part III - General Libraries and UtilitiesIn this section we cover libraries which are often needed by the rest of the book as well as system utilities.Information on Programming (including recompiling GCC to support its full range of languages) concludes thispart.

    Part IV - Connecting to a NetworkHere we cover how to connect to a network when you aren't using the simple static IP setup given in the mainLFS book.

    Part V - Basic NetworkingNetworking libraries and command-line networking tools make up the bulk of this part.

    Part VI - Major ServersHere we deal with setting up mail and other servers (such as SSH, Apache, etc.).

    Part VII - X + Window ManagersThis part explains how to set up a basic X Window System installation along with some generic X libraries andWindow managers.

    Part VIII - KDEFor those who want to use the K Desktop Environment or some parts of it, this part covers it.

    Part IX - GNOMEGNOME is the main alternative to KDE in the Desktop Environment arena and we cover both GNOME-1.4 andGNOME-2.10 here.

    Part X - X SoftwareOffice programs and graphical web browsers are important to most people. They, along with some generic Xsoftware can be found in this part of the book.

    Beyond Linux From Scratch - Version 6.1

    xvi

  • Part XI - MultimediaHere we cover setting multimedia libraries and drivers along with some audio, video and CD-writing programs.

    Part XII - Printing, Scanning and Typesetting (PST)The PST part of the book covers document handling with applications like Ghostscript, CUPS and DocBook toinstalling TeX.

    AppendicesThe Appendices cover information which doesn't belong in the main book; they are mainly there as a reference.

    Beyond Linux From Scratch - Version 6.1

    xvii

  • Part I. Introduction

    Beyond Linux From Scratch - Version 6.1

  • Chapter 1. Welcome to BLFSThe Beyond Linux From Scratch book is designed to carry on from where the LFS book leaves off. But unlikethe LFS book, it isn't designed to be followed straight through. Reading the Which sections of the book? part ofthis chapter should help guide you through the book.Please read most of this part of the book carefully as it explains quite a few of the conventions we usethroughout the book.

    AcknowledgmentsWe would like to thank the following people and organizations for their contributions toward the BLFS andLFS projects:

    All those people listed on the Credits page for submitting patches, instructions and corrections to the book.The former editor would especially like to thank Bruce, Larry and Billy for their enormous inputs to theproject.

    Mark Stone for donating the linuxfromscratch.org servers. Gerard Beekmans for starting and writing the vast majority of the LFS

    project. Jesse Tie-Ten-Quee for answering many questions on IRC, having a

    great deal of patience and for not killing the former editor for the joke in the original BLFS announcement! DREAMWVR.COM for their ongoing sponsorship by donating various resources to the LFS and related sub

    projects. Robert Briggs for donating the linuxfromscratch.org and linuxfromscratch.com domain names. Frank Skettino at OSWD for coming up the initial design of the LFS and BLFS

    websites. Garrett LeSage for creating the LFS banner Jeff Bauman (former co-editor of the book) for his assistance with getting BLFS off the ground. Countless other people on the various LFS and BLFS mailing lists who are making this book happen by

    giving their suggestions, testing the book and submitting bug reports.

    Beyond Linux From Scratch - Version 6.1

    19

  • CreditsMany people have contributed both directly and indirectly to BLFS. This page lists all of those we can think of.We may well have left people out and if you feel this is the case, drop us line. Many thanks to all of the LFScommunity for their assistance with this project. If you are in the list and wish to have your email addressincluded, again please drop us a line to [email protected] and we'll be happy to add it. We don'tinclude email addresses by default so if you want it included, please state so when you contact us.

    Editors

    Editor: Bruce Dubbs Co-Editors: Randy McMurchy, Larry Lawrence, Igor Zivkovic, DJ Lucas, Tushar Teredesai, David Jensen,

    Manuel Canales Esparcia, and Richard Downing.

    Text Authors

    Chapter 01. Based on the LFS introductory text by Gerard Beekmans, modified by Mark Hymers for BLFS. Chapter 02: The /usr versus /usr/local debate: Andrew McMurry. Chapter 02: Going beyond BLFS: Tushar Teredesai. Chapter 02: Package Management: Tushar Teredesai. Chapter 03: /etc/inputrc: Chris Lynn. Chapter 03: Customizing your logon & vimrc: Mark Hymers. Chapter 03: /etc/shells: Igor Zivkovic. Chapter 03: Random number script Larry Lawrence. Chapter 03: Creating a Custom Boot Device Bruce Dubbs. Chapter 03: The Bash Shell Startup Files James Robertson revised by Bruce Dubbs. Chapter 03: Compressed docs Olivier Peres. Chapter 04: Firewalling: Henning Rohde with thanks to Jeff Bauman. Revised by Bruce Dubbs. Chapter 11: Which Mark Hymers with many thanks to Seth Klein and Jesse Tie-Ten-Quee. Chapter 25: X Window System Environment: Bruce Dubbs. Chapter 27: Intro to Window Managers: Bruce Dubbs. Chapters 28 and 29: KDE: Bruce Dubbs. Chapters 30, 31, and 32: GNOME: Larry Lawrence.

    Installation Instruction Authors

    Beyond Linux From Scratch - Version 6.1

    20

  • aalib, Alsa, ffmpeg, gocr, MPlayer, opendivx, transcode, xvid and xsane: Alex Kloss AbiWord, at-spi, ATK, audiofile, avifile, bc, bonobo-activation, bug-buddy, cdrdao, cdrtools, cpio, curl,

    dhcp, enlightenment, eog, esound, fcron, fluxbox, FNLIB, gail, galeon, gconf-editor, gdbm, gedit, gimp,GLib2, gmp, gnet, gnome-applets, gnome-desktop, gnome-games, gnome-icon-theme, gnome-libs,gnome-media, gnome-mime-data, gnome-panel, gnome-session, gnome-system-monitor, gnome-terminal,gnome-themes, gnome-utils, gnome-vfs, gnome2-user-docs, gnumeric, GTK+2, gtk-doc, gtk-engines,gtk-thinice-engine, eel, imlib, intltool, lame, libao, libart_lgpl, libbonobo, libbonoboui, libgail-gnome,libglade2, libgnome, libgnomecanvas, libgnomeprint, libgnomeprintui, libgnomeui, libgsf, libgtkhtml,libgtop, libIDL, libogg, librep, librsvg, libvorbis, libwnck, libxml2, libxslt, linc, LPRng, Linux_PAM,metacity, MIT Kerberos 5,MPlayer, mutt, nautilus, nautilus-media, oaf, OpenJade, OpenSP, OpenSSH,ORBit, ORBit2, pan, Pango, pccts, pcre, pkgconfig, postfix, procmail, Python, QT, rep-gtk, ruby, sawfish,scrollkeeper, sgml-common, sgml-dtd, shadow, startup-notification, unzip, vorbis-tools, vte, wget, XFce,xine, xml-dtd, yelp and zip: Larry Lawrence

    CDParanoia, mpg123, SDL and XMMS: Jeroen Coumans alsa, cvs, dhcpcd, gpm, hdparm, libjpeg, libmng, libpng, libtiff, libungif, giflib, links, lynx, openssl, tcsh,

    which, zsch, zlib: Mark Hymers traceroute: Jeff Bauman db and lcms: Jeremy Jones and Mark Hymers aspell, balsa, bind, bonobo, bonobo-conf, cvs server, db-3.3.11, db-3.1.17, emacs, evolution, exim, expat,

    gal, gnome-print, GnuCash, gtkhtml, guppi, guile, guppi, g-wrap, leafnode, lesstif, libcapplet, libesmtp,libfam, libghttp, libglade, pine, portmap, PostgreSQL, pspell, qpopper, readline, reiserfs, Samba, sendmail,slrn, soup, tex, tcp-wrappers, and xinetd: Billy O'Connor

    ProFTPD and rsync: Daniel Baumann ESP Ghostscript: Matt Rogers ALSA Tools, Apache Ant, Cyrus-SASL, DejaGnu, desktop-file-utils, DocBook DSSSL Stylesheets,

    DocBook-utils, Ethereal, Evolution Data Server, Exim (many additions), Expect, FOP, FreeTTS, FriBidi,gnome-audio, gnome-backgrounds, gnome-menus, GNOME Doc Utils, GnuCash (many additions),Heimdal, HTML Tidy, JadeTeX, Java Access Bridge, LessTif (rewrite), libexif, libgail-gnome,libgnomecups, MPlayer (extensive overhaul), Other Programming Tools, PDL, Perl Modules, pilot-link,Samba 3 (many additions), Shadow (rewrite), SANE (original instructions by Alex Kloss), SLIB, Stunnel,Sysstat and system-tools-backends: Randy McMurchy

    Screen: Andreas Pedersen PHP: Jeremy Utley Gimp-Print and libusb: Alexander E. Patrakov Fetchmail and WvDial: Paul Campbell UDFtools, Perl modules (initial version) and Bluefish: Richard Downing Epiphany, FLAC, File Roller, GNOME Magnifier, GNOME Netstatus, GNOME Speech, GOK, GPdf,

    GnomeMeeting, Gnopernicus, Imlib2, LZO, MC, NASM, Nautilus CD Burner, OpenQuicktime, Speex,XScreenSaver, Zenity, compface, freeglut, gcalctool, gucharmap, id3lib, kde-i18n, kdeaccessibility,kdebindings, kdesdk, kdevelop, kdewebdev, libFAME, liba52, libdv, libdvdcss, libdvdread, libmad,

    Beyond Linux From Scratch - Version 6.1

    21

  • libmikmod and libmpeg3: Igor Zivkovic tripwire: Manfred Glombowski ALSA Firmware, ALSA OSS, inetutils, gdk, GLib, GTK+, libxml and vim: James Iwanek iptables: Henning Rohde joe, nano, nmap, slang, w3m and whois: Timothy Bauscher MySQL: Jesse Tie-Ten-Quee fontconfig, gcc, gcc2, jdk, mozilla, nas, openoffice, ispell, nail, ImageMagick, hd2u, STLport, tcl, tk and

    bind-utils: Tushar Teredesai cracklib, libpcap, ncpfs, netfs, ppp(update), RP-PPPoE, Samba-3 and Subversion: DJ Lucas ntp: Eric Konopka nfs-utils: Reinhard

    General Acknowledgments Fernando Arbeiza for doing great quality assurance on Shadow utilizing PAM. The machine access he

    saved may have been yours. Archaic for trouble shooting the mozilla section by performing multiple builds and for providing a

    description of the various mozilla extensions. Gerard Beekmans for generally putting up with us and for running the whole LFS project. Oliver Brakmann for developing the dhcpcd patch for FHS compliance. Ian Chilton for writing the nfs hint. Nathan Coulson for writing the new network bootscripts. Nathan Coulson, DJ Lucas and Zack Winkles for reworking the bootscripts used throughout the book. Jim Harris for writing the dig-nslookup-host.txt hint on which the bind-utils instructions are based. Lee Harris for writing the gpm.txt hint on which our gpm instructions are based. Marc Heerdink f