Copyright © 2001-2003 BLFS Development Team
Copyright (c) 2001-2003, BLFS Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions in any form must retain the above copyright notice, this list of conditions and the following disclaimer.
Neither the name of "Linux From Scratch" nor the names of its contributors may be used to endorse or promote products derived from this material without specific prior written permission.
Any material derived from Linux From Scratch must contain a reference to the "Linux From Scratch" project.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This book is dedicated to the LFS community
Having helped out with Linux From Scratch for a short time, I noticed that we were getting many queries as to how to do things beyond the base LFS system. At the time, the only assistance specifically offered relating to LFS were the LFS hints (http://www.linuxfromscratch.org/hints). Most of the LFS hints are extremely good and well written but I (and others) could still see a need for more comprehensive help to go Beyond LFS - hence BLFS.
BLFS aims to be more than the LFS-hints converted to XML although much of our work is based around the hints and indeed some authors write both hints and the relevant BLFS sections. We hope that we can provide you with enough information to not only manage to build your system up to what you want, whether it be a web server 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 contributed instructions, 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 news gateway and join in the fun on #lfs at irc.linuxfromscratch.org. You can find more details about all of these in the Introduction section of the book.
Enjoy using BLFS.
Mark Hymers
markh@linuxfromscratch.org
BLFS Editor (July 2001 - March 2003)
I still remember how I found the BLFS project and started using the instructions that were completed at the time. I could not believe how wonderful it was to get an application up and running very quickly, with explanations as to why things were done a certain way. Unfortunately, for me, it wasn't long before I was opening applications that had nothing more than "To be done" on the page. I did what most would do, I waited for someone else to do it. It wasn't too long before I am looking through Bugzilla for something easy to do. As with 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, we hope you enjoy your BLFS experience.
Larry Lawrence
larry@linuxfromscratch.org
BLFS Editor (March 2003 - present)
This book is mainly aimed at those who have built a system based on the LFS book. It will also be useful for those who are using other distributions, but for one reason or another want to manually build software and are in need of some assistance. BLFS can be used to create a range of diverse systems and so the target audience is probably nearly as wide as that of the LFS book. If you found LFS useful, you should also like this!
This book is divided into the following parts.
Here we introduce basic configuration and security issues. We also discuss a range of editors, file systems and shells which aren't covered in the main LFS book.
In 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 this part.
Here we cover how to connect to a network when you aren't using the simple static IP setup given in the main LFS book.
Networking libraries and command-line networking tools make up the bulk of this part.
Here we deal with setting up mail and other servers (such as SSH, CVS , etc.).
This part explains how to set up a basic XFree86 installation along with some generic X libraries and Window managers.
For those who want to use the K Desktop Environment or some parts of it, this part covers it.
GNOME is the main alternative to KDE in the Desktop Environment arena and we cover both GNOME-1.4 and GNOME-2.2 here.
Office programs and graphical web browsers are important to most people. They, along with some generic X software can be found in this part of the book.
Here we cover setting multimedia libraries and drivers along with some audio, video and CD-writing programs.
The Beyond Linux From Scratch 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? part of this 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 use throughout the book.
We would like to thank the following people and organizations for their contributions toward the BLFS and LFS 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 the project.
Mark Stone <mstone@linux.com> for donating the linuxfromscratch.org servers.
Gerard Beekmans <gerard@linuxfromscratch.org> for starting and writing the vast majority of the LFS project.
Jesse Tie-Ten-Quee <highos@linuxfromscratch.org> 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 <bkenoah@oswd.org> at OSWD for coming up the initial design of the LFS and BLFS websites.
Garrett LeSage <garrett@linux.com> 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.
Many 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 LFS community for their assistance with this project. If you are in the list and wish to have your email address included, again please drop us a line to larry@linuxfromscratch.org and we'll be happy to add it. We don't include email addresses by default so if you want it included, please state so when you contact us.
Editor: Larry Lawrence <larry@linuxfromscratch.org>
Co-Editors: Bruce Dubbs, Mark Hymers, Billy O'Connor, Tushar Teredesai and Igor Zivkovic.
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 03: /etc/inputrc: Chris Lynn.
Chapter 03: Customizing your logon & vimrc: Mark Hymers.
Chapter 03: Random number script Larry Lawrence .
Chapter 03: Creating a Custom Boot Disk Mike Bedwell and expanded by Bill Maltby.
Chapter 03: The Bash Shell Startup Files James Robertson.
Chapter 03: Compressed docs Olivier Peres.
Chapter 04: Firewalling: Henning Rohde with thanks to Jeff Bauman.
Chapter 11: Which Mark Hymers with many thanks to Seth Klein and Jesse Tie-Ten-Quee.
Chapter 26: XFree86 Bruce Dubbs.
Chapter 28: Intro to Window Managers Bruce Dubbs .
Chapter 29: KDE: Bruce Dubbs.
Chapter 32: GNOME: Larry Lawrence.
aalib, Alsa, ffmpeg, gocr, MPlayer, opendivx, sane, 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, 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, links, lynx, openssl, tcsh, which, zsch, zlib: Mark Hymers
daemontools, traceroute and ucspi-tcp: 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, qmail, qpopper, readline, reiserfs, Samba, sendmail, slib, slrn, soup, tex, tcp-wrappers, and xinetd: Billy O'Connor
ProFTPD and rsync: Daniel Baumann
ESP Ghostscript: Matt Rogers
PHP: Jeremy Utley
fetchmail and wvdial: Paul Campbell
udftools: Richard Downing
compface, DirectFB, FLAC, id3lib, Imlib2, liba52, libdv, libdvdcss, libdvdread, libFAME, libmad, libmpeg3, LZO, MC, NASM, OpenQuicktime, Speex and SVGAlib: Igor Zivkovic
tripwire : Manfred Glombowski
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, j2sdk, mozilla, nas, openoffice, ispell, nail, STLport, tcl, tk and bind-utils: Tushar Teredesai
ncpfs and RP-PPPoE: DJ Lucas
ntp: Eric Konopka
Gerard Beekmans for generally putting up with us and for running the whole LFS project.
Bruce Dubbs for writing the kde.txt hint from which we gathered much useful information.
Lee Harris for writing the gpm.txt hint on which our gpm instructions are based.
Marc Heerdink for writing the gpm2.txt hint on which our gpm instruction are based.
Jeremy Jones (otherwise known as mca) for hacking Makefiles and general assistance.
J_Man for submitting a gpm-1.19.3.diff file on which our gpm instructions are based.
Scot Mc Pherson for writing the gnome-1.4.txt hint from which was gathered useful information and for warning us that GNOME Version 2.0 may not be ready to put in the book.
Tushar Teredesai for writing the Compiling Java 2 SDK from Scratch hint on which j2sdk is based and for writing the docbook hint used throughout the typesetting chapter.
Oliver Brakmann for developing the dhcpcd patch for FHS compliance.
DJ Lucas for contributing to dhcpcd patch and many contributions while DHCP section was being developed.
Billy O'Connor for building GNOME 2.0 so many times and being very helpful with his comments on that section.
Ted Riley for writing the Linux-PAM + CrackLib + Shadow hint on which reinstalling shadow to use PAM is based.
Fernando Arbeiza for doing great quality assurance on Shadow utilizing PAM. The machine access he saved may have been yours.
Jim Harris for writing the dig-nslookup-host.txt hint on which the bind-utils instructions are based.
Eric Konopka for writing the ntp.txt hint on which the ntp section is based.
Unlike the Linux From Scratch book, BLFS isn't designed to be followed in a linear manner. This is because LFS provides instructions on how to create a base system which is capable of turning into anything from a web server to a multimedia desktop system. BLFS is where we try to guide you through going from the base system to your intended destination and so choice is very much involved.
Everyone who reads the book will want to read certain sections. The Introduction part - which you are currently reading - contains generic information. Especially take note of the information in Important Information (Chapter 2), as this contains comments about how to unpack software and various other aspects which apply throughout the book.
The part on Post LFS Configuration and Extra Software is where most people will want to turn next. This deals with not just configuration but also Security (Chapter 4), File Systems (Chapter 5), Editors (Chapter 6) and Shells (Chapter 7). Indeed, you may wish to reference certain parts of this chapter (especially the sections on Editors and File Systems) while building your LFS system.
Following these basic items, most people will want to at least browse through the General Libraries and Utilities part of the book. This part contains information on many items which are prerequisites for other sections of the book as well as some items (such as Programming (Chapter 12) which are useful in their own right. Note that you don't have to install all of these libraries and packages found in this part to start with, each BLFS install procedure tells you which packages it depends upon so you can choose the program you want to install and see what it needs.
Likewise, most people will probably want to look at the Connecting to a Network and Basic Networking parts. The first of these deals with connecting to the Internet or your LAN using a variety of methods such as DHCP (Chapter 14) and Dial-Up Connections (Chapter 13). The second of these parts deals with items such as Networking Libraries (Chapter 16) and various basic networking programs and utilities.
Once you have dealt with these basics, you may wish to configure more advanced network services. These are dealt with in the Server Networking and Content Serving parts of the book. Those wanting to build servers should find enough information to give them a good starting point here. Note that Content Serving also contains information on various database packages.
The next parts of the book principally deal with desktop systems. We start with a part talking about X and Window Managers. This part also deals with some generic X-based libraries (Chapter 27). After this, KDE and gnome are given their own parts which are followed by one on X Software.
We then move on to deal with Multimedia packages. Note that many people may want to use the ALSA-0.9.6 instructions from this chapter quite near the start of their BLFS journey; they are placed here simply because it is the most logical place for them.
The final part of the main BLFS book deals with Printing, Scanning and Typesetting. This is useful for most people with desktop systems and even those who are creating mainly server systems will find it useful.
Finally, the Appendix contain various pieces of useful information which you may need to use as a reference.
We hope you enjoy using BLFS and find it useful.
To make things easy to follow, there are a number of conventions used throughout the book. Following are some examples:
./configure --prefix=/usr |
This form of text is designed to be typed exactly as seen unless otherwise noted in the surrounding text. It is also used in the explanation sections to identify which of the commands is being referred to.
install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir'
This form of text (fixed width text) is showing screen output, probably as the result of commands issued and is also used to show filenames such as /etc/lilo.conf
Emphasis
This form of text is used for several purposes in the book but mainly to emphasize important points or to give examples as to what to type.
http://www.linuxfromscratch.org/
This form of text is used for hypertext links, both within the book and to external pages such as HowTo's, download locations, websites, etc.
cat > $LFS/etc/group << "EOF"> root:x:0: bin:x:1: ...... EOF |
This type of section is used mainly when creating configuration files. The first command (in bold) tells the system to create the file $LFS/etc/group from whatever is typed on the following lines until the sequence EOF is encountered. Therefore, this whole section is generally typed as seen.
This is BLFS-BOOK version 5.0-PRE1 dated October 8th, 2003. If this version is older than a month a newer version is probably already available for download. Check one of the mirror sites below for updated versions.
The BLFS project has a number of mirrors setup world-wide to make it easier and more convenient for you to access the website. Please visit the http://www.linuxfromscratch.org/blfs website for the list of current mirrors.
Please note that the change log only lists which editor was responsible for putting the changes into CVS; please read the Credits page in Chapter 1 for details on who wrote what.
5.0-PRE1 - October 8th, 2003
October 7th, 2003 [igor]: Added missing http/ftp links (part VI).
October 7th, 2003 [tushar]: Add patch and modify tripwire instructions for gcc3 compilation.
October 7th, 2003 [larry]: courier patch submitted by Jim Gifford
October 7th, 2003 [igor]: Added missing http/ftp links (part V).
October 6th, 2003 [larry]: undated to openssh-3.7.1p2.
October 6th, 2003 [igor]: Added missing http/ftp links (part IV).
October 5th, 2003 [tushar]: Added libungif patch. Matched vim instructions with LFS.
October 5th, 2003 [tushar]: Added ash-0.4.0.
October 5th, 2003 [tushar]: Added tiff and nas patches.
October 5th, 2003 [bdubbs]: Updated kde-multimedia instructions. Removed kdoc and kde-other section.
October 5th, 2003 [larry]: Updated to Docbook XSL Stylesheets-1.62.4.
October 5th, 2003 [igor]: Updated to NASM-0.98.38 and Python-2.3.2.
October 5th, 2003 [igor]: Added missing http/ftp links (part III).
October 4th, 2003 [larry]: General: updated to OpenSSL-0.9.7c and FAM-2.6.10.
October 4th, 2003 [tushar]: Added a page on Optional Patches that refers to the Patches Project.
October 4th, 2003 [igor]: Added missing http/ftp links (part XIII).
October 4th, 2003 [tushar]: Patches reorganization, Section IV.
October 3rd, 2003 [tushar]: Updated OpenOffice to 1.1.0.
October 3rd, 2003 [tushar]: Add two unzip patches.
October 3rd, 2003 [tushar]: Patches reorganization (Part II).
October 3rd, 2003 [igor]: Added missing http/ftp links (part XII).
October 3rd, 2003 [tushar]: Patches reogranization.
October 2nd, 2003 [larry]: Many edits it Part X to put application's proper names in and class filename tags.
October 2nd, 2003 [igor]: Modified Evolution instructions.
October 2nd, 2003 [bdubbs]: Removed libpng from Qt requirement list. Its required in XFree86.
October 2nd, 2003 [bdubbs]: Updated Qt to version 3.2.1.
October 2nd, 2003 [igor]: Added missing http/ftp links (part XI).
October 2nd, 2003 [bdubbs]: Updated XFree86 instructions to clarify DRI implementation and XF86Config modifications.
September 29th, 2003 [igor]: Added missing http/ftp links (part II).
September 29th, 2003 [larry]: added gocr to Scanning.
September 28th, 2003 [tushar]: Added ntp to Networking Programs.
Sepember 27th, 2003 [larry]: updated to xfce-4.0.0.
September 27th, 2003 [tushar]: Updated Mozilla instructions for gcc-3.3.1. Added notes for building Firebird and Thunderbird.
September 27th, 2003 [larry] updated to xfs patch for 2.4.22 kernel.
September 26th, 2003 [igor] Added MC-4.6.0 and updated to ProFTPD-1.2.8p.
September 26th, 2003 [larry] applied patch for compressdocs submitted by Yann Morin.
September 25th, 2003 [igor]: Updated to sendmail-8.12.10 and python-2.3.1.
September 25th, 2003 [igor]: Added PHP-4.3.3 submitted by Jeremy Utley.
September 24th, 2003 [larry]: Updated to xine-ui-0.9.22.
September 24th, 2003 [larry]: Tagging Acronyms, building Glossary, tagging filename extensions (not using identifier as that is not compatible with 4.1.2). Checking Capitalization against web sites or GNU database or sourceforge.
September 23rd, 2003 [igor]: Updated to OpenLDAP-2.1.22 and gsview-4.4.
September 22nd, 2003 [igor]: Updated to exim-4.24.
September 22nd, 2003 [larry]: Added a Glossary.
September 22nd, 2003 [igor]: Updated to leafnode-1.9.43.
September 21st, 2003 [tushar]: Moved STLport to Appendix C.
September 21st, 2003 [tushar]: Updated to OpenOffice 1.1rc4.
September 21st, 2003 [igor]: Added libdvdread-0.9.4, libdvdcss-1.2.8, libdv-0.99 and liba52-0.7.4.
September 21st, 2003 [larry]: Updated to lcms-1.11.
September 21st, 2003 [igor]: update to transcode-0.6.10.
September 21st, 2003 [tushar]: Added tcl-8.4.4 and tk-8.4.4.
September 20th, 2003 [tushar]: Added nail-10.5.
September 20th, 2003 [tushar]: Synchronized gcc-2.95.3 with LFS instructions.
September 20th, 2003 [larry]: updated bootdisk for non-devfs usage and two-disk option.
September 20th, 2003 [tushar]: Updated to j2sdk-1.4.2_01 (precompiled).
September 20th, 2003 [tushar]: Added ispell-3.2.06.epa6 to General Libraries.
September 20th, 2003 [igor]: added FLAC-1.1.0 and id3lib-3.8.3.
September 20th, 2003 [larry]: updated to sane-1.0.12 and xsane-0.91.
September 20th, 2003 [bdubbs] : Updated XFree86 instructions to use kernel compiler for kernel modules.
September 19th, 2003 [igor] : updated ALSA packages intro, modified Apache instructions.
September 19th, 2003 [larry]: updated to LPRng-3.8.22.
September 19th, 2003 [larry]: updated to fluxbox-0.9.5, as stable will not compile with gcc-3.3.1.
September 19th, 2003 [igor]: added Speex-1.0.1, update to postfix-2.0.16 and whois-4.6.7.
September 18th, 2003 [larry]: update to soup-0.7.11.
September 18th, 2003 [igor]: updated instructions for fcron-2.9.3.
September 18th, 2003 [larry]: updated to gal-0.24.
September 18th, 2003 [igor]: added libFAME-0.9.0, update to xine-lib-1-rc0a.
September 18th, 2003 [larry]: updated to openssh-3.7.1p1.
September 18th, 2003 [larry]: added compress doc page to postlfs.
September 17th, 2003 [igor]: update to xinetd-2.3.12.
September 17th, 2003 [larry]: updated to ncftp-3.1.6.
September 16th, 2003 [larry]: added libgsf-1.8.2.
September 16th, 2003 [igor]: update to KDE-3.1.4 (incomplete - left for Bruce to review and finish).
September 16th, 2003 [larry]: update to OpenSSH--3.7p1, gtkhtml-3.0.8, libsoup-1.99.23, evolution-1.4.4, gnumeric-1.2.0, abiword-2.0.0, PDL-2.4.0, Astro-FITS-Header-2.7.1 and gimp-1.2.5.
September 15th, 2003 [larry]: update to postfix-2.0.15 and added gal-1.99.9.
September 15th, 2003 [igor]: update to ffmpeg-0.4.7 and xvid-0.9.2.
September 14th, 2003 [larry]: added patch to SVGAlib for gcc-3.3.1 compile error. Bug 346.
September 14th, 2003 [igor]: update to cups-1.1.19.
September 14th, 2003 [igor]: changed installation instructions for ESP Ghostscript.
September 14th, 2003 [larry]: general: updated to guile-1.6.4, slib-2d6 and aalib-1.4rc5.
September 13th, 2003 [larry]: general: updated to rep-gtk-0.18.
September 13th, 2003 [larry]: general: updated to libxml2-2.5.11 and libxslt-1.0.33.
September 13th, 2003 [igor]: update to PostgreSQL-7.3.4.
September 12th, 2003 [igor]: update to MySQL-4.0.15 and freetype-2.1.5.
September 12th, 2003 [larry]: update to xfsprogs-2.5.6 and reiserfsprogs-3.6.11.
September 12th, 2003 [igor]: update to Apache-2.0.47.
September 11th, 2003 [larry]: Arranged Part I-Introduction to follow LFS order and, of course, tagged.
September 11th, 2003 [larry]: added imlib2 and openquicktime submitted by Igor.
September 11th, 2003 [larry]: edited firewalling to conform to the rest of book. Used 'screen' for kernel settings instead of 'table'. Changed from 'orderlist' to 'itemizedlist'. Converted footnotes to inline notation, except kernel which was inconsistent with the rest of the book.
September 9th, 2003 [larry]: update to esp ghostcript-7.07.1rc2, AFPL Ghostscript-8.11 and w3m-0.4.1 submitted by Igor.
September 8th, 2003 [tushar]: added bind-utils section for users that only need the client apps from bind.
September 7th, 2003 [larry]: updated intro to tex.
September 7th, 2003 [larry]: update to MySQL-4.0.14, nano-1.2.2, GTK2+-2.2.5 and pciutils-2.1.11, all submitted by Igor.
September 6th, 2003 [larry]: gnome: updated to nautilus-media-0.2.2, gconf-editor-0.4.1 and gdm-2.4.1.4.
September 5th, 2003 [larry]: gnome: updated to gnome-system-moniter-2.0.5, gnome-applets-2.2.2, gnome-utils-2.2.3, gnome-games-2.2.1, nautilus-2.2.4, yelp-2.2.3, bug-buddy-2.2.106, gedit-2.2.2, eog-2.2.2, gstreamer-0.6.2, gst-plugins-0.6.2 and gnome-media-2.2.2.
September 4th, 2003 [larry]: gnome: updated to control-center-2.2.2 and gnome-terminal-2.2.2.
September 4th, 2003 [larry]: multimedia: updated avifile and mplayer submitted by Igor.
September 4th, 2003 [larry]: basicnet: applied DJ's correction patch to ncpfs.
September 4th, 2003 [larry]: x: updated to metacity-2.4.55 and gnome-session-2.2.2.
September 4th, 2003 [larry]: xsoft: updated to pan-0.14.2 and gnet-2.0.4.
September 3rd, 2003 [larry]: xsoft: updated to AbiWord-1.99.6, gnumeric-1.1.20, gnome-desktop-2.2.2 and gnome-panel-2.2.2.2.
September 3rd, 2003 [larry]: postlfs: added gnupg-1.2.3.
September 3rd, 2003 [larry]: update to libgnomeprint-2.2.1.3, libgnomeprintui-2.2.1.4 and balsa-2.0.14.
September 2nd, 2003 [larry]: updated to libesmtp-1.0, eel-2.2.4 and libgtkhtml-2.2.4.
September 2nd, 2003 [larry]: Edit submission by DJ, added NASM, directFB, libMPEG3 and updated SDL by Igor.
September 1st, 2003 [larry]: updated intro to gtk-engines, gtk-thinice-engine and libgail-gnome. Removed png-support-3.1.dtd from gtk-doc and sgml-dtd-3.
September 1st, 2003 [larry]: gnome: updated to libbonoboui-2.2.2, gnome-icon-theme-1.0.6, libgnomeui-2.2.2, gnome-themes-2.2.2 scrollkeeper-0.3.12, libwnck-2.2.2, vte-0.10.29, libgtop-2.0.2, gail-1.2.2, at-spi-1.1.9, librsvg-2.2.5 and galeon-1.3.7.
August 31st, 2003 [larry]: gnome: updated to GConf-2.2.1, gnome-mime-data-2.2.1, gnome-vfs-2.2.5, libgnome-2.2.3 and libgnomecanvas-2.2.1.
August 31st, 2003 [larry]: updated into of wvdial and wvstreams submitted by Igor.
August 31st, 2003 [larry]: server: added rsync-2.5.6 submitted by Daniel Baumann.
August 31st, 2003 [larry]: multimedia: update to cdrtools-2.00.3 submitted by Igor.
August 30th, 2003 [larry]: postlfs: update intro section of tcsh, zsh, joe, nano and emacs.
August 30th, 2003 [larry]: general: update to gcc-3.3.1 and gnat-3.15p.
August 29th, 2003 [larry]: pst: updated intro to sgml-dtd V3.1 and V4.2.
August 29th, 2003 [larry]: Xsoft: updated to dillo-0.7.3.
August 29th, 2003 [larry]: Basicnet: updated to curl 7.10.7 submitted by Igor Zivkovic.
August 29th, 2003 [larry]: Gnome: updated intro for orbit2 and updated to bonobo-activation-2.2.3.
August 28th, 2003 [larry]: updated to GLib-2.2.3, Pango-1.2.5, ATK-1.2.4 and GTK+-2.2.3.
August 28th, 2003 [larry]: updated to intro of gtk-doc and openjade. Typos.
August 28th, 2003 [larry]: updated to ruby-1.8.0
August 26th, 2003 [larry]: added patch to OpenSP.
August 26th, 2003 [larry]: added SVGAlib and updated Links to add graphical option
August 26th, 2003 [larry]: updated intro for PAM, added link to cracklib, modified cvs download.
August 26th, 2003 [tushar]: Added dependencies for fontconfig.
August 25th, 2003 [larry]: Applied update patches submitted by Igor Zivkovic for cvs-1.11.6 and hdparm-5.4.
August 24th, 2003 [larry]: updated intro for vim, docbook and docbook-dsssl. Removed placeholder for alsa-oss.
August 24th, 2003 [larry]:; SBU updates for glib-1, gtk-1,
August 24th, 2003 [larry]: Tag edits on Bill's submission.
August 22nd, 2003 [tushar]: Updated libfam to fix libtool-1.5 related bug.
August 21st, 2003 [larry]: Changed SBU's for aspell, pan, zip, libidl, which, mozilla, and vim.
August 19th, 2003 [larry]: Basicnet: updated to gnet-1.1.9. Changed SBU's for pkgconfig, GLib-2, Pango, ATK, GTK-2, intltool, gnet.
August 18th, 2003 [larry]: PST: removed -enable xml message from Opensp install instructions. Changed SBU's for OpenSP, openjade, sgml-common, libxml2, libxslt, libmng, qt, lesstif and fluxbox to reflect new scale.
August 17th, 2003 [bdubbs]: XFree86: change bunzip2 to gunzip.
August 16th, 2003 [bdubbs]: Updated fontconfig configuration instructions.
August 16th, 2003 [tushar]: Synchronized shadow instructions to match those in LFS-CVS.
August 15th, 2003 [bdubbs]: Updated XFree86 instructions and added patch file.
August 15th, 2003 [bdubbs]: Updated fontconfig config instructions and moved to X library chapter.
August 13th, 2003 [tushar]: Fixed nas typo.
August 8th, 2003 [tushar]: Added fontconfig and made it a dependency for X.
August 4th, 2003 [larry]: modified intro to GLib.
August 4th, 2003 [larry]: multimedia: update to esound-0.2.30.
August 3rd, 2003 [larry]: basicnet: updated to nmap-3.30.
August 3rd, 2003 [larry]: modified intro to qt, gtk+, startup-notification, slrn, popt and slang.
August 3rd, 2003 [larry]: basicnet: updated to pine-4.56.
August 3rd, 2003 [larry]: basicnet: updated to fetchmail-6.2.3.
August 2nd, 2003 [larry]: pst: updated to docbook-xsl-1.61.3.
August 2nd, 2003 [larry]: X: updated to lesstif-0.93.46.
July 31st, 2003 [larry]: general: added patches to gpm-1.20.1.
July 30th, 2003 [larry]: content: added proftpd-1.2.8.
July 30th, 2003 [larry]: general: updated to Python-2.3.
July 24th, 2003 [tushar]: updated to mozilla-1.4
July 17th, 2003 [larry]: gnome: update to linc-1.0.3, libIDL-0.8.2, intltool-0.26 and bonobo-activation-2.2.2.
July 7th, 2003 [larry]: server: updated to postfix-2.0.13.
July 7th, 2003 [larry]: general: updated to libxml2-2.5.8 and libxslt-1.0.31.
July 2nd, 2003 [larry]: server: removed the creation of mount.smbs as current version creates this file in the /sbin directory. Reported by Eagle.
July 1st, 2003 [larry]: general: updated to Python-2.2.3.
July 01st, 2003 [larry]: general: updated to pcre-4.3.
July 01st, 2003 [larry]: server: update to openssh-3.6.1p2.
June 29th, 2003 [larry]: multimedia: Added udftools to cdwriting section contributed by Richard Downing.
June 27th, 2003 [larry]: server: updated to postfix-2.0.12.
June 27th 2003 [larry]: basicnet: updated to whois-4.6.6.
June 27th, 2003 [larry]: basicnet: removed inetutils- now in LFS.
June 17th, 2003 [larry]: general: updated intro for expat.
June 17th, 2003 [larry]: server: Added a configure switch to BIND. rndc was looking for its config file in /usr/etc.
June 17th, 2003 [larry]: general; disclosed patent issues with openssl.
June 13th, 2003 [larry]: general: updated intro on libjpeg and libtiff.
June 12th, 2003 [larry]: general: Updated intro on pkgconfig and atk.
June 12th, 2003 [larry]: x: updated to Pango-1.2.3 and GTK+-2.2.2.
June 12th, 2003 [larry]: general: updated to glib-2.2.2.
June 10th, 2003 [larry]: pst: modified xpdfrc as pointed out by Andre Kalus.
June 3rd, 2003 [tushar]: alsa: updated to 0.9.4 (submitted by James Iwanek).
May 14th, 2003 [larry]: x: updated to freetype-2.1.4.
May 14th, 2003 [larry]: intro and markup change to docbook-xsl, freetype2, libpng.
May 13th, 2003 [larry]: intro and markup change to db, procmail, fetchmail, mutt, GLib-2.0, libxslt.
May 12th, 2003 [larry]: xsoft: updated to pan-0.14.0.
May 12th, 2003 [larry]: intro and markup change to sgml-common and opensp.
May 5th, 2003 [larry]: postlfs: updated to iptables-1.2.8.
May 5th, 2003 [larry]: multimedia: updated to transcode-0.6.3.
May 4th, 2003 [larry]: multimedia: updated to xine-ui-0.9.20.
May 3rd, 2003 [larry]: basicnet: updated to pine-4.55.
May 1st, 2003 [larry]: multimedia: update to xine-lib-1-beta11.
May 1st, 2003 [larry]: server: updated to postfix-2.0.9.
May 1st, 2003 [larry]: general: after reviewing lcms, it appeared to be a good candidate for the newer LFS installation format. See what you think.
April 30th, 2003 [larry]: general: updated to lcms-1.10.
April 30th, 2003 [larry]: xsoft: updated to dillo-0.7.2.
April 29th, 2003 [larry]: general: updated to libxml2-2.5.7.
April 28th, 2003 [larry]: applied dillo patch.
April 28th, 2003 [larry]: template: modified template for new intro format.
April 28th, 2003 [larry]: general: updated to openssl-0.9.7b and pcre-4.2.
April 27th, 2003 [larry]: introduction: fixed url for ESR article. general: fixed aalib package size.
1.0 - April 25th, 2003
The linuxfromscratch.org server is hosting a number of mailing lists that are used for the development of the BLFS. These lists include, among others, the main development and support lists.
For more information regarding which lists are available, how to subscribe to them, archive locations, etc. visit http://www.linuxfromscratch.org/mailinglists.
All the mailing lists hosted at linuxfromscratch.org are also accessible via the NNTP server. All messages posted to a mailing list will be copied to its correspondent newsgroup, and vice versa.
The news server can be reached at news.linuxfromscratch.org.
If you encounter a problem while using this book, and your problem is not listed in the FAQ (http://www.linuxfromscratch.org/faq), you will find that most of the people on Internet Relay Chat (IRC) and on the mailing lists are willing to help you. An overview of the LFS mailing lists can be found in Mailing lists. To assist us in diagnosing and solving your problem, include as much relevant information as possible in your request for help.
Before asking for help, you should review the following items:
Is the hardware support compiled into the kernel or available as a module to the kernel. If it is a module, is it configured properly in modules.conf and has it been loaded. You should use lsmod as root to see if it's loaded. Check the sys.log or run modprobe <driver> to review any error message. If it loads properly, you may need to add the modprobe to your boot scripts.
Are your permissions properly set, especially for devices. LFS uses groups to make these settings easier, but it also adds the step of adding users to groups to allow access. A simple moduser -G audio <user> may be all that's necessary for that user to have access to the sound system. Any question that starts out with "It works as root, but not as ..." should review permissions thoroughly prior to asking.
BLFS liberally uses /opt/<package>. The main objection to this centers around the need to expand your environment variables for each package placed there (e.g. PATH=$PATH:/opt/kde/bin). In some cases, the package will walk you through the changes, but some will not. Appendix B is available to help you check.
Apart from a brief explanation of the problem you're having, the essential things to include in your request are:
the version of the book you are using (being 5.0-PRE1),
the package or section giving you problems,
the exact error message or symptom you are receiving,
whether you have deviated from the book or LFS at all.
(Note that saying that you've deviated from the book doesn't mean that we won't help you. It'll just help us to see other possible causes of your problem.)
Expect guidance instead of specific instructions. If you are instructed to read something, please do so, it generally implies that the answer was way too obvious and that the question would not have been asked if a little research was done prior to asking. The volunteers in the mailing list prefer not to be used as an alternative to doing reasonable research on your end. In addition, the quality of your experience with BLFS is also greatly enhanced by this research, and the quality of volunteers is enhanced because they don't feel that their time has been abused, so they are far more likely to participate.
An excellent article on asking for help on the Internet in general has been written by Eric S. Raymond. It is available online at http://www.catb.org/~esr/faqs/smart-questions.html. Read and follow the hints in that document and you are much more likely to get a response to start with and also to get the help you actually need.
Please direct your emails to one of the BLFS mailing lists. See Mailing lists for more information on the available mailing lists.
The current BLFS maintainer is Larry Lawrence. If you need to reach Larry, send an email to larry@linuxfromscratch.org.
Those people who have built a LFS system will be aware of the general principles of downloading and unpacking software. We will however repeat some of that information here for those new to building their own software.
Each set of installation instructions contains a URL from which you can download the package. We do however keep a selection of patches available via http. These are referenced as needed in the installation instructions.
While you can keep the source TAR balls anywhere you like, we assume that you have unpacked them and unzipped any required patches into /usr/src.
We can not emphasize strongly enough that you should start from a clean source tree each time. This means that if you have had an error, it's usually best to delete the source tree and re-unpack it before trying again. This obviously doesn't apply if you're an advanced user used to hacking Makefiles and C code, but if in doubt, start from a clean tree.
If a file is tar'ed and gzip'ed, it is unpacked by running one of the following two commands, depending on the filename:
tar -xvzf filename.tar.gz tar -xvzf filename.tgz tar -xvzf filename.tar.Z |
If a file is tar'ed and bzip2'ed, it can usually be unpacked by running:
tar -jxvf filename.tar.bz2 |
You can also use a slightly different method:
bzcat filename.tar.bz2 | tar -xv |
Finally, you need to be able to unpack patches which are generally not tar'ed. The best way to do this is to copy the patch file to /usr/src and then to run one of the following commands depending on whether the file is .gz or .bz2:
gunzip patchname.gz bunzip2 patchname.bz2 |
Should I install XXX in /usr or /usr/local?
This is a question without an obvious answer for an LFS based system.
In traditional Unix systems, /usr usually contains files that come with the system distribution, and the /usr/local tree is free for the local administrator to add things to. The only really hard and fast rule is that Unix distributions should not touch /usr/local, except perhaps for creating the basic directories within it.
With Linux distributions, like Red Hat, Debian etc. a possible rule is that /usr is managed by the distribution's package system and /usr/local is not. This way the package manager's database knows about every file within /usr.
LFS users build their own system and so deciding where the system ends and local files begin is not straightforward. So the choice should be made in order to make things easier to administer. There are several reasons for dividing files between /usr and /usr/local.
On a network of several machines all running LFS , or mixed LFS and other Linux distributions, /usr/local could be used to hold packages that are common between all the computers in the network. It can be NFS mounted or mirrored from a single server. Here local indicates local to the site.
On a network of several computers all running an identical LFS system /usr/local could hold packages that are different between the machines. In this case local refers to the individual computers.
Even on a single computer /usr/local can be useful if you have several distributions installed simultaneously, and want a place to put packages that will be the same on all of them.
Or you might regularly rebuild your LFS, but want a place to put files that you don't want to rebuild each time. This way you can wipe the LFS file system and start from a clean partition every time without losing everything.
Some people ask why not use your own directory tree, e.g. /usr/site rather than /usr/local?
There is nothing stopping you, many sites do make their own trees, however it makes installing new software more difficult. Automatic installers often look for dependencies in /usr and /usr/local, and if the file it is looking for is in /usr/site instead, the installer will probably fail unless you specifically tell it where to look.
What is the BLFS position on this?
All of the BLFS instructions install programs in /usr unless specifically stated otherwise. There are examples where some files are placed in the /usr/local hierarchy but these are documented and are generally for a good reason. These exceptions should be well documented in the book. If you think you have found one which isn't please tell us!
As you follow the various sections in the book, you will observe that the book includes various patches that are required for a successful and secure installation of the packages. The general policy of the book is to include patches that fall in one of the following criteria:
Fixes a compilation problem.
Fixes a security problem.
Fixes a broken functionality.
In short, the book only includes patches that are either Required or Recommended. There is a Patches subproject which hosts various patches (includng the patches included in the books) to enable you to configure your LFS the way you like it:)
The scripts included for packages such as GPM-1.20.1 and ALSA-0.9.6 are based around the template supplied with the lfs-bootscripts package from version 3.2 and later of the LFS book. Note that this is lfs-bootscripts-1.6 and later (the old numbering changed as of LFS-3.2). The scripts won't work with versions of LFS before 3.2 because of a change in their organization with the new scripts. However, it should be trivial to adapt the scripts if needed for older LFS versions.
The packages that are installed in this book are only the tip of the iceberg. We hope that the experience you gained with the LFS book and the BLFS book will give you the background needed to compile, install and configure packages that are not included in this book.
If you are in search of a package that is not in the book, the following are different ways you can search for the concerned package.
If you know the name of the package, then search FreshMeat for at http://freshmeat.net/. Also search Google at http://google.com/. Sometimes a search for the rpm at http://rpmfind.net/ or the deb at http://www.debian.org/distrib/packages#search_packages can also lead to the website for the package.
If you know the name of the executable, but not the package that the executable belongs to, first try a google search with the name of the executable. If the results are overwhelming, try searching for the given executable in the Debian repository at http://www.debian.org/distrib/packages#search_contents.
Some general hints on handling new packages:
Many of the newer packages follow the ./configure && make && make install dance routine. Help on the options accepted by configure can be obtained via the command ./configure --help.
Most of the packages contain documentation on compiling and installing the package. Some of the documents are excellent, some not so excellent. Check out the homepage of the package for any additional and updated hints for compiling and configuring the package.
If you are having a problem compiling the package, try searching the lfs archives at http://search.linuxfromscratch.org/ for the error or if that fails try searching google. If everything else fails, try the blfs support mailing-list/news-server.
Tip: If you have found a package that is only available in .deb or .rpm format, there are two small scripts rpm2targz and deb2targz that are available at http://www.linuxfromscratch.org/~tushar/downloads/ to convert the archives into a simple tar.gz format.
The intention of LFS is to provide a basic system which you can build upon. There are several things, about tidying up the system, which many people wonder about once they have done the base install. We hope to cover these issues in this chapter.
Most people coming from a Windows background to Linux find the concept of text-only configuration files slightly strange. In Linux, just about all configuration is done via text files. The majority of these files can be found in the /etc hierarchy. There are often graphical configuration programs available for different subsystems but most are simply pretty front ends to the process of editing the file. The advantage of text-only configuration is that you can edit parameters using your favorite text editor, whether that be vim, emacs or anything else.
The first task is making a recovery diskette because it's the most critical need. Then the system is configured to ease addition of new users, in "Configuring for Adding Users", because this can affect the choices you make in the three subsequent topics - "/etc/inputrc", "The Bash Shell Startup Files" and "/etc/vimrc, ~/.vimrc".
The remaining topics, "/etc/issue (Customizing your logon)", "Random number generation", "Man page issues" and "Info page issues" are then addressed, in that order. They don't have much interaction with the other topics in this chapter.
This section is really about creating a rescue diskette. As the name rescue implies, the host system has a problem, often lost partition information or corrupted file systems, that prevents it from booting and/or operating normally. For this reason, you must not depend on resources from the host being "rescued". To presume that any given partition or hard drive will be available is a risky presumption.
Heeding the warning, the rescue disk created here has no dependency on the host system's resources, other than basic bootability and hardware soundness. At a minimum, the most common sorts of failures requiring a rescue boot disk should be addressed by the contents of the boot disk. This would include the common loss of partitioning (master boot record is lost or corrupted), file system corruption, and the need to allow creation and editing of files that may have been lost or corrupted, possibly as an effect of the other two problems.
Additional utilities should be available to search for text or files, copy, move and remove files, and many other normal operations that might be expected to be needed when reconstructing.
The intent here is to create a "rescue boot disk" that will support the common operations listed above. These functions are provided by including selected executables from busybox and e2fsprogs. A basic editor and rudimentary disk partitioning utility may also be optionally included.
This, however, is not the limit. A minimal disk is described here, but you can add anything you can fit on the floppy. Furthermore, if one floppy is not enough to meet your needs, you can make a multi-diskette rescue set that means, essentially, the sky is the limit. This is discussed below. The number of other possible variations are just too numerous to mention here.
You should have known-good floppy diskettes available. Some people prefer to use the fdformat command to prepare these because it also does a verification. See the man page for more details. Another good idea is to always prepare duplicates of the rescue diskette. Media does deteriorate.
These instructions presume a base LFS install using ext2/ext3 file systems.
You need to have loopback device support enabled in your host's kernel to use this procedure.
You should make a custom kernel that includes only those features needed to rescue your system, so it will have the least size. No sense in building in support for things like XFree86, DRI, etc, as most rescues are performed from the command prompt. Along the same lines, if you have GCC-2.95.3, it is known to produce smaller kernels. So you might want to use that compiler for this kernel. If you do so, don't overlook any loadable modules (which are not addressed here) you might need - they need to be compiled with same compiler used to make the kernel.
The rescue image must include support for the file system of your choice (we presume ext2/3 here), ramdisk and initial ramdisk (initrd). Disable everything that you can in the kernel configuration. You should keep support for the proc file system and tempfs file system enabled because of their general utility. The proc file system is needed for the mount to report properly.
If you install only the minimal set of components shown in this document, you will need a kernel that is 643 or fewer blocks in size. If you want the optional programs - a very basic editor, like ed, and rudimentary disk partitioning, like sfdisk - the kernel will need to be 595 or fewer blocks in size. This should not be a major problem unless your needs are fairly esoteric. On the system used to develop this version of the procedures, using only ext2 file systems and not using networking or CDs for recovery, the kernel image is only 481 blocks. And there may be more to gain - it has not been closely examined for additional gains.
This kernel image will be called "rescueimage" hereinafter. You can actually name your image anything you like and just use its name instead in any commands that include "rescueimage".
If you can not get your kernel down to the size needed to allow all you need on the ramdisk image, don't fret. You can always build a two diskette set, one boot and one root diskette. The kernel will prompt you to insert the root file system diskette. This will allow room for a compressed ramdisk image of 1440 blocks and a kernel of the same size.
The kernel size limits given above are likely to vary as local system-specific configurations change. Use them only as a guideline and not as gospel. The size of the kernel image as shown by ls -sk is only an approximation because of some "overhead". On the system used to develop this version of these procedures, that command shows 488 blocks but the actual number of blocks written is only 480 and a fraction, which means that 481 blocks are actually used.
The basic process will be:
make a mount point for a file system
make an empty file to hold the file system
bind the empty file to a loopback device
make a 4MB file system
mount the file system
add components to the file system
make the compressed initrd
join a kernel image and initrd onto a diskette
The initial ramdisk will be automatically loaded at boot time if setup is done correctly.
Make a mount point and an empty file to hold a file system
mkdir -p /mnt/loop1 dd if=/dev/zero of=/tmp/rfloppy bs=1k count=4096 |
Command explanations
dd: This is a generalized input-to-output copy utility that also has many transformation capabilities.
if=/dev/zero: This parameter assigns dd's input file to a device that returns an infinite stream of zeroes.
of=/tmp/rfloppy: This parameter directs dd's output to /tmp/rfloppy.
bs=1k count=4096: These parameters tell dd to read and write in "chunks" of 1024 bytes and process 4096 "chunks".
Bind the file to a loopback device, make a file system and mount it.
The reason these commands are used is that they work regardless of the version of mount (older ones don't have the -o loop option) or if /etc/mtab is symlinked to /proc (which causes mount to be unable to properly "unbind" a loop device, due to "lost" information). An alternate set of commands is provided, after these three commands, that you can use if you don't have either of these situations.
losetup /dev/loop1 /tmp/rfloppy mke2fs -m 0 -N 504 /dev/loop1 mount -t ext2 /dev/loop1 /mnt/loop1 |
Command explanations
losetup /dev/loop1 /tmp/rfloppy: This command "binds" a loopback device to the empty file.
mke2fs -m 0 -N 504 /dev/loop1: This command makes an ext2 file system on the loopback device (which really means it is created in the file to which the loopback device is bound) and reserves no blocks. The -N 504 parameter causes only 504 inodes to be allocated, leaving more space for other things needed in the file system.
mount -t ext2 /dev/loop1 /mnt/loop1: This mounts the file system just created, just as if it were a real device, like a hard drive or diskette. This allows all the normal system I/O commands to operate as if a real device were present.
If your mount supports the -o loop option and your /etc/mtab is a real file, rather than a symlink to /proc, the three above commands can be replaced by these next two commands.
mke2fs -F -m 0 -N 504 /tmp/rfloppy mount -o loop /tmp/rfloppy /mnt/loop1 |
Command explanations
mke2fs -F -m 0 -N 504 /tmp/rfloppy: As before, a file system is made, with only 504 inodes and no reserved blocks, that will be bound to a loopback device. The -F parameter just suppresses an irritating question issued when mke2fs realizes that you are not accessing a device.
mount -o loop /tmp/rfloppy /mnt/loop1: This command tells mount to bind the named file to a loopback device it automatically selects (the first available) and mount the device on /mnt/loop1.
Add components to the file system
A cautionary note: if you are not running in a chroot environment, be sure that you do not accidentally omit the /mnt/loop1 reference in the commands. If you do so, you might replace the equivalent components on your host with the components that are installed by these procedures. Even if you are in a chroot environment, you may need to be careful if the environment is your freshly built LFS system which you intend to use as a host in the future.
First, to have as much free space as possible, remove the lost+found directory, which is not needed because it is only used by fsck. Since fsck will never be run on this file system, it is unneeded.
rmdir /mnt/loop1/lost+found/ |
Now make a minimal set of directories.
mkdir /mnt/loop1/{dev,proc,etc,sbin,bin,lib,mnt,usr,var} |
Add needed device files to the initrd image. If you use devfs, the following command works well, as you only have the devices you use anyway.
cp -dpR /dev/* /mnt/loop1/dev |
If you used MAKEDEV to create your devices on your host, you'll want to use something similar to this longer command, to minimize wasting space with unneeded inodes.
You must modify this to suit your kernel configuration and other needs. For example, you may need SCSI devices and may not need frame buffer devices or the pseudo-terminal directory. Also, the number of hard drives and partitions that you include should be the minimal that you need. Extensive analysis has not been done on the list below, so there are more inodes and space to be gained by "fine tuning" this set.
mkdir /mnt/loop1/dev/pts cp -a \ /dev/null /dev/console \ /dev/fb[0-7] /dev/fd /dev/fd0 /dev/fd0h1440 /dev/full \ /dev/hda* /dev/hdb* /dev/hdc* /dev/hdd* /dev/initctl /dev/kmem \ /dev/loop[0-3] /dev/lp0 /dev/mem /dev/port \ /dev/psaux /dev/ram \ /dev/ram0 /dev/ram1 /dev/ram2 /dev/ram3 /dev/random /dev/rtc \ /dev/shm /dev/stderr /dev/stdin /dev/stdout /dev/tty \ /dev/tty[0-9] /dev/ttyS0 /dev/ttyS1 /dev/urandom /dev/zero \ /mnt/loop1/dev |
What is needed in the /etc directory
If you choose, you can copy all or selected parts of your /etc/passwd and /etc/group files. But even if each is less than 1024 bytes, you will lose two inodes and two blocks of space on the initial ramdisk. This only really matters because of trying to squeeze everything onto a 1.44MB diskette. Every little bit helps. The strategy taken here is to create these two files as part of the rescue boot and initialization process. The commands that make the two files will be embedded inside the rcS script that linuxrc (really busybox ) invokes after the initrd is loaded. This way no more inodes or blocks are used on the diskette to carry these files.
Some might like to copy their /etc/rc* directory into the ramdisk image, but this may have no value, other than archival use, in a worst-case recovery scenario. If you want automatic initialization of the system after repair, they may have some value. But few people need or want this to happen. If the file system on the hard drives are corrupted, what good will mount scripts do? Some scripts may be useful, like access to a network to copy over backup data when the hard drive's file systems are usable again. The point is that you should copy only the parts that you can use because space is at a premium on the diskette.
Here, only the fstab will be included. This is handy because it eases mounting of partitions that may be useful and also can be examined and used as a guide as to what is available and what may need reconstruction. Because it may be larger than needed, you should edit it to remove any useless entries and minimize commentary. No other editing is needed because the boot scripts are not included and no automatic mounting will be done using the fstab. If you decide to include some boot scripts that might try to mount things, change the fstab's entries to noauto in the options field so they don't cause an attempt to mount a potentially corrupt partition. Copy it to /tmp, edit it as desired and then:
cp -a /tmp/fstab /mnt/loop1/etc |
Now the initialization script will be added. As mentioned above, linuxrc is symlinked to busybox . After the kernel and initial ramdisk have been loaded, the kernel gives control to linuxrc (busybox ). It wants to run an /etc/init.d/rcS script to do any initial setup.
If you use devfsd, you will need to set up the rcS script to handle the devfsd startup. Put the following commands in /mnt/loop1/etc/init.d/rcS. You may also want to add some of the processes shown in the non-devfs version that follows.
#!/bin/sh mount -t devfs devfs /dev /sbin/devfsd /dev |
If you don't use devfsd, but created a static /dev directory using MAKEDEV, or any similar process, the rcS script will do slightly different things. Also, don't forget that it is creating the /etc/passwd and /etc/group files, thus saving space on the diskette.
The script made next will mount /proc, turn on swap (no harm is done if it fails), make the /etc/passwd and /etc/group files, create a log directory and turn on swapping. Create the script with:
mkdir -p /mnt/loop1/etc/init.d cat >/mnt/loop1/etc/init.d/rcS << EOD #!/bin/sh mount -t proc proc /proc swapon -a echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd cat > /etc/group <<EOF root:x:0: bin:x:1: sys:x:2: kmem:x:3: tty:x:4: tape:x:5: daemon:x:6: floppy:x:7: disk:x:8: lp:x:9: dialout:x:10: audio:x:11: EOF chmod 644 /etc/passwd /etc/group mkdir /var/log EOD chmod u+x /mnt/loop1/etc/init.d/rcS |
Unless you add a lot to this script, which is encouraged, the above should be reasonably close to what you need.
Install packages
There are two packages that must be installed. The busybox package incorporates the core functions that provide a shell and many basic utilities. A file system package, like e2fsprogs, or a package for the file system you are using will provide a minimal set of utilities for file system checking and reconstruction. The whole package will not be installed, but only certain needed components.
If you use devfsd, you will also need to install that software.
Install busybox into the initial ramdisk image. Busybox incorporates many Unix utility program functions into a single small executable file.
make && make PREFIX=/mnt/loop1 install && > /mnt/loop1/var/utmp |
A var/utmp is made because busybox needs it for the reboot command to work properly. If this file doesn't exist when busybox is started, the reboot command will not work. This would be a bad thing for people that have no reset button available to them.
If you use devfs to create devices on the fly and free up precious inodes on the floppy, you'll also install devfsd to facilitate the devices that busybox expects to find. Use the following commands to do the install.
mv GNUmakefile Makefile && make && make PREFIX=/mnt/loop1 install && |
Install part of e2fsprogs
If you use the ext2 or ext3 (journaling) file system, you can use the commands below to install the minimal functionality that should allow you to get your hard drives usable again. If you use ext3, keep in mind that it is a part of the e2fsprogs package and you can get the components, which are mostly hard links, from the same places shown below. If you use some other file system, such as reiserfs, you should apply the principals you see here to install parts of that package instead.
LDFLAGS='-s' mkdir build && cd build && ../configure --prefix=/mnt/loop1/usr --with-root-prefix="" \ --disable-swapfs --disable-debugfs \ --enable-dynamic-e2fsck --disable-nls --disable-evms \ --disable-rpath && make LDFLAGS="$LDFLAGS" && strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/sbin/mke2fs misc/mke2fs && strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/sbin/e2fsck e2fsck/e2fsck && chmod 555 /mnt/loop1/sbin/{mke2f,e2fsck} |
Two useful utilities
There are two very useful utilities that any rescue disk should have to help in faster and more accurate recovery. The first is a partitioning utility. The sfdisk program is used here because of its small size and great power. Be warned though - it is not what is considered to be "user friendly". But the fdisk and cfdisk programs are substantially larger or require more shared objects, like ncurses .
The second utility is an editor. Most graphical editors are inherently too large and also require additional shared objects. For this reason, ed is used here. It is small, requires no additional shared objects and is a regex-based editor that is the ancestor to almost all subsequent editors that support regex-based editing, whether graphical or not. It is a "context editor" and offers powerful, but non-graphical, editing features. There are many other editors that may be suitable - feel free to use one of them instead.
Read the busybox INSTALL and README files to see how to include a vi editor. It has not been investigated here yet, so it may or may not easily fit onto a single diskette image such as is made here.
You can install these or not, but it is important for you to have some capability such as these offer. Exactly how you would install the utilities you choose will have to be determined by you.
Sfdisk and ed are installed by, essentially, copying them from your host. Strip is used, just to assure that they carry no "excess baggage", even though the base LFS install should have stripped them already. Use the following commands:
strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/sbin/sfdisk /sbin/sfdisk strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/bin/ed /bin/ed chmod 555 /mnt/loop1/sbin/sfdisk /mnt/loop1/bin/ed |
Also, keeping in mind your space limitations, copy any other binaries and libraries you need to the image. Use the ldd command to see which libraries you will need to copy over for any executables. Don't forget to also strip them before copying them to the ramdisk image or use the strip, as above, to "copy" them.
Set up the lib directory
Once you have installed all the utilities from above and any additional ones you want, use the ldd command, as mentioned above, on those that were not listed in this document. If any additional libraries are needed, add them into the setup commands shown next.
If you installed only those things shown above, the shared objects needed will be minimal. You can add them to the ramdisk image with:
strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/lib/libc.so.6 /lib/libc-2.3.2.so && strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/lib/ld-linux.so.2 /lib/ld-2.3.2.so && strip -p --strip-unneeded --remove-section=.comment \ -o /mnt/loop1/lib/libdl.so.2 /lib/libdl-2.3.2.so && chmod 555 /mnt/loop1/lib/{libc.so.6,ld-linux.so.2,libdl.so.2} |
Note that the above commands change the names of the libraries, eliminating the need for the usual symlinks. If you add any additional shared objects, be alert for similar opportunities and also the pitfalls that may be present.
Make the compressed initrd
Unmount the loopback file. If you used mount's -o loop option, the "bond" between the loop device and the file will be removed when the unmount is done. Just omit the losetup -d /dev/loop1 from the following sequence. The -9 parameter is used with gzip to make the smallest possible compressed image. To make sure it will fit on the diskette, list the file's size.
umount /mnt/loop1 && losetup -d /dev/loop1 && # Omit if mount's -o loop was used gzip -9 < /tmp/rfloppy > /tmp/rootfs.gz ls -l /tmp/rootfs.gz |
Join a kernel image and initrd onto a diskette
Now the kernel image and initial ramdisk image will be written to the boot diskette. Before doing this, calculate the number of blocks needed for the kernel and for the initrd, individually, by dividing each size by 1024 and adding one if there is any remainder. Add these two results together. They must total 1,440 or fewer blocks. If they total more than this, don't worry too much. Changes to make a two-diskette set are presented later. Of course, you could reexamine your choices and try to shrink either the kernel or the initial ramdisk image.
To make a single-floppy rescue, using devfs, use the following commands. If you use the static /dev setup, use /dev/fd0 instead of the /dev/floppy/0.
dd if=rescueimage of=/dev/floppy/0 bs=1k rdev /dev/floppy/0 0,0 rdev -R /dev/floppy/0 0 |
Command explanations
rdev /dev/floppy/0 0,0: sets the root file system the kernel will use when it boots. Because it loads an initrd, it will automatically set that as the root device, initially. So, the 0,0 gives it "no value", telling the kernel to not mount any other device. Some folks give /dev/fd0 or something similar. But this has effect only when linuxrc (really busybox ) exits and the normal init processes get invoked. Since this is not being done here, and the floppy is not a valid file system, it would be useless here. A hard drive would be a better choice if you are looking to automatically bring the system up after repair. Since busybox provides the reboot command, automatic initialization is not needed.
The rdev -R /dev/floppy/0 0 will set the "root flags" to zero. They have no use in this application.
The dd from above showed some results, like
480+1 records in 480+1 records out |
In this example the rescueimage (kernel) was 480+1 blocks in size. Make sure that this number, which may be different for you, matches your calculations from above. You need to calculate a "magic number" now that will be inserted into the kernel image. The value consists of three significant parts. Two are discussed here. The third is touched upon later.
Bits 0 - 10 will contain the size of the kernel image, in blocks, that you calculated above, and which should match the results from the dd above. Bit 14 (the 15th bit, which is 2 to the 14th power, or 16,384) is a flag that, when set to 1, tells the kernel an initial ramdisk is to be loaded. So for the single-floppy rescue diskette, the two numbers 16,384 and 481 (or whatever number is right for your kernel size) are added together to produce a decimal value, like 16865. This value is inserted into the proper place in the kernel image by the rdev command done next.
Insert the "magic number" into the kernel image and then write the root file system right after the kernel on the floppy by executing the following commands, with the proper numbers inserted. Notice that the seek parameter's number must be the size, in blocks, of your kernel image. If you use the static /dev setup, use /dev/fd0 in the commands below, instead of /dev/floppy/0.
rdev -r /dev/floppy/0 16865 dd if=/tmp/rootfs.gz of=/dev/floppy/0 bs=1k seek=481 |
In this command, seek was used to position to the block following the end of the kernel (480+1) and begin writing the root file system to the floppy.
If you just can't live with a single-diskette rescue system, here is what to do to make a simple two-diskette system. Note that the endless possibilities presented by the availability of linuxrc and other components are not addressed here. Here you will just use the kernel's ability to prompt for a second diskette that contains the initrd image and load it.
Modify the above instructions as follows. First a different magic number is needed. The 15th bit (bit 14) still needs to be set, but the size of the kernel image, in blocks, is replaced with a zero. The third component, which was not discussed above, is now used. This is the 16th bit (bit 15) of the "magic number". When set, it tells the kernel to ask the user to insert the "root" floppy. It then loads the initrd image from that diskette. Because the size of the kernel image was replaced by zero, the kernel starts loading from the "zero'th" block (the first one) on the second diskette.
The 16th bit (bit 15) represents 2 raised to the 15th power, or 32,768. So the new magic number is 32,768 + 16384, which is 49,152. This value tells the kernel to prompt for, and then load, an initial ramdisk image from the first block on the inserted floppy. So your first modification is to the command to write the "magic number" to the kernel image on the diskette.
rdev -r /dev/floppy/0 49152 |
Note that the initrd image is not copied to the diskette yet. Remove the boot diskette and insert another diskette that will hold your root file system. Run this modified command (don't forget to use /dev/fd0 if you don't use devfs). Note that no seek parameter is used.
dd if=/tmp/rootfs.gz of=/dev/floppy/0 bs=1k |
That's all there is to it. The possibilities from here are limited only by your imagination and tenacity in pursuing enhancements. And your willingness to research available documentation. A good starting point is the "Documentation" directory in your kernel source tree. More help may be gained at LFS Hints (please use a mirror site that is suitable) and TLDP.
Together, the /usr/sbin/useradd command and /etc/skel directory (both are easy to setup and use) provide a way to assure new users are added on your LFS system with the same beginning settings for things like PATH, keyboard processing and environmental variables. Using these two facilities makes it easier to assure this initial state for each new user.
The /etc/skel directory holds copies of various initialization and other files that may be copied to the new user's home directory when the /usr/sbin/useradd program adds the new user.
Useradd
The useradd program uses a collection of default values kept in /etc/default/useradd, if it exists. If the file does not exist, then it uses some internal defaults. You can see the default values by running /usr/sbin/useradd -D.
To change these values to something new, create a base /etc/default/useradd file with the same values as the output of /usr/sbin/useradd -D. Here is a sample.
# Begin /etc/default/useradd GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL= SKEL=/etc/skel # End /etc/default/useradd |
The only thing missing from the file is a default shell. Add that by running:
/usr/sbin/useradd -D -s/bin/bash |
This will set the SHELL= line to SHELL=/bin/bash.
Useradd has many parameters that can be set in the /etc/default/useradd file.
For more information see man useradd.
/etc/skel
To get started create an /etc/skel directory and make sure it is writable only by the system administrator, usually root. Creating the directory as root is the best way to go.
The mode of any files from this part of the book that you put in /etc/skel should be writable only by the owner. Also, since there is no telling what kind of sensitive information a user may eventually place in their copy of these files, you should make them unreadable by "group" and "other".
You can also put other files in /etc/skel and different permissions may be needed for them.
Decide which initialization files should be provided in every (or most) new user's home directory. The decisions you make will affect what you do in the next three sections, /etc/inputrc, The Bash Shell Startup Files and /etc/vimrc, ~/.vimrc. Some or all of those files will be useful for root, any already-existing users, and new users.
The files from those sections that you might want to place in /etc/skel include .inputrc, .bash_profile, .bashrc, .bash_logout, .dircolors, and .vimrc. If you are unsure which of these should be placed there, just continue to the following sections, read each section and any references provided, and then make your decision.
You will run a slightly modified set of commands for files which are placed in /etc/skel. Each section will remind you of this. In brief, the book's commands have been written for files not added to /etc/skel and just send the results to the user's home directory. If the file is going to be in /etc/skel, change the book's command(s) to send output there instead and then just copy the file from /etc/skel to the appropriate directories, like /etc, ~ or the home directory of any other user already in the system.
When Adding a User
When adding a new user with useradd use the -m parameter, which tells useradd to create the user's home directory and copy files from /etc/skel (can be overridden) to the new user's home directory. For example:
useradd -m -s/bin/bash jwrober |
Inputrc deals with the mapping of the keyboard for certain situations. This file is the start-up file used by readline - the input related library used by Bash and most other shells.
For more information see info bash -- Node: Readline Init file as well as info readline. There is a lot that can be done with this one rc file.
Global values are set in /etc/inputrc. Personal user values are set in ~/.inputrc. The ~/.inputrc file will override the global settings file. A later page sets up Bash to use /etc/inputrc if there is no .inputrc for a user when /etc/profile is read (usually at login). If you want your system to use both, or don't want global keyboard handling, it is a good idea to place a default .inputrc into the /etc/skel directory for use with new users.
Below is a base /etc/inputrc along with comments to explain what the various options do. Note that comments can not be on the same line as commands.
If you will create an .inputrc in /etc/skel using the command below, change the command's output to /etc/skel/.inputrc and be sure to check/set permissions afterward. Then you can just copy that file to /etc/inputrc and the home directory of any user already existing in the system, including root, that needs a private version of the file. Be sure to use the -p parameter of cp to maintain permissions and be sure to change owner and group appropriately.
cat > /etc/inputrc << "EOF" # Begin /etc/inputrc # Make sure we don't output everything on the 1 line set horizontal-scroll-mode Off # Enable 8bit input set meta-flag On set input-meta On # Turns off 8th bit stripping set convert-meta Off # Keep the 8th bit for display set output-meta On # none, visible or audible set bell-style none # All of the following map the escape sequence of the # value contained inside the 1st argument to the # readline specific functions "\eOd": backward-word "\eOc": forward-word # for linux console "\e[1~": beginning-of-line "\e[4~": end-of-line "\e[5~": beginning-of-history "\e[6~": end-of-history "\e[3~": delete-char "\e[2~": quoted-insert # for xterm "\eOH": beginning-of-line "\eOF": end-of-line # End /etc/inputrc EOF |
The shell program /bin/bash (hereafter referred to as just "the shell") uses a collection of startup files to help create an environment to run in. Each file has a specific use and may affect login and interactive environments differently. The files in the /etc directory generally provide global settings. If an equivalent file exists in your home directory it may override the global settings.
An interactive login shell is started after a successful login, using /bin/login, by reading the /etc/passwd file. An interactive non-login shell is started at the command-line (e.g. [prompt]$/bin/bash). A non-interactive shell is usually present when a shell script is running. It is non-interactive because it is processing a script and not waiting for user input between commands.
For more information see info bash -- Nodes: Bash Startup Files and Interactive Shells.
The following files are used to make sure that the correct environment is established for each of the ways the shell can be invoked: /etc/profile and its private equivalent ~/.bash_profile, and /etc/bashrc (unofficial) and its private equivalent ~/.bashrc.
The file ~/.bash_logout is not used for an invocation of the shell. It is read by the shell when a user logs out of the system.
The files /etc/profile and ~/.bash_profile are read when the shell is invoked as an interactive login shell. The file ~/.bashrc is read when the shell is invoked as an interactive non-login shell and it reads /etc/bashrc if it exists
Also useful are the /etc/dircolors and ~/.dircolors files called from /etc/profile. They control colorized output of things like ls --color.
Here is a base /etc/profile. Comments in the file should explain everything you need. For more information on the escape sequences you can use for your prompt (e.g. the PS1 environment variable) see info bash -- Node: Printing a Prompt.
cat > /etc/profile << "EOF" # Begin /etc/profile # Written for Beyond Linux From Scratch # by James Robertson <jameswrobertson@earthlink.net> # System wide environment variables and startup programs. # System wide aliases and functions should go in /etc/bashrc. Personal # environment variables and startup programs should go into # ~/.bash_profile. Personal aliases and functions should go into # ~/.bashrc. # Function to help us manage paths pathman () { if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then if [ "$2" = "last" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi fi } # Add to the standard path. if [ $(id -u) = 0 ] ; then if [ -d "/usr/local/sbin" ] ; then pathman /usr/local/sbin last fi fi if [ $(id -u) != 0 ] ; then if [ -d "/usr/local/bin" ] ; then pathman /usr/local/bin last fi fi if [ -d "/usr/X11R6/bin" ] ; then pathman /usr/X11R6/bin last fi # Setup some environment variables. HISTSIZE=1000 HISTIGNORE="&:[bf]g:exit" PS1="[\u@\h \w]\\$ " # Setup the INPUTRC environment variable. if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then INPUTRC=/etc/inputrc fi # Setup for /bin/ls to support color, the alias is in /etc/bashrc. if [ -f "/etc/dircolors" ] ; then eval $(dircolors -b /etc/dircolors) if [ -f "$HOME/.dircolors" ] ; then eval $(dircolors -b $HOME/.dircolors) fi fi export PATH HISTSIZE HISTIGNORE PS1 LS_COLORS INPUTRC # End /etc/profile EOF |
Here is a base /etc/bashrc. Comments in the file should explain everything you need.
cat > /etc/bashrc << "EOF" # Begin /etc/bashrc # Written for Beyond Linux From Scratch # by James Robertson <jameswrobertson@earthlink.net> # System wide aliases and functions. # System wide environment variables and startup programs should go into # /etc/profile. Personal environment variables and startup programs # should go into ~/.bash_profile. Personal aliases and functions should # go into ~/.bashrc # By default we want the umask to get set. # Even for non-interactive and non-login shells. if [ "$(id -gn)" = "$(id -un)" -a $(id -u) -gt 99 ] ; then umask 002 else umask 022 fi # Provides a colored /bin/ls command. Used in conjunction with code in # /etc/profile. alias ls='ls --color=auto' # Provides prompt for non-interactive shells, specifically shells started # in the xfree environment. [Review archive thread titled PS1 # Environment Variable for a great case study behind this script # addendum.] export PS1="[\u@\h \w]\\$ " # End /etc/bashrc EOF |
Here is a base ~/.bash_profile. Comments in the file should explain everything you need. If you want each new user to have this file automatically provided, just change the output of the next command to /etc/skel/.bash_profile and check the permissions after the command is run. You can then copy /etc/skel/.bash_profile to the home directories of already existing users, including root, and set the owner and group appropriately.
cat > ~/.bash_profile << "EOF" # Begin ~/.bash_profile # Written for Beyond Linux From Scratch # by James Robertson <jameswrobertson@earthlink.net> # Personal environment variables and startup programs. # Personal aliases and functions should go in ~/.bashrc. System wide # environment variables and startup programs are in /etc/profile. # System wide aliases and functions are in /etc/bashrc. if [ -f "$HOME/.bashrc" ] ; then source $HOME/.bashrc fi if [ -d "$HOME/bin" ] ; then pathman $HOME/bin last fi export PATH # End ~/.bash_profile EOF |
Here is a base ~/.bashrc. Comments in the file should explain everything you need. The comments and instructions for using /etc/skel for .bash_profile above also apply here. Only the target file names are different.
cat > ~/.bashrc << "EOF" # Begin ~/.bashrc # Written for Beyond Linux From Scratch # by James Robertson <jameswrobertson@earthlink.net> # Personal aliases and functions. # Personal environment variables and startup programs should go in # ~/.bash_profile. System wide environment variables and startup # programs are in /etc/profile. System wide aliases and functions are # in /etc/bashrc. if [ -f "/etc/bashrc" ] ; then source /etc/bashrc fi # End ~/.bashrc EOF |
Here is a base ~/.bash_logout. Comments in the file should explain everything you need. You will notice that the base ~/.bash_logout does not include a clear command. This is because the clear is handled in the /etc/issue file.
cat > ~/.bash_logout << "EOF" # Begin ~/.bash_logout # Written for Beyond Linux From Scratch # by James Robertson <jameswrobertson@earthlink.net> # Personal items to perform on logout. # End ~/.bash_logout EOF |
If you want to use the dircolors capability then run the following command. The /etc/skel setup steps seen above also can be used here to provide a .dircolors file when a new user is set up. As before, just change the output file name on the following command and assure the permissions, owner and group are correct on the files created and/or copied.
/bin/dircolors -p > /etc/dircolors
Ian Macdonald has written an excellent collection of tips and tricks to enhance your shell environment. You can read it online at http://www.caliban.org/bash/index.shtml
The LFS book installs vim as its editor. At this point we should state that there are a lot of different editors out there including emacs, nano, joe and many more. Anyone who has been around the Internet (especially usenet) for a short time will certainly have observed at least one flame war, usually involving vim and emacs users!
The LFS book gives a basic vimrc file. Here, we attempt to enhance this file. At startup, vim reads /etc/vimrc and ~/.vimrc (i.e., the global vimrc and the user-specific one.). Note that this is only true if you compiled vim using LFS-3.1 onwards. Prior to this, the global vimrc was /usr/share/vim/vimrc .
Here is a slightly expanded vimrc that you can put in /etc/vimrc to provide global effect. Of course, if you put it into /etc/skel/.vimrc instead, it will be made available to users you add to the system later. You can also copy the file from /etc/skel/.vimrc to /etc/vimrc and the home directory of users already on the system, like root. Be sure to set permissions, owner and group if you do copy anything directly from /etc/skel.
" Begin .vimrc set bs=2 set columns=80 set background=dark set wrapmargin=8 syntax on set ruler " End .vimrc |
A FAQ on the lfs mailing lists regards the comment tags in vimrc. Note that they are " instead of the more usual # or //. This is correct, the syntax for vimrc is slightly unusual.
We'll run through a quick explanation of what each of the options in this example file means here:
set bs=2: This influences the behavior of the backspace option. It is fairly complex so see :help 'bs' for more details.
set columns=80: This simply sets the number of columns used on the screen.
set background=dark: This tells vim to use colors which look good on a dark background.
set wrapmargin=8: This is the number of characters from the right window border where wrapping starts.
syntax on: Enables vim's syntax highlighting.
set ruler: This makes vim show the current row and column at the bottom right of the screen.
More information on the many vim options can be found by reading the help inside vim itself. Do this by typing :help in vim to get the general help, or by typing : help usr_toc.txt to view the User Manual Table of Contents.
When you first boot up your new LFS system, the logon screen will be nice and plain (as it should be in a bare-bones system). Many people however, will want their system to display some information in the logon message. This can be accomplished using the file /etc/issue.
The /etc/issue file is a plain text file which will also accept certain Escape sequences (see below) in order to insert information about the system. There is also the file issue.net which can be used when logging on remotely. ssh however, will only use it if you set the option in the configuration file and will also not interpret the escape sequences shown below.
One of the most common things which people want to do is to clear the screen at each logon. The easiest way of doing that is to put a "clear" escape-sequence into /etc/issue. A simple way of doing this is to do clear > /etc/issue. This will insert the relevant escape code into the start of the /etc/issue file. Note that if you do this, when you edit the file, you should leave the ^[c character on the first line alone.
The following escapes are recognized by agetty (the program which usually parses /etc/issue). This information is from man agetty where you can find extra information about the logon process.
The issue file can contain certain escape codes to display various information. All escape codes consist of a backslash (\) immediately followed by one of the letters explained below (so \d in /etc/issue would insert the current date).
b Insert the baudrate of the current line.
d Insert the current date.
s Insert the system name, the name of the operating system.
l Insert the name of the current tty line.
m Insert the architecture identifier of the machine, e.g. i486
n Insert the nodename of the machine, also known as the hostname.
o Insert the domainname of the machine.
r Insert the release number of the kernel, e.g. 2.4.16.
t Insert the current time.
u Insert the number of current users logged in.
U Insert the string "1 user" or "<n> users" where <n> is the
number of current users logged in.
v Insert the version of the OS, e.g. the build-date etc. |
The Linux kernel supplies a random number generator which is accessed through /dev/random and /dev/urandom. Programs that utilize the random and urandom devices, such as OpenSSH, will benefit from these instructions.
When a Linux system starts up without much operator interaction, the entropy pool, data used to compute a random number, may be in a fairly predictable state. This creates the real possibility that the number generated at startup may always be the same. In order to counteract this effect, you should carry the entropy pool information across your shut-downs and start-ups. The following init.d script and links will perform this function for you automatically.
cat > /etc/rc.d/init.d/random << "EOF" #!/bin/sh # Begin $rc_base/init.d/random # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org # Random script elements by Larry Lawrence source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Initializing kernel random number generator..." if [ -f /var/tmp/random-seed ]; then cat /var/tmp/random-seed >/dev/urandom fi dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null evaluate_retval ;; stop) echo "Saving random seed..." dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null evaluate_retval ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac # End $rc_base/init.d/random EOF chmod 755 /etc/rc.d/init.d/random |
Create the symbolic links to this file in the relevant rc.d directories with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/random ../rc0.d/K45random && ln -sf ../init.d/random ../rc2.d/S25random && ln -sf ../init.d/random ../rc3.d/S25random && ln -sf ../init.d/random ../rc4.d/S25random && ln -sf ../init.d/random ../rc5.d/S25random && ln -sf ../init.d/random ../rc6.d/K45random |
Man and info reader programs can transparently process gzip'ed or bzip2'ed pages, a feature you can use to free some disk space while keeping your documentation available. However, things are not that simple: man directories tend to contain links - hard and symbolic - which defeat simple ideas like recursively calling gzip on them. A better way to go is to use the script below.
cat > /usr/bin/compressdoc << "EOF" #!/bin/bash # VERSION: 20031004.0245 # # Compress (with bzip2 or gzip) all man pages in a hierarchy and # update symlinks - By Marc Heerdink <marc @ koelkast.net> # Modified to be able to gzip or bzip2 files as an option and to deal # with all symlinks properly by Mark Hymers <markh @ linuxfromscratch.org> # # Modified 20030930 by Yann E. Morin <yann.morin.1998 @ anciens.enib.fr> # to accept compression/decompression, to correctly handle hard-links, # to allow for changing hard-links into soft- ones, to specify the # compression level, to parse the man.conf for all occurrences of MANPATH, # to allow for a backup, to allow to keep the newest version of a page. # # TODO: # - choose a default compress method to be based on the available # tool : gzip or bzip2; # - when a MANPATH env var exists, use this instead of /etc/man.conf # (useful for users to (de)compress their man pages; # - offer an option to restore a previous backup; # - add other compression engines (compress, zip, etc?). Needed? # Funny enough, this function prints some help. function help () { if [ -n "$1" ]; then echo "Unknown option : $1" fi ( echo "Usage: $0 <comp_method> [options] [dirs]" && \ cat << EOT Where comp_method is one of : --gzip, --gz, -g --bzip2, --bz2, -b Compress using gzip or bzip2. --decompress, -d Decompress the man pages. --backup Specify a .tar backup shall be done for every directories. In case a backup already exists, it is saved as .tar.old prior to making the new backup. If an .tar.old backup exist, it is removed prior to saving the backup. In backup mode, no other action is performed. And where options are : -1 to -9, --fast, --best The compression level, as accepted by gzip and bzip2. When not specified, uses the default compression level for the given method (-6 for gzip, and -9 for bzip2). Not used when in backup or decompress modes. --force, -F Force (re-)compression, even if the previous one was the same method. Useful when changing the compression ratio. By default, a page will not be re-compressed if it ends with the same suffix as the method adds (.bz2 for bzip2, .gz for gzip). --soft, -S Change hard-links into soft-links. Use with _caution_ as the first encountered file will be used as a reference. Not used when in backup mode. --hard, -H Change soft-links into hard-links. Not used when in backup mode. --conf=dir, --conf dir Specify the location of man.conf. Defaults to /etc. --verbose, -v Verbose mode, print the name of the directory being processed. Double the flag to turn it even more verbose, and to print the name of the file being processed. --fake, -f Fakes it. Print the actual parameters compman will use. dirs A list of space-separated _absolute_ pathname to the man directories. When empty, and only then, parse ${MAN_CONF}/man.conf for all occurrences of MANPATH. Note about compression There has been a discussion on blfs-support about compression ratios of both gzip and bzip2 on man pages, taking into account the hosting fs, the architecture, etc... On the overall, the conclusion was that gzip was much efficient on 'small' files, and bzip2 on 'big' files, small and big being very dependent on the content of the files. See the original post from Mickael A. Peters, titled "Bootable Utility CD", and dated 20030409.1816(+0200), and subsequent posts: http://linuxfromscratch.org/pipermail/blfs-support/2003-April/038817.html On my system (x86, ext3), man pages were 35564kiB before compression. gzip -9 compressed them down to 20372kiB (57.28%), bzip2 -9 got down to 19812kiB (55.71%). That is a 1.57% gain in space. YMMV. What was not taken into consideration was the decompression speed. But does it make sense to? You gain fast access with uncompressed man pages, or you gain space at the expense of a slight overhead in time. Well, my P4-2.5GHz does not even let me notice this... :-) EOT ) | less } # This function checks that the man page is unique amongst bzip2'd, gzip'd and # uncompressed versions. # $1 the directory in which the file resides # $2 the file name for the man page # Returns 0 (true) if the file is the latest and must be taken care of, and 1 # (false) if the file is not the latest (and has therefore been deleted). function check_unique () { # NB. When there are hard-links to this file, these are # _not_ deleted. In fact, if there are hard-links, they # all have the same date/time, thus making them ready # for deletion later on. # Build the list of all man pages with the same name DIR=$1 BASENAME=`basename "${2}" .bz2` BASENAME=`basename "${BASENAME}" .gz` LIST= [ -f "$DIR"/"${BASENAME}" -o -L "$DIR"/"${BASENAME}" ] && LIST="${LIST} ${BASENAME}" [ -f "$DIR"/"${BASENAME}".gz -o -L "$DIR"/"${BASENAME}".gz ] && LIST="${LIST} ${BASENAME}.gz" [ -f "$DIR"/"${BASENAME}".bz2 -o -L "$DIR"/"${BASENAME}".bz2 ] && LIST="${LIST} ${BASENAME}.bz2" # Look for, and keep, the most recent one LATEST=`(cd "$DIR"; ls -1rt $LIST | tail -1)` for i in $LIST; do [ "$LATEST" != "$i" ] && rm -f "$DIR"/"$i" done # In case the specified file was the latest, return 0 [ "$LATEST" = "$2" ] && return 0 # If the file was not the latest, return 1 return 1 } # OK, parse the command-line for arguments, and initialize to some sensible # state, that is : don't change links state, parse /etc/man.conf, be most # silent, search man.conf in /etc, and don't force (re-)compression. COMP_METHOD= COMP_SUF= COMP_LVL= FORCE_OPT= LN_OPT= MAN_DIR= VERBOSE_LVL=0 BACKUP=no FAKE=no MAN_CONF=/etc while [ -n "$1" ]; do case $1 in --gzip|--gz|-g) COMP_SUF=.gz COMP_METHOD=$1 shift ;; --bzip2|--bz2|-b) COMP_SUF=.bz2 COMP_METHOD=$1 shift ;; --decompress|-d) COMP_SUF= COMP_LVL= COMP_METHOD=$1 shift ;; -[1-9]|--fast|--best) COMP_LVL=$1 shift ;; --force|-F) FORCE_OPT=-F shift ;; --soft|-S) LN_OPT=-S shift ;; --hard|-H) LN_OPT=-H shift ;; --conf=*) MAN_CONF=`echo $1 | cut -d '=' -f2-` shift ;; --conf) MAN_CONF="$2" shift 2 ;; --verbose|-v) let VERBOSE_LVL++ shift ;; --backup) BACKUP=yes shift ;; --fake|-f) FAKE=yes shift ;; --help|-h) help exit 0 ;; /*) MAN_DIR="${MAN_DIR} ${1}" shift ;; -*) help $1 exit 1 ;; *) echo "\"$1\" is not an absolute path name" exit 1 ;; esac done # Redirections case $VERBOSE_LVL in 0) # O, be silent DEST_FD0=/dev/null DEST_FD1=/dev/null VERBOSE_OPT= ;; 1) # 1, be a bit verbose DEST_FD0=/dev/stdout DEST_FD1=/dev/null VERBOSE_OPT=-v ;; *) # 2 and above, be most verbose DEST_FD0=/dev/stdout DEST_FD1=/dev/stdout VERBOSE_OPT="-v -v" ;; esac # Note: on my machine, 'man --path' gives /usr/share/man twice, once with a trailing '/', once without. if [ -z "$MAN_DIR" ]; then MAN_DIR=`man --path -C "$MAN_CONF"/man.conf \ | sed 's/:/\\n/g' \ | while read foo; do dirname "$foo"/.; done \ | sort -u \ | while read bar; do echo -n "$bar "; done` fi # If no MANPATH in ${MAN_CONF}/man.conf, abort as well if [ -z "$MAN_DIR" ]; then echo "No directory specified, and no directory found with \`man --path'" exit 1 fi # Fake? if [ "$FAKE" != "no" ]; then echo "Actual parameters used:" echo -n "Compression.......: " case $COMP_METHOD in --bzip2|--bz2|-b) echo -n "bzip2";; --gzip|__gz|-g) echo -n "gzip";; --decompress|-d) echo -n "decompressing";; *) echo -n "unknown";; esac echo " ($COMP_METHOD)" echo "Compression level.: $COMP_LVL" echo "Compression suffix: $COMP_SUF" echo -n "Force compression.: " [ "foo$FORCE_OPT" = "foo-F" ] && echo "yes" || echo "no" echo "man.conf is.......: ${MAN_CONF}/man.conf" echo -n "Hard-links........: " [ "foo$LN_OPT" = "foo-S" ] && echo "convert to soft-links" || echo "leave as is" echo -n "Soft-links........: " [ "foo$LN_OPT" = "foo-H" ] && echo "convert to hard-links" || echo "leave as is" echo "Backup............: $BACKUP" echo "Faking (yes!).....: $FAKE" echo "Directories.......: $MAN_DIR" echo "Verbosity level...: $VERBOSE_LVL" exit 0 fi # If no method was specified, print help if [ -z "${COMP_METHOD}" -a "${BACKUP}" = "no" ]; then help exit 1 fi # In backup mode, do the backup solely if [ "$BACKUP" = "yes" ]; then for DIR in $MAN_DIR; do cd "${DIR}/.." DIR_NAME=`basename "${DIR}"` echo "Backing up $DIR..." > $DEST_FD0 [ -f "${DIR_NAME}.tar.old" ] && rm -f "${DIR_NAME}.tar.old" [ -f "${DIR_NAME}.tar" ] && mv "${DIR_NAME}.tar" "${DIR_NAME}.tar.old" tar cfv "${DIR_NAME}.tar" "${DIR_NAME}" > $DEST_FD1 done exit 0 fi # I know MAN_DIR has only absolute path names # I need to take into account the localized man, so I'm going recursive for DIR in $MAN_DIR; do MEM_DIR=`pwd` cd "$DIR" for FILE in *; do # Fixes the case were the directory is empty if [ "foo$FILE" = "foo*" ]; then continue; fi # Fixes the case when hard-links see their compression scheme change # (from not compressed to compressed, or from bz2 to gz, or from gz to bz2) # Also fixes the case when multiple version of the page are present, which # are either compressed or not. if [ ! -L "$FILE" -a ! -e "$FILE" ]; then continue; fi if [ -d "$FILE" ]; then cd "${MEM_DIR}" # Go back to where we ran "$0", in case "$0"=="./compressdoc" ... # We are going recursive to that directory echo "-> Entering ${DIR}/${FILE}..." > $DEST_FD0 # I need not pass --conf, as I specify the directory to work on # But I need exit in case of error "$0" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} ${VERBOSE_OPT} ${FORCE_OPT} "${DIR}/${FILE}" || exit 1 echo "<- Leaving ${DIR}/${FILE}." > $DEST_FD1 cd "$DIR" # Needed for the next iteration of the loop else # !dir if ! check_unique "$DIR" "$FILE"; then continue; fi # Check if the file is already compressed with the specified method BASE_FILE=`basename \`basename "$FILE" .bz2\` .gz` if [ "${FILE}" = "${BASE_FILE}${COMP_SUF}" -a "foo${FORCE_OPT}" = "foo" ]; then continue; fi # If we have a symlink if [ -h "$FILE" ]; then case $FILE in *.bz2) EXT=bz2 ;; *.gz) EXT=gz ;; *) EXT=none ;; esac if [ ! "$EXT" = "none" ]; then LINK=`ls -l $FILE | cut -d ">" -f2 | tr -d " " | sed s/\.$EXT$//` NEWNAME=`echo "$FILE" | sed s/\.$EXT$//` mv "$FILE" "$NEWNAME" FILE="$NEWNAME" else LINK=`ls -l $FILE | cut -d ">" -f2 | tr -d " "` fi if [ "$LN_OPT" = "-H" ]; then # Change this soft-link into a hard- one rm -f "$FILE" && ln "${LINK}$COMP_SUF" "${FILE}$COMP_SUF" chmod --reference "${LINK}$COMP_SUF" "${FILE}$COMP_SUF" else # Keep this soft-link a soft- one. rm -f "$FILE" && ln -s "${LINK}$COMP_SUF" "${FILE}$COMP_SUF" fi echo "Relinked $FILE" > $DEST_FD1 # else if we have a plain file elif [ -f "$FILE" ]; then # Take care of hard-links: build the list of files hard-linked # to the one we are {de,}compressing. # NB. This is not optimum has the file will eventually be compressed # as many times it has hard-links. But for now, that's the safe way. inode=`ls -li "$FILE" | awk '{print $1}'` HLINKS=`find . \! -name "$FILE" -inum $inode` if [ -n "$HLINKS" ]; then # We have hard-links! Remove them now. for i in $HLINKS; do rm -f "$i"; done fi # Now take care of the file that has no hard-link # We do decompress first to re-compress with the selected # compression ratio later on... case $FILE in *.bz2) bunzip2 $FILE FILE=`basename "$FILE" .bz2` ;; *.gz) gunzip $FILE FILE=`basename "$FILE" .gz` ;; esac # Compress the file with the given compression ratio, if needed case $COMP_SUF in *bz2) bzip2 ${COMP_LVL} "$FILE" && chmod 644 "${FILE}${COMP_SUF}" echo "Compressed $FILE" > $DEST_FD1 ;; *gz) gzip ${COMP_LVL} "$FILE" && chmod 644 "${FILE}${COMP_SUF}" echo "Compressed $FILE" > $DEST_FD1 ;; *) echo "Uncompressed $FILE" > $DEST_FD1 ;; esac # If the file had hard-links, recreate those (either hard or soft) if [ -n "$HLINKS" ]; then for i in $HLINKS; do NEWFILE=`echo $i | sed s/\.gz$// | sed s/\.bz2$//` if [ "$LN_OPT" = "-S" ]; then # Make this hard-link a soft- one ln -s "${FILE}$COMP_SUF" "${NEWFILE}$COMP_SUF" else # Keep the hard-link a hard- one ln "${FILE}$COMP_SUF" "${NEWFILE}$COMP_SUF" fi chmod 644 "${NEWFILE}$COMP_SUF" # Really work only for hard-links. Harmless for soft-links done fi else # There is a problem when we get neither a symlink nor a plain file # Obviously, we shall never ever come here... :-( echo "Whaooo... \"${DIR}/${FILE}\" is neither a symlink nor a plain file. Please check:" ls -l ${DIR}/${FILE} exit 1 fi fi done # for FILE done # for DIR EOF chmod 755 /usr/bin/compressdoc |
Now, as root, you can issue a /usr/bin/compressdoc --bz2 to compress all your system man pages. You can also run /usr/bin/compressdoc --help to get a comprehensive help about what the script is able to do.
Don't forget that a few programs, like the X Window system, XEmacs, also install their documentation in non standard places (such as /usr/X11R6/man, etc...). Don't forget to add those locations in the file /etc/man.conf, as a MANPATH=/path section.
Example:
... MANPATH=/usr/share/man MANPATH=/usr/local/man MANPATH=/usr/X11R6/man MANPATH=/opt/qt/doc/man ... |
Generally, package installation systems do not compress man/info pages, which means you will need to run the script again if you want to keep the size of your documentation as small as possible. Also, note that running the script after upgrading a package is safe: when you have several versions of a page (for example, one compressed and one uncompressed), the most recent one is kept and the others deleted.
Security takes many forms in a computing environment. This chapter gives examples of three different types of security: access, prevention and detection.
Access for users is usually handled by login or an application designed to handle the login function. In this chapter, we show how to enhance login by setting policies with PAM modules. Access via networks can also be secured by policies set by iptables, commonly referred to as a firewall.
Prevention of breaches, like a trojan, are assisted by applications like GnuPG, specifically the ability to confirm signed packages, which prevents modification of the TAR ball after the packager creates it.
Finally, we touch on detection with a package that stores "signatures" of critical files (defined by the administrator) and then regenerates those "signatures" and compares for files that have been changed.
The Linux-PAM package contains Pluggable Authentication Modules. This is useful to enable the local system administrator to choose how applications authenticate users.
Download (HTTP): http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-0.77.tar.bz2
Download (FTP): ftp://ftp.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-0.77.tar.bz2
Download size: 332 KB
Estimated Disk space required: 4.1 MB
Estimated build time: 0.07 SBU
Install Linux-PAM by running the following commands:
patch -Np1 -i ../Linux-PAM-0.77-linkage-1.patch && ./configure --enable-static-libpam --with-mailspool=/var/mail \ --enable-read-both-confs --sysconfdir=/etc && make && make install && mv /lib/libpam.a /lib/libpam_misc.a /lib/libpamc.a /usr/lib && ln -sf ../../lib/libpam.so.0.77 /usr/lib/libpam.so && ln -sf ../../lib/libpam_misc.so.0.77 /usr/lib/libpam_misc.so && ln -sf ../../lib/libpamc.so.0.77 /usr/lib/libpamc.so |
--enable-static-libpam: This switch builds static PAM libraries as well as the dynamic libraries.
--with-mailspool=/var/mail: This switch makes the mailspool directory FHS compliant.
--enable-read-both-confs: This switch lets the local administrator choose which configuration file setup to use.
mv /lib/libpam.a /lib/libpam_misc.a /lib/libpamc.a /usr/lib: This command moves the static libraries to /usr/lib to comply with FHS.
Configuration information is placed in /etc/pam.d or /etc/pam.conf depending on the application that is using PAM. Below are example files of each type:
# Begin /etc/pam.d/other auth required pam_unix.so nullok account required pam_unix.so session required pam_unix.so password required pam_unix.so nullok # End /etc/pam.d/other # Begin /etc/pam.conf other auth required pam_unix.so nullok other account required pam_unix.so other session required pam_unix.so other password required pam_unix.so nullok # End /etc/pam.conf |
The PAM man page (man pam) provides a good starting point for descriptions of fields and allowable entries. The Linux-PAM guide for system administrators is recommended for further reading.
Shadow was indeed installed in LFS and there is no reason to reinstall it unless you installed Linux-PAM. If you did, this will allow programs like login and su to utilize PAM.
Download the patch for shadow from http://www.linuxfromscratch.org/patches/blfs/5.0.
Reinstall shadow by running the following commands:
patch -Np1 -i ../shadow-4.0.3-pam-2.patch && ./configure --prefix=/usr --libdir=/usr/lib \ --enable-shared --with-libpam && make && make install && ln -sf vipw /usr/sbin/vigr && rm /bin/vipw && mv /bin/sg /usr/bin && mv /usr/lib/lib{misc,shadow}.so.0* /lib && ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so && ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so && cp debian/securetty /etc/securetty |
cp debian/securetty /etc/securetty: This command sets the tty's that allow logins through PAM.
/etc/pam.d/login, /etc/pam.d/passwd, /etc/pam.d/su, /etc/pam.d/shadow, /etc/pam.d/useradd
Add the following PAM configuration files to /etc/pam.d (or add them to /etc/pam.conf with the additional field for the program).
cat > /etc/pam.d/login << "EOF" # Begin /etc/pam.d/login auth requisite pam_securetty.so auth requisite pam_nologin.so auth required pam_env.so auth required pam_unix.so account required pam_access.so account required pam_unix.so session required pam_motd.so session required pam_limits.so session optional pam_mail.so dir=/var/mail standard session optional pam_lastlog.so session required pam_unix.so # End /etc/pam.d/login EOF cat > /etc/pam.d/passwd << "EOF" # Begin /etc/pam.d/passwd password required pam_unix.so md5 shadow # End /etc/pam.d/passwd EOF cat > /etc/pam.d/shadow << "EOF" # Begin /etc/pam.d/shadow auth sufficient pam_rootok.so auth required pam_unix.so account required pam_unix.so session required pam_unix.so password required pam_permit.so # End /etc/pam.d/shadow EOF cat > /etc/pam.d/su << "EOF" # Begin /etc/pam.d/su auth sufficient pam_rootok.so auth required pam_unix.so account required pam_unix.so session required pam_unix.so # End /etc/pam.d/su EOF cat > /etc/pam.d/useradd << "EOF" # Begin /etc/pam.d/useradd auth sufficient pam_rootok.so auth required pam_unix.so account required pam_unix.so session required pam_unix.so password required pam_permit.so # End /etc/pam.d/useradd EOF cat > /etc/pam.d/chage << "EOF" # Begin /etc/pam.d/chage auth sufficient pam_rootok.so auth required pam_unix.so account required pam_unix.so session required pam_unix.so password required pam_permit.so # End /etc/pam.d/chage EOF |
Currently, /etc/pam.d/other is configured to allow anyone with an account on the machine to use programs that do not specifically have a configuration file of their own. After testing PAM for proper configuration, it can be changed to the following:
cat > /etc/pam.d/other << "EOF" # Begin /etc/pam.d/other auth required pam_deny.so auth required pam_warn.so account required pam_deny.so session required pam_deny.so password required pam_deny.so password required pam_warn.so # End /etc/pam.d/other EOF |
Finally, edit /etc/login.defs by adding '#' to the beginning of the following lines:
DIALUPS_CHECK_ENAB LASTLOG_ENAB MAIL_CHECK_ENAB PORTTIME_CHECKS_ENAB CONSOLE MOTD_FILE NOLOGINS_FILE PASS_MIN_LEN SU_WHEEL_ONLY MD5_CRYPT_ENAB CONSOLE_GROUPS ENVIRON_FILE |
This stops login from performing these functions, as they will now be performed by PAM modules.
The next part of this chapter deals with firewalls. The principle firewall tool for Linux, as of the 2.4 kernel series, is iptables. It replaces ipchains from the 2.2 series and ipfwadm from the 2.0 series. You will need to install iptables if you intend on using any form of a firewall.
To use a firewall, as well as installing iptables, you will need to configure the relevant options into your kernel. This is discussed in the next part of this chapter - getting a firewalling-enabled Kernel.
If you intend to use IPv6 you might consider extending the kernel by running make patch-o-matic in the top-level directory of the sources of iptables. If you are going to do this, on a freshly untarred kernel, you need to run yes "" | make config && make dep first because otherwise the patch-o-matic command is likely to fail while setting up some dependencies.
If you are going to patch the kernel, you need to do it before you compile iptables, because during the compilation, the kernel source tree is checked (if it is available at /usr/src/linux-[version] to see which features are available. Support will only be compiled into iptables for the features recognized at compile-time. Applying a kernel patch may result in errors, often because the hooks for the patches have changed or because the runme script doesn't recognize that a patch has already been incorporated.
Note that for most people, patching the kernel is unnecessary. With the later 2.4.x kernels, most functionality is already available and those who need to patch it are generally those who need a specific feature; if you don't know why you need to patch the kernel, you're unlikely to need to!
Download (HTTP): http://www.iptables.org/files/iptables-1.2.8.tar.bz2
Download (FTP): ftp://ftp.netfilter.org/pub/iptables/iptables-1.2.8.tar.bz2
Download size: 128 KB
Estimated Disk space required: 2.8 MB
Estimated build time: 0.28 SBU
Install iptables by running the following commands:
make PREFIX=/usr && make PREFIX=/usr install |
PREFIX=/usr: Compiles and installs iptables into the /usr hierarchy instead of /usr/local.
iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.
These are used to save and to restore your elaborated set of chains and rules. Until iptables-1.2.5, they were declared experimental.
Before you read this part of the chapter, note that we assume that you have already installed iptables as described in the previous section.
The general purpose of a firewall is to protect a network against malicious access by using a single machine as a firewall. This does imply that the firewall is to be considered a single point of failure, but it can make the administrators life a lot easier.
In a perfect world where you knew that every daemon or service on every machine was perfectly configured and was immune to, e.g., buffer-overflows and any other imaginable problem regarding its security, and where you trusted every user accessing your services to aim no harm, you wouldn't need to do have a firewall! In the real world however, daemons may be misconfigured, exploits against essential services are freely available, you may wish to choose which services are accessible by certain machines, you may wish to limit which machines or applications are allowed to have Internet access, or you may simply not trust some of your apps or users. In these situations you might benefit by using a firewall.
Don't assume however, that having a firewall makes careful configuration redundant, nor that it makes any negligent misconfiguration harmless, nor that it prevents anyone from exploiting a service you intentionally offer but haven't recently updated or patched after an exploit went public. Despite having a firewall, you need to keep applications and daemons on your system well-configured and up-to-date; a firewall is not a cure-all!
The word firewall can have several different meanings.
This is a setup or program, for Windows commercially sold by companies such as Symantec, of which they claim or pretend that it secures a home or desktop-pc with Internet access. This topic is highly relevant for users who do not know the ways their computers might be accessed via the Internet and how to disable these, especially if they are always online and if they are connected via broadband links.
This is a box placed between the Internet and an intranet. To minimize the risk of compromising the firewall itself it should generally have only one role, that of protecting the intranet. Although not completely risk free, the tasks of doing the routing and eventually IP masquerading (rewriting IP-headers of the packets it routes from clients with private IP-addresses onto the Internet so that they seem to come from the firewall itself) are commonly considered harmless.
This is often an old box you may have retired and nearly forgotten, performing masquerading or routing functions, but offering a bunch of services, e.g., web-cache, mail, etc. This may be very commonly used for home networks, but can definitely not to be considered as secure anymore because the combining of server and router on one machine raises the complexity of the setup.
This box performs masquerading or routing, but grants public access to some branch of your network which, because of public IP's and a physically separated structure, is neither considered to be part of the inter- nor intranet. These servers are those which must be easily accessible from both the inter- and intranet. The firewall protects them all.
Doing routing or masquerading, but permitting only selected services to be accessible, sometimes only by selected internal users or boxes; mostly used in highly secure business contexts, sometimes by distrusting employers. This was the common configuration of a firewall at the time of the Linux 2.2 kernel. It's still possible to configure a firewall this way, but it makes the rules quite complex and lengthy.
This document is meant as an introduction to how to setup a firewall - it is not a complete guide to securing systems. Firewalling is a complex issue that requires careful configuration. The scripts quoted here are simply intended to give examples as to how a firewall works, they are not intended to fit into any imaginable configuration and may not prevent any imaginable attack.
The purpose of this text is simply to give you a hint on how to get started with a firewall.
Customization of these scripts for your specific situation will be necessary for an optimal configuration, but you should make a serious study of the iptables documentation and creating firewalls in general before hacking away. Have a look at the list of Links for further reading at the end of this section for more details. Here you will find a list of URLs that contain quite comprehensive information about building your own firewall.
If you want your Linux-Box to have a firewall, you must first ensure that your kernel has been compiled with the relevant options turned on .
How to configure your kernel, with enabling the options to be either compiled into the kernel or as modules, depends on your personal preferences and experience. Note, that for the quoted scripts it is assumed that the modules need to be loaded at first.
Network options menu Network packet filtering: Y Unix domain sockets: Y or M TCP/IP networking: Y IP: advanced router: Y IP: verbose route monitoring: Y IP: TCP Explicit Congestion Notification support: Y IP: TCP syncookie support: Y IP: Netfilter Configuration menu Every option except: Y or M ipchains (2.2-style) support N ipfwadm (2.0-style) support N Fast switching: N |
A Personal Firewall is supposed to let you access the all services offered on the Internet, but keep your box secure and your data private.
Below is a slightly modified version of Rusty Russell's recommendation from the Linux 2.4 Packet Filtering HOWTO:
cat > /etc/rc.d/init.d/firewall << "EOF" #!/bin/sh # Begin $rc_base/init.d/firewall # Insert connection-tracking modules (not needed if built into the kernel). modprobe ip_tables modprobe iptable_filter modprobe ip_conntrack modprobe ip_conntrack_ftp modprobe ipt_state modprobe ipt_LOG # allow local-only connections iptables -A INPUT -i lo -j ACCEPT # free output on any interface to any ip for any service (equal to -P ACCEPT) iptables -A OUTPUT -j ACCEPT # permit answers on already established connections # and permit new connections related to established ones (eg active-ftp) iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Log everything else: What's Windows' latest exploitable vulnerability? iptables -A INPUT -j LOG --log-prefix "FIREWALL:INPUT " # set a sane policy: everything not accepted > /dev/null iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT DROP # be verbose on dynamic ip-addresses (not needed in case of static IP) echo 2 > /proc/sys/net/ipv4/ip_dynaddr # disable ExplicitCongestionNotification - too many routers are still ignorant echo 0 > /proc/sys/net/ipv4/tcp_ecn # End $rc_base/init.d/firewall EOF |
His script is quite simple, it drops all traffic coming in into your computer that wasn't initiated from your box, but as long as you are simply surfing the Internet you are unlikely to exceed its limits.
If you frequently encounter certain delays at accessing ftp-servers, please have a look at BusyBox - example no. 4.
Even if you have daemons / services running on your box, these should be inaccessible everywhere but from your box itself. If you want to allow access to services on your machine, such as ssh or pinging, take a look at BusyBox.
A true Firewall has two interfaces, one connected to an intranet, in this example, eth0, and one connected to the Internet, here, ppp0. To provide the maximum security against the box itself being broken into, make sure that there are no servers running on it, especially not X11 et al. And, as a general principle, the box itself should not access any untrusted service (Think of a name server giving answers that make your bind crash, or, even worse, that implement a worm via a buffer-overflow).
cat > /etc/rc.d/init.d/firewall << "EOF" #!/bin/sh # Begin $rc_base/init.d/firewall echo echo "You're using the example-config for a setup of a firewall" echo "from the firewalling-hint written for LinuxFromScratch." echo "This example is far from being complete, it is only meant" echo "to be a reference." echo "Firewall security is a complex issue, that exceeds the scope" echo "of the quoted configuration rules." echo "You can find some quite comprehensive information" echo "about firewalls in Chapter 4 of the BLFS book." echo "http://www.linuxfromscratch.org/blfs" echo # Insert iptables modules (not needed if built into the kernel). modprobe ip_tables modprobe iptable_filter modprobe ip_conntrack modprobe ip_conntrack_ftp modprobe ipt_state modprobe iptable_nat modprobe ip_nat_ftp modprobe ipt_MASQUERADE modprobe ipt_LOG modprobe ipt_REJECT # allow local-only connections iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT # allow forwarding iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -m state --state NEW -i ! ppp+ -j ACCEPT # do masquerading (not needed if intranet is not using private ip-addresses) iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE # Log everything for debugging (last of all rules, but before DROP/REJECT) iptables -A INPUT -j LOG --log-prefix "FIREWALL:INPUT " iptables -A FORWARD -j LOG --log-prefix "FIREWALL:FORWARD" iptables -A OUTPUT -j LOG --log-prefix "FIREWALL:OUTPUT " # set a sane policy iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT DROP # be verbose on dynamic ip-addresses (not needed in case of static IP) echo 2 > /proc/sys/net/ipv4/ip_dynaddr # disable ExplicitCongestionNotification echo 0 > /proc/sys/net/ipv4/tcp_ecn # activate TCPsyncookies echo 1 > /proc/sys/net/ipv4/tcp_syncookies # activate Route-Verification = IP-Spoofing_protection for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f done # activate IP-Forwarding echo 1 > /proc/sys/net/ipv4/ip_forward EOF |
With this script your intranet should be sufficiently secure against external attacks: no one should be able to setup a new connection to any internal service and, if it's masqueraded, it s even invisible; furthermore, your firewall should be nearly immune because there are no services running that a cracker could attack.
Note: if the interface you're connecting to the Internet doesn't connect via ppp, you will need to change ppp+ to the name of the interface which you are using. If you are using the same interface type to connect to both your intranet and the Internet, you need to use the actual name of the interface such as eth0, on both interfaces.
If you need stronger security (e.g., against DOS, connection highjacking, spoofing, etc.) have a look at the list of Links for further reading at the end of this section.
This scenario isn't too different from (Masquerading Router), but in this case you want to offer some services to your intranet. Examples of this can be when you want to admin your box from another host on your intranet or use it as a proxy or a name server. Note: Outlining a true concept of how to protect a server that offers services on the Internet goes far beyond the scope of this document, see Disclaimer.
Be cautious. Every service you offer and have enabled makes your setup more complex and your box less secure: You induce the risks of misconfigured services or running a service with an exploitable bug, both risks that a firewall principally should be immune of. See the introduction to Masquerading Router for some more details.
If the services you'd like to offer do not need to access the Internet themselves, like internal-only samba- or name-servers, it's quite simple and should still be acceptable from a security standpoint. Just add the following lines before the logging-rules into the script.
iptables -A INPUT -i ! ppp+ -j ACCEPT iptables -A OUTPUT -o ! ppp+ -j ACCEPT |
If your daemons have to access the web themselves, like squid would need to, you could open OUTPUT generally and restrict INPUT.
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -j ACCEPT |
However, it is generally not advisable to leave OUTPUT unrestricted: you lose any control on trojans who'd like to "call home", and a bit of redundancy in case you've (mis-)configured a service so that it does broadcast its existence to the world.
If you prefer to have this protection, you may restrict INPUT and OUTPUT on all ports except those that it's absolutely necessary to have open. Which ports you have to open depends on your needs: mostly you will find them by looking for failed accesses in your log-files.
Have a look at the following examples:
Squid is caching the web:
iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT |
Your caching name server (e.g., dnscache) does its lookups via udp:
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT iptables -A INPUT -p udp --sport 53 -m state --state ESTABLISHED -j ACCEPT |
Alternatively, if you want to be able to ping your box to ensure it's still alive:
iptables -A INPUT -p icmp -m icmp --icmp-type echo-request -j ACCEPT iptables -A OUTPUT -p icmp -m icmp --icmp-type echo-reply -j ACCEPT |
If you are frequently accessing ftp-servers or enjoy chatting you might notice certain delays because some implementations of these daemons have the feature of querying an identd on your box for your username for logging. Although there's really no harm in this, having an identd running is not recommended because some implementations are known to be vulnerable.
To avoid these delays you could reject the requests with a 'tcp-reset':
iptables -A INPUT -p tcp --dport 113 -j REJECT --reject-with tcp-reset iptables -A OUTPUT -p tcp --sport 113 -m state --state RELATED -j ACCEPT |
To log and drop invalid packets, mostly harmless packets that came in after netfilter's timeout, sometimes scans:
iptables -I INPUT 1 -p tcp -m state --state INVALID -j LOG --log-prefix \ "FIREWALL:INVALID" iptables -I INPUT 2 -p tcp -m state --state INVALID -j DROP |
Anything coming from the outside should not have a private address, this is a common attack called IP-spoofing:
iptables -t nat -A PREROUTING -i ppp+ -s 10.0.0.0/8 -j DROP iptables -t nat -A PREROUTING -i ppp+ -s 172.16.0.0/12 -j DROP iptables -t nat -A PREROUTING -i ppp+ -s 192.168.0.0/16 -j DROP |
To simplify debugging and be fair to anyone who'd like to access a service you have disabled, purposely or by mistake, you should REJECT those packets that are dropped.
Obviously this must be done directly after logging as the very last lines before the packets are dropped by policy:
iptables -A INPUT -j REJECT iptables -A OUTPUT -p icmp --icmp-type 3 -j ACCEPT |
These are only examples to show you some of the capabilities of the new firewall code in Linux-Kernel 2.4. Have a look at the man page of iptables. There you will find more of them. The port-numbers you'll need for this can be found in /etc/services, in case you didn't find them by trial and error in your log file.
If you add any of your offered or accessed services such as the above, maybe even in FORWARD and for intranet-communication, and delete the general clauses, you get an old fashioned packet filter.
Finally, I'd like to remind you of one fact we must not forget: The effort spent attacking a system corresponds to the value the cracker expects to gain from it. If you are responsible for such valuable assets that you expect great effort to be made by potential crackers, you hopefully won't be in the need of this hint!
www.netfilter.org - Homepage of the netfilter/iptables project
Netfilter related FAQ
Netfilter related HOWTO's
www.linuxdoc.org/LDP/nag2/x-087-2-firewall.html
www.linuxdoc.org/HOWTO/Security-HOWTO.html
www.linuxdoc.org/HOWTO/Firewall-HOWTO.html
www.ibm.com/developerworks/security/library/s-fire.html
www.ibm.com/developerworks/security/library/s-fire2.html
www.interhack.net/pubs/fw-faq/
csrc.nist.gov/isptg/html/ISPTG-6.html
www.linuxsecurity.com/docs/
www.little-idiot.de/firewall (German & outdated, but very comprehensive)
www.linuxgazette.com/issue65/stumpel.html
linux.oreillynet.com/pub/a/linux/2000/03/10/netadmin/ddos.html
staff.washington.edu/dittrich/misc/ddos
ipmasq.cjb.net/
www.e-infomax.com/ipmasq
www.circlemud.org/~jelson/writings/security/index.htm
www.securityfocus.com
www.cert.org - tech_tips
www.uni-siegen.de/security/pointers.html
security.ittoolbox.com
www.linux-firewall-tools.com/linux/
logi.cc/linux/athome-firewall.php3
www.insecure.org/reading.html
www.robertgraham.com/pubs/firewall-seen.html
If you'd like to have a look at the chains your firewall consists of and the order in which the rules take effect:
cat > /etc/rc.d/init.d/firewall.status << "EOF" #!/bin/sh # Begin $rc_base/init.d/firewall.status echo "iptables.mangling:" iptables -t mangle -v -L -n --line-numbers echo echo "iptables.nat:" iptables -t nat -v -L -n --line-numbers echo echo "iptables.filter:" iptables -v -L -n --line-numbers EOF |
If you need to turn the firewall off, this script will do it:
cat > /etc/rc.d/init.d/firewall.stop << "EOF" #!/bin/sh # Being $rc_base/init.d/firewall.stop # deactivate IP-Forwarding echo 0 > /proc/sys/net/ipv4/ip_forward iptables -Z iptables -F iptables -t nat -F PREROUTING iptables -t nat -F OUTPUT iptables -t nat -F POSTROUTING iptables -t mangle -F PREROUTING iptables -t mangle -F OUTPUT iptables -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT EOF |
The GnuPG package contains a public/private key encryptor. This is becoming useful for signing files or emails as proof of identity and preventing tampering with contents of the file or email.
Download (HTTP): http://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.2.3.tar.bz2
Download (FTP): ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.2.3.tar.bz2
Download size: 2.2 MB
Estimated Disk space required: 26.1 MB
Estimated build time: 0.32 SBU
Install GnuPG by running the following commands:
./configure --prefix=/usr --libexecdir=/usr/lib && make && make install && chmod 4755 /usr/bin/gpg |
The Tripwire package contains the programs used by Tripwire to verify the integrity of the files on a given system.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/tripwire/tripwire-2.3.1-2.tar.gz
Download (FTP): ftp://ftp.fu-berlin.de/unix/security/tripwire/tripwire-2.3.1-2.tar.gz
Download size: 1.4 MB
Estimated Disk space required: 63 MB
Estimated build time: 2.35 SBU
Required patch to fix multiple build issues (see patch for more information): http://www.linuxfromscratch.org/patches/blfs/5.0/tripwire-2.3.1-2-gcc3-build-fixes.patch
Compile Tripwire by running the following commands:
patch -Np1 -i ../tripwire-2.3.1-2-gcc3-build-fixes.patch && cd src && make release && cd .. && cp install/install.{sh,cfg} . |
Install Tripwire by running the following commands:
./install.sh && cp /etc/tripwire/tw.cfg /usr/sbin && cp policy/*.txt /usr/share/doc/tripwire |
make release: This command creates the Tripwire binaries.
cp install.{sh,cfg} .: These are copied to the main Tripwire directory so that the script can be used to install the package.
cp policy/*.txt /usr/share/doc/tripwire: This command installs the documentation.
Tripwire uses a policy file to determine which files integrity are checked. The default policy file (twpol.txt found in /etc/tripwire/) is for a default installation of Redhat 7.0 and is woefully outdated.
Policy files are also a custom thing and should be tailored to each individual distribution and/or installation. Some custom policy files can be found below:
http://home.iprimus.com.au/glombowski/blfs/twpol-all.txt Checks integrity of all files http://home.iprimus.com.au/glombowski/blfs/twpol-lfs.txt Custom policy file for Base LFS 3.0 system http://home.iprimus.com.au/glombowski/blfs/twpol-suse7.2.txt Custom policy file for SuSE 7.2 system |
Download the custom policy file you'd like to try, copy it into /etc/tripwire/, and use it instead of twpol.txt. It is, however, recommended that you make your own policy file. Get ideas from the examples above and read /usr/share/doc/tripwire/policyguide.txt. twpol.txt is a good policy file for beginners as it will note any changes to the file system and can even be used as an annoying way of keeping track of changes for uninstallation of software.
After your policy file has been transferred to /etc/tripwire/ you may begin the configuration steps:
twadmin -m P /etc/tripwire/twpol.txt && tripwire -m i |
During configuration Tripwire will create two (2) keys: a site key and a local key which will be stored in /etc/tripwire/ .
To use Tripwire after this and run a report, use the following command:
tripwire -m c > /etc/tripwire/report.txt |
View the output to check the integrity of your files. An automatic integrity report can be produced by using a cron facility to schedule the runs.
Please note that after you run an integrity check, you must check the report or email and then modify the Tripwire database of the files on your system so that Tripwire will not continually notify you that files you intentionally changed are a security violation. To do this you must first ls /var/lib/tripwire/report/ and note the name of the newest file which starts with linux- and ends in .twr. This encrypted file was created during the last report creation and is needed to update the Tripwire database of your system. Then, type in the following command making the appropriate substitutions for '?':
tripwire -m u -r /var/lib/tripwire/report/linux-???????-??????.twr |
You will be placed into vim with a copy of the report in front of you. If all the changes were good, then just type :x and after entering your local key, the database will be updated. If there are files which you still want to be warned about, please remove the x before the filename in the report and type :x.
Journaling file systems reduce the time needed to recover a file system that was not unmounted properly. While this can be extremely important in reducing downtime for servers, it has also become popular for desktop environments. This chapter contains a variety of journaling file systems.
Ext3 is a journaling file system that is an extension to the ext2 file system. It is backward compatible with ext2 and the conversion from ext2 to ext3 is trivial.
You don't need to install anything to use ext3, all the required packages are available with a bare LFS system.
When building the kernel, ensure that you have compiled in ext3 support. If you want your root partition to be ext3, then compile the ext3 support in the kernel, else you may compile it as a module. Recompile the kernel if needed.
Edit your /etc/fstab. For each partition that you want to convert into ext3, edit the entry so that it looks similar to the following line.
/dev/hdXX /mnt_point ext3 defaults 1 0 |
In the above line, replace /dev/hdXX by the partition (e.g. /dev/hda2), /mnt_point by the mount point (e.g. /home). The 0 in the last field ensures that the partition will not be checked for consistency during the boot process by the checkfs script. You may replace the ext3 fs type in the above by auto if you want to ensure that the partition is mounted if you accidentally skip enabling the ext3 support in the kernel.
For each partition that you have converted to ext3 in /etc/fstab, enable the journal for the partition by running the following command.
tune2fs -j /dev/hdXX |
Remount the concerned partitions, or simply reboot if you have recompiled the kernel to enable ext3 support.
More information is available at http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html
The ReiserFS package contains various utilities for use with the Reiser file system.
Download (HTTP): http://ftp.namesys.com/pub/reiserfsprogs/reiserfsprogs-3.6.11.tar.gz
Download (FTP): ftp://ftp.namesys.com/pub/reiserfsprogs/reiserfsprogs-3.6.11.tar.gz
Download size: 368 KB
Estimated Disk space required: 9.3 MB
Estimated build time: 0.16 SBU
Install ReiserFS by running the following commands:
./configure --prefix=/usr --sbindir=/sbin && make && make install && ln -sf reiserfsck /sbin/fsck.reiserfs && ln -sf mkreiserfs /sbin/mkfs.reiserfs |
--prefix=/usr: This ensures that the manual pages are installed in the correct location while still installing the programs in /sbin as they should be.
--sbindir=/sbin: This ensures that the ReiserFS utilities are installed in /sbin as they should be.
debugreiserfs can sometimes help to solve problems with ReiserFS file systems. If it is called without options it prints the super block of any reiserfs file system found on the device.
The XFS kernel patch must be applied to use XFS file systems.
Download (FTP): ftp://oss.sgi.com/projects/xfs/download/patches/2.4.22/xfs-2.4.22-all-i386.bz2
Download size: 860 KB
Estimated Disk space required:
Build an XFS enabled Linux 2.4.22 kernel with the following commands:
cd /usr/src/linux && make mrproper && bzcat ../xfs-2.4.22-all-i386.bz2 | patch -Np1 && make menuconfig && make CC=/opt/gcc-2.95.3/bin/gcc dep && make CC=/opt/gcc-2.95.3/bin/gcc bzImage && make CC=/opt/gcc-2.95.3/bin/gcc modules && make CC=/opt/gcc-2.95.3/bin/gcc modules_install && cp arch/i386/boot/bzImage /boot/vmlinuz-xfs && cp System.map /boot/System.map-xfs |
The XFS package contains administration and debugging tools for the XFS file system.
Download (HTTP): http://gd.tuwien.ac.at/opsys/linux/slackware/slackware-current/source/a/xfsprogs/xfsprogs-2.5.6.src.tar.gz
Download (FTP): ftp://oss.sgi.com/projects/xfs/download/Release-1.3/cmd_tars/xfsprogs-2.5.6.src.tar.gz
Download size: 816 KB
Estimated Disk space required: 42 MB
Estimated build time: 0.67 SBU
Install XFS by running the following commands:
./configure && make && make install |
XFS contains xfs_growfs, xfs_admin, xfs_freeze, xfs_mkfile, xfs_check, xfs_bmap, xfs_rtcp, xfs_repair, xfs_db, xfs_logprint, xfs_ncheck, mkfs.xfs and fsck.xfs.
This chapter is referenced in the LFS book for those wishing to use other editors on their LFS system. We also have the opportunity to show how some LFS installed programs benefit from being recompiled after GUI libraries have been installed.
The Vim package, which is an abbreviation for VI IMproved, contains a vi clone with extra features as compared to the original vi.
The default LFS instructions install vim as a part of the base system, but owing to the lack of X libraries during the base install, Vim needs to be recompiled once X is installed to enable the GUI mode. There is no need for special instructions since X support is automatically detected.
Download (HTTP): http://ftp.at.vim.org/pub/vim/unix/vim-6.2.tar.bz2
Download (FTP): ftp://ftp.vim.org/pub/vim/unix/vim-6.2.tar.bz2
Download size: 3.2 MB
Estimated Disk space required: 46 MB
Estimated build time: 0.59 SBU
Install Vim by running the following commands:
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h && echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h && ./configure --prefix=/usr \ --with-features=huge && make && make install |
--with-features=huge: This switch enables all the additional features available in Vim.
The Vim package contains eview, evim, ex, gview, gvim, gvimdiff, rgview, rgvim, rview, rvim, view, vim, vimdiff, vimtutor and xxd. Except for vimtutor and xxd, all the other commands are symlinks to vim and start vim with different options. vimtutor is a tool to learn the various vim commands and xxd is a command used to create hex dumps.
The Emacs package contains the extensible, customizable, self-documenting real-time display editor.
Download (HTTP): http://ftp.gnu.org/pub/gnu/emacs/emacs-21.3.tar.gz
Download (FTP): ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.3.tar.gz
Download size: 20 MB
Estimated Disk space required: 92.5 MB
Estimated build time: 4.20 SBU
XFree86-4.3.0.1, libjpeg-6b, libpng-1.2.5, libtiff-3.5.7 and libungif-4.1.0b1
Install Emacs by running the following commands:
./configure --prefix=/usr \ --libexecdir=/usr/sbin && make bootstrap && make install |
The Emacs package contains emacs, b2m, ctags, ebrowse, emacsclient, etags, grep-changelog, rcs-checkin, cvt-mail, digest-doc, emacsserver, fakemail, hexl, movemail, profile, rcs2log, sorted-doc, vcdiff and yow.
The nano package contains a small, simple text editor which aims to replace Pico, the default editor in the Pine package.
Download (HTTP): http://www.nano-editor.org/dist/v1.2/nano-1.2.2.tar.gz
Download (FTP): ftp://ftp.uni-koeln.de/editor/nano-1.2.2.tar.gz
Download size: 876 KB
Estimated Disk space required: 4.4 MB
Estimated build time: 0.04 SBU
Install nano by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc \ --enable-color --enable-multibuffer --enable-nanorc && make && make install && mkdir -p /usr/share/doc/nano/examples && cp nanorc.sample /usr/share/doc/nano/examples |
/etc/nanorc, ~/.nanorc
Example Configuration
set autoindent set const set fill 72 set historylog set multibuffer set nohelp set regexp set smooth set suspend |
Another example is in the /usr/share/doc/nano/examples directory in the nanorc.sample file. It includes color configurations and has some documentation included in the comments.
JOE (Joe's own editor) is a small text editor capable of emulating WordStar, Pico, and Emacs.
Download (HTTP): http://unc.dl.sourceforge.net/sourceforge/joe-editor/joe-2.9.8.tar.gz
Download (FTP): ftp://ftp.uni-koeln.de/editor/joe-2.9.8.tar.gz
Download size: 284 KB
Estimated Disk space required: 4.3 MB
Estimated build time: 0.11 SBU
Install JOE by running the following commands:
./configure --sysconfdir=/etc --prefix=/usr && make && make install |
JOE can make use of several configuration files. Information about these files may be found in the joe man page. These files are /etc/jmacsrc, /etc/joerc, /etc/jpicorc, /etc/jstarrc, and /etc/rjoerc. JOE can also make use of ~/.joerc, which may be copied from /etc/joerc and customized for each user's taste.
We are all familiar with the Bourne Again SHell, but there are two other user interfaces that are considered useful modern shells -- the Berkeley Unix C shell and the Korn shell. This chapter installs packages compatible with these additional shell types.
ash is a shell that is the most compliant with the Bourne Shell (not to be confused with Bourne Again SHell i.e. Bash installed in LFS) without any additional features. Bourne Shell is available on most commercial UNIX systems. Hence ash is useful for testing scripts to be sh-compliant. It also has a small memory and space requirements compared to the other sh-compliant shells.
Download (FTP): ftp://distro.ibiblio.org/pub/Linux/distributions/slackware/slackware_source/ap/ash/
Download size: 119 KB
Estimated Disk space required: 700 KB
Estimated build time:
The Tcsh package contains "an enhanced but completely compatible version of the Berkeley Unix C shell (csh)". This is useful as an alternative shell for those who prefer C syntax to that of the bash shell, and also because some programs require the C shell in order to install.
Download (HTTP): http://gd.tuwien.ac.at/utils/shells/tcsh/tcsh-6.12.00.tar.gz
Download (FTP): ftp://ftp.funet.fi/pub/unix/shells/tcsh/tcsh-6.12.00.tar.gz
Download size: 804 KB
Estimated Disk space required: 9.0 MB
Estimated build time: 0.16 SBU
Install Tcsh by running the following commands:
./configure --prefix=/usr && make && make install && cp tcsh.man /usr/share/man/man1/tcsh.1 && ln -s /usr/bin/tcsh /bin/csh |
cp tcsh.man /usr/share/man/man1/tcsh.1: Tcsh doesn't install its man page correctly, so we do it manually.
ln -s /usr/bin/tcsh /bin/csh: The FHS states that if there is a C shell installed, there should be a symlink from /bin/csh to it. This creates that symlink.
The ZSH package contains a command interpreter (shell) usable as an interactive login shell and as a shell script command processor. Of the standard shells, ZSH most closely resembles KSH but includes many enhancements.
Download (HTTP): http://www.zsh.org/pub/zsh-4.1.1.tar.bz2
Download (FTP): ftp://ftp.zsh.org/zsh/zsh-4.1.1.tar.bz2
Download size: 1.9 MB
Estimated Disk space required: 16 MB
Estimated build time: 0.55 SBU
Install ZSH by running the following commands:
./configure --prefix=/usr && make && make install |
Libraries contain code which is often required by more than one program. This has the advantage that each program doesn't need to duplicate code (and risk introducing bugs), it just has to call functions from the libraries installed on the system. The most obvious example of a set of libraries is glibc which is installed during the LFS book. This contains all of the C library functions which programs use.
There are two types of library, static and shared. Shared libraries (usually libXXX.so) are loaded into memory from the shared copy at runtime (hence the name). Static libraries (libXXX.a ) are actually linked into the program executable file itself, thus making the program file larger. Quite often, you will find both static and shared copies of the same library on your system.
Generally, you only need to install libraries when you are installing software which requires functionality which they supply. In the BLFS book, each package is listed with a list of (known) dependencies. Thus, you can figure out which libraries you need to have before installing that program. If you are installing something without using BLFS instructions, usually the README or INSTALL file will contain details of the programs requirements.
There are certain libraries which nearly everyone will need at some point. In this chapter we list these and some others and explain why you may want to install them.
The OpenSSL package contains management tools and libraries relating to cryptography. These are useful for providing cryptography functions to other packages, notably OpenSSH and web browsers (for accessing secure https sites).
Download (HTTP): http://www.openssl.org/source/openssl-0.9.7c.tar.gz
Download (FTP): ftp://ftp.openssl.org/source/openssl-0.9.7c.tar.gz
Download size: 2.7 MB
Estimated Disk space required: 25.8 MB
Estimated build time: 3.35 SBU
Man page patch (HTTP): http://www.linuxfromscratch.org/patches/blfs/5.0/openssl-0.9.7c-manpages.patch
Install OpenSSL by running the following commands:
patch -Np1 -i ../openssl-0.9.7c-manpages.patch sed 's/^passwd/openssl-passwd/' doc/apps/passwd.pod \ > doc/apps/openssl-passwd.pod && rm doc/apps/passwd.pod && ./config --openssldir=/etc/ssl --prefix=/usr shared && make MANDIR=/usr/share/man && make MANDIR=/usr/share/man install && rmdir /etc/ssl/lib && chmod 755 /usr/lib/pkgconfig |
no-rc5 no-idea: When added to the ./config command, this will eliminate the building of those encryption methods. Patent licenses may be needed for you to utilize either of those methods in your projects.
rm doc/apps/passwd.pod : This command prevents OpenSSL from installing its passwd man page over an existing man page with the same name.
make MANDIR=/usr/share/man make MANDIR=/usr/share/man install |
rmdir /etc/ssl/lib: This is simply a tidy-up command. For some reason, the openssl install routine creates the /etc/ssl/lib directory even though the libraries have been installed in /usr/lib. We remove it to keep things nice and tidy!
chmod 755 /usr/lib/pkgconfig: The installation process modifies the rights on this directory to mode 644. This command restores the permissions to the setting prior to installation (mode 755).
Most people who just want to use openssl for providing functions to other programs such as OpenSSH and web browsers won't need to worry about configuring OpenSSL. Configuring OpenSSL is an advanced topic and so those who do would normally be expected to either know how to do it or to be able to find out how to do it.
c_rehash is a Perl script that scans all files in a directory and adds symbolic links to their hash values.
The openssl program is a command-line tool for using the various cryptography functions of OpenSSL's crypto library from the shell. It can be used for various functions which are documented in man 1 openssl.
The OpenSSL crypto library implements a wide range of cryptographic algorithms used in various Internet standards. The services provided by this library are used by the OpenSSL implementations of SSL, TLS and S/MIME, and they have also been used to implement OpenSSH, OpenPGP , and other cryptographic standards.
The pcre package contains Perl compatible regular expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.
Download (HTTP): http://keihanna.dl.sourceforge.net/sourceforge/pcre/pcre-4.3.tar.bz2
Download (FTP): ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-4.3.tar.bz2
Download size: 336 KB
Estimated Disk space required: 2.8 MB
Estimated build time: 0.19 SBU
The popt package contains the popt libraries which are used by some programs to parse command-line options.
Download (HTTP): http://gd.tuwien.ac.at/utils/rpm.org/dist/rpm-4.1.x/popt-1.7.tar.gz
Download (FTP): ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/popt-1.7.tar.gz
Download size: 200 KB
Estimated Disk space required: 4 MB
Estimated build time: 0.06 SBU
The slang package contains the slang library, which is used to create robust, multi-platform software.
Download (HTTP): http://gd.tuwien.ac.at/editors/davis/slang/v1.4/slang-1.4.9.tar.bz2
Download (FTP): ftp://space.mit.edu/pub/davis/slang/v1.4/slang-1.4.9.tar.bz2
Download size: 624 KB
Estimated Disk space required: 9.6 MB
Estimated build time: 0.16 SBU
Install slang by running the following commands:
./configure --prefix=/usr && make && make install && make elf && make install-elf && make install-links && chmod 755 /usr/lib/libslang.so.1.4.9 |
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The FAM package contains a File Alteration Monitor which is useful for notifying applications of changes to the file system.
Download (HTTP): http://oss.sgi.com/projects/fam/download/fam-2.6.10.tar.gz
Download (FTP): ftp://oss.sgi.com/projects/fam/download/fam-2.6.10.tar.gz
Download size: 320 KB
Estimated Disk space required: 6.9 MB
Estimated build time: 0.68 SBU
Dnotify patch (HTTP): http://www.linuxfromscratch.org/patches/blfs/5.0/fam-2.6.10-dnotify.patch
Install FAM by running the following commands:
Note: You will get warnings about make install being unable to merge entries in /etc/rpc. These can be ignored, along with any IMON or inetd.conf warnings, as we will be configuring these files after installation.
patch -Np1 -i ../fam-2.6.10-dnotify.patch && libtoolize --force && aclocal && automake --add-missing && autoconf && ./configure --prefix=/usr --sysconfdir=/etc && make && make install |
patch -Np1 -i ../fam-dnotify.patch: This patch causes FAM to use the Linux kernel dnotify mechanism to inform the calling process of file modifications, rather than polling the file system for modifications.
libtoolize --force aclocal automake --add-missing autoconf |
Configuring the file alteration monitor.
If you use inetd, add the FAM entry to /etc/inetd.conf with the following command:
echo "sgi_fam/1-2 stream rpc/tcp wait root /usr/bin/fam fam" >> /etc/inetd.conf |
If you use xinetd, add an entry to /etc/xinetd.conf with the following command (be sure the "nogroup" group exists):
cat >> /etc/xinetd.conf << "EOF" # description: FAM - file alteration monitor service sgi_fam { type = RPC UNLISTED socket_type = stream user = root group = nogroup server = /usr/bin/fam wait = yes protocol = tcp rpc_version = 2 rpc_number = 391002 } EOF |
The libxml package contains the libxml libraries. These are useful for parsing XML files.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libxml/1.8/libxml-1.8.17.tar.bz2
Download (FTP): ftp://ftp.xmlsoft.org/old/libxml-1.8.17.tar.gz
Download size: 973 KB
Estimated Disk space required: 11 MB
Estimated build time: 0.41 SBU
The libxml2 package contains XML libraries. These are useful for parsing XML files.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.5/libxml2-2.5.11.tar.bz2
Download (FTP): ftp://ftp.xmlsoft.org/libxml2-2.5.11.tar.gz
Download size: 2.9 MB
Estimated Disk space required: 41.8 MB
Estimated build time: 0.97 SBU
Install libxml2 by running the following commands:
./configure --prefix=/usr && make && make install |
The libxslt package contains XSLT libraries. These are useful for extending libxml2 libraries to support XSLT files.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libxslt/1.0/libxslt-1.0.33.tar.bz2
Download (FTP): ftp://ftp.xmlsoft.org/libxslt-1.0.33.tar.gz
Download size: 2.3 M
Estimated Disk space required: 30 MB
Estimated build time: 0.29 SBU
The readline library provides a set of functions for use by applications that allow users to edit command-lines as they are typed in. Both Emacs and vi editing modes are available.
Download (HTTP): http://ftp.gnu.org/gnu/readline/readline-4.3.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/readline/readline-4.3.tar.gz
Download size: 944 KB
Estimated Disk space required: 9.2 MB
Estimated build time: 0.10 SBU
Install readline by running the following commands:
./configure --prefix=/usr && make SHLIB_LIBS=-lcurses && make install |
make SHLIB_LIBS=-lcurses: These command makes the proper symbols available for applications that assume readline is compiled linked to ncurses.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The GMP package contains an math library. This has useful functions for arbitrary precision arithmetic.
Download (HTTP): http://www.ibiblio.org/pub/gnu/gmp/gmp-4.1.2.tar.bz2
Download (FTP): ftp://ftp.gnu.org/gnu/gmp/gmp-4.1.2.tar.bz2
Download size: 1.6 MB
Estimated Disk space required: 29.0 MB
Estimated build time: 0.86 SBU
Install GMP by running the following commands:
./configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man && make && make install |
The GDBM package contains the GNU Database Manager. This is useful for database routines that use extendible hashing.
Download (HTTP): http://www.ibiblio.org/pub/gnu/gdbm/gdbm-1.8.3.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.8.3.tar.gz
Download size: 228 KB
Estimated Disk space required: 4.1 MB
Estimated build time: 0.08 SBU
Install GDBM by running the following commands:
./configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man && make && make BINOWN=root BINGRP=root install |
In addition, you may need to install the compatibility headers for gdbm. Apache 1.3, for example, will need these headers. Install the compatibility headers by running the following command:
make BINOWN=root BINGRP=root install-compat |
The glib package contains a low-level core library. This is useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
Download (HTTP): http://gd.tuwien.ac.at/graphics/gimp/gtk/v1.2/glib-1.2.10.tar.gz
Download (FTP): ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz
Download size: 412 KB
Estimated Disk space required: 7 MB
Estimated build time: 0.26 SBU
The glib package contains a low-level core library. This is useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
Download (HTTP): http://gd.tuwien.ac.at/graphics/gimp/gtk/v2.2/glib-2.2.3.tar.bz2
Download (FTP): ftp://ftp.gtk.org/pub/gtk/v2.2/glib-2.2.3.tar.bz2
Download size: 1.6 MB
Estimated Disk space required: 23.3 MB
Estimated build time: 0.49 SBU
Install glib by running the following commands:
./configure --prefix=/usr && make && make install |
The expat package contains a stream oriented C library for parsing XML.
Download (HTTP): http://umn.dl.sourceforge.net/sourceforge/expat/expat-1.95.6.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/xml/expat-1.95.6.tar.gz
Download size: 292 KB
Estimated Disk space required: 3.2 MB
Estimated build time: 0.25 SBU
The libesmtp package contains the libesmtp libraries which are used by some programs to manage email submission to a mail transport layer.
Download (HTTP): http://www.stafford.uklinux.net/libesmtp/libesmtp-1.0.tar.bz2
Download size: 232 KB
Estimated Disk space required: 5.0 MB
Estimated build time: 0.15 SBU
The aspell package contains the aspell library, used to interface to spell checking libraries.
Download (HTTP): http://gd.tuwien.ac.at/gnu/gnusrc/aspell/aspell-0.50.3.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/aspell/aspell-0.50.3.tar.gz
Download size: 917 KB
Estimated Disk space required: 9.4 MB
Estimated build time: 0.54 SBU
Required patch (HTTP): http://www.linuxfromscratch.org/patches/blfs/5.0/aspell-0.50.3-gcc33-1.patch
Install aspell by running the following commands:
patch -Np1 -i ../aspell-0.50.3-gcc33-1.patch && ./configure --prefix=/usr && make && make install |
After Aspell is installed at least one dictionary needs to be installed. You can find them at http://aspell.net/.
Install your dictionary or dictionaries by running the following commands:
./configure && make && make install |
The ispell package contains a spell checker that can handle international languages.
Download (HTTP): http://membled.com/work/patches/ispell/ispell-3.2.06.epa6.tar.bz2
Download size: 1.2 MB
Estimated Disk space required: 11 MB
Estimated build time: 0.03 SBU
The first step is to create local.h.
sed -e "s:/usr/local:/usr:g" local.h.linux > local.h |
By default, ispell only installs American English dictionary. To install other languages, check out the config.X file for the define to append to local.h.
Compile and install ispell using the following commands:
make && make install |
The Guile package contains the Project GNU's extension language library. Guile also contains a stand alone Scheme interpreter.
Download (HTTP): http://ftp.gnu.org/pub/gnu/guile/guile-1.6.4.tar.gz
Download (FTP): ftp://ftp.gnu.org/pub/gnu/guile/guile-1.6.4.tar.gz
Download size: 2.7 MB
Estimated Disk space required: 30 MB
Estimated build time: 0.79 SBU
Install Guile by running the following commands:
./configure --prefix=/usr && make && make install |
In addition to the libguile libraries, the Guile package contains guile, guile-config and guile-snarf.
guile-config is a Guile script which provides the information necessary to link your programs against the Guile library, in much the same way pkgconfig-0.15.0 does.
The slib package is a Scheme library used with Guile.
Download (HTTP): http://www.swiss.ai.mit.edu/ftpdir/scm/slib2d6.tar.gz
Download size: 636 KB
Estimated Disk space required: 2.9 MB
Estimated build time: 0.00 SBU
The G-Wrap package contains tools for exporting C libraries into Scheme interpreters.
Download (HTTP): http://www.gnucash.org/pub/g-wrap/source/g-wrap-1.3.4.tar.gz
Download size: 400 KB
Estimated Disk space required: 4.6 MB
Estimated build time: 0.09
LZO is a data compression library which is suitable for data decompression and compression in real-time. This means it favors speed over compression ratio.
Download (HTTP): http://www.oberhumer.com/opensource/lzo/download/lzo-1.08.tar.gz
Download (FTP): http://ftp.uni-koeln.de/util/arc/lzo-1.08.tar.gz
Download size: 421 KB
Estimated Disk space required: 5.4 MB
Estimated build time: 0.22 SBU
Depending on what your system will be used for, you may or may not require the graphics libraries. Most desktop machines will want them for use with graphical applications. Most servers on the other hand, will not require them.
The lcms library is used by other programs to provide color management facilities.
Download (HTTP): http://www.littlecms.com/lcms-1.11.tar.gz
Download (FTP): ftp://sunsite.ccu.edu.tw/pub12/sourceforge/l/lcms/lcms-1.11.tar.gz
Download size: 276 KB
Estimated Disk space required: 8.5 MB
Estimated build time: 0.19 SBU
Install lcms by running the following commands:
./configure --prefix=/usr && make && make install |
The lcms package contains the liblcms libraries, icc2ps, icclink, icctrans and optionally, tifficc, jpegicc, _lcms library and lcms.py.
The libjpeg package contains libraries that allow compression of image files based on the Joint Photographic Experts Group standard. It is a "lossy" compression algorithm.
Download (HTTP): http://www.ijg.org/files/jpegsrc.v6b.tar.gz
Download (FTP): ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
Download size: 599 KB
Estimated Disk space required: 3.7 MB
Estimated build time: 0.51 SBU
Install libjpeg by running the following commands:
./configure --enable-static --enable-shared --prefix=/usr && make && make install |
./configure --enable-static --enable-shared --prefix=/usr: This command tells libjpeg to build both shared and static libraries and to install them with a base of /usr.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The libjpeg package contains cjpeg, djpeg, jpegtran, rdjpgcom, wrjpgcom and libjpeg libraries.
cjpeg compresses image files to produce a JPEG/JFIF file on the standard output. Currently supported input file formats are: PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, and Targa.
The libpng package contains libraries used by other programs for reading and writing PNG files.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.5.tar.bz2
Download (FTP): ftp://ftp.iasi.roedu.net/pub/mirrors/ftp.gimp.org/gimp/libs/libpng-1.2.5.tar.bz2
Download size: 376 KB
Estimated Disk space required: 4.1 MB
Estimated build time: 0.16
Install libpng by running the following commands:
make prefix=/usr \ ZLIBINC=/usr/include ZLIBLIB=/usr/lib -f scripts/makefile.linux && make prefix=/usr install -f scripts/makefile.linux |
ZLIBINC=/usr/include ZLIBLIB=/usr/lib: This forces libpng to look for the zlib includes and libraries where we have them installed.
-f scripts/makefile.linux: This points make at the Linux version of the makefile as libpng doesn't use a autoconf routine instead coming with various makefiles for different platforms.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The libtiff package contains the tiff libraries and associated utilities. The libraries are used by many programs for reading and writing tiff files and the utilities are useful for general work with tiff files.
Download (HTTP): http://gd.tuwien.ac.at/hci/windowmaker/libs/tiff-v3.5.7.tar.gz
Download (FTP): ftp://ftp.remotesensing.org/pub/libtiff/tiff-v3.5.7.tar.gz
Download size: 928 KB
Estimated Disk space required: 5.9 MB
Estimated build time: 0.26 SBU
Install libtiff by running the following commands:
patch -Np1 -i ../tiff-3.6.0-tiffio.patch && ./configure --prefix=/usr --noninteractive \ --with-DIR_MAN=/usr/share/man && make && make install |
--noninteractive: This switch is used to avoid the configuration routine asking for confirmation of the directories to install to (which we pass using switches to configure anyways).
--with-DIR_MAN=/usr/share/man: This is used because despite the fact we pass --prefix=/usr, the configure routine tries to install the man pages in /usr/local/man instead of the correct place.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The libtiff package contains fax2ps, fax2tiff, gif2tiff, pal2rgb, ppm2tiff, ras2tiff, rgb2ycbcr, thumbnail, tiff2bw, tiff2ps, tiff2rgba, tiffcmp, tiffcp, tiffdither, tiffdump, tiffinfo, tiffmedian, tiffsplit and tiff libraries.
The libungif package contains libraries for reading all GIFs and writing non-compressed ones as well as programs for converting and working with GIF files. The libraries are useful for any graphics program wishing to deal with GIF files while the programs are useful for conversion purposes as well as cleaning up images.
The reason libungif only writes non-compressed GIFs is due to a legal issue with LZW compression (which Unisys claims a patent on). Reading GIFs is not a problem as the decompression routines do not seem to be limited in this way. Note that this has in the past been disputed. The best way to avoid this whole mess is to simply use libungif for looking at GIF images on the web, while in any pages which you design, use the open source PNG format instead (which uses, not surprisingly, the libpng library) which has no patent issues at all.
Download (HTTP): http://www.linuxpackages.net/packages/Slackware-8/robert/libungif-4.1.0b1/source/libungif-4.1.0b1.tar.gz
Download (FTP): ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/libungif-4.1.0b1.tar.gz
Download size: 343 KB
Estimated Disk space required: 3.1 MB
Estimated build time: 0.11 SBU
Install libungif by running the following commands:
./configure --prefix=/usr && make && make install |
The libungif package contains gif2epsn, gif2ps, gif2rgb, gifasm, gifbg, gifburst, gifclip, gifclrmp, gifcolor, gifcomb, gifcompose, giffiltr, giffix, gifflip, gifhisto, gifinfo, gifinter, gifinto, gifovly, gifpos, gifrotat, gifrsize, gifspnge, giftext, gifwedge, icon2gif, raw2gif, rgb2gif, text2gif and libungif libraries.
The libmng libraries are used by programs wanting to read and write Multiple-image Network Graphics (MNG ) files which are the animation equivalents to PNG files.
Download (HTTP): http://www.mirror.ac.uk/sites/download.sourceforge.net/pub/sourceforge/libmng/libmng-1.0.5.tar.gz
Download (FTP): ftp://unc.dl.sf.net/pub/sourceforge/libmng/libmng-1.0.5.tar.gz
Download size: 616 KB
Estimated Disk space required: 12.4 MB
Estimated build time: 0.31 SBU
Install libmng by running the following commands:
./configure --prefix=/usr --with-zlib \ --with-jpeg --with-lcms && make && make install && cp doc/man/*.3 /usr/share/man/man3 && cp doc/man/*.5 /usr/share/man/man5 |
./configure --prefix=/usr --with-zlib \ --with-jpeg --with-lcms |
cp doc/man/*.X /usr/share/man/manX: The install procedure doesn't properly install the man pages so we do it manually.
The Imlib package contains image libraries. These are useful for loading, rendering and dithering a wide variety of image data formats.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/imlib/1.9/imlib-1.9.14.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/imlib/1.9/imlib-1.9.14.tar.bz2
Download size: 580 KB
Estimated Disk space required: 16.4 MB
Estimated build time: 0.43 SBU
XFree86-4.3.0.1, libjpeg-6b, libtiff-3.5.7,libungif-4.1.0b1, libpng-1.2.5 and GTK+-1.2.10
Install Imlib by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc/imlib && make && make install |
AAlib is a library to render any graphic into ASCII Art.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/aa-project/aalib-1.4rc5.tar.gz
Download (FTP): ftp://ftp.sourceforge.net/pub/sourceforge/aa-project/aalib-1.4rc5.tar.gz
Download size: 388 KB
Estimated Disk space required: 6.5 MB
Estimated build time: 0.15 SBU
Install AAlib by running the following commands:
./configure --prefix=/usr && make && make install |
The AAlib package contains the libaa libraries, aalib-config, aainfo, aatest and aasavefont.
SVGAlib is a low-level graphics library that provides VGA and SVGA modes in a console. This is useful for programs running on a console that require graphics capabilities.
Download (HTTP): http://www.svgalib.org/svgalib-1.4.3.tar.gz
Download (FTP): ftp://ftp.ibiblio.org/pub/Linux/libs/graphics/svgalib-1.4.3.tar.gz
Download size: 827 KB
Estimated Disk space required: 9.7 MB
Estimated build time: 0.20 SBU
Note: You must compile and install as root. If you don't nothing bad will happen during compilation, but certain tools won't be able to become SUID root which is required for proper operation. However, this raises a risk of exposing your system to any holes in those tools that might be used to gain root access so use with caution.
Install SVGAlib by running the following commands:
patch -Np1 -i ../svgalib-1.4.3-gcc3-1.patch && make prefix=/usr install && cd doc && for dir in man?; do for file in $dir/*; do \ gunzip /usr/share/man/$file; done; done |
cd doc && for dir in man?; do for file in $dir/*; do gunzip /usr/share/man/$file; done; done: SVGAlib installs it's man pages in compressed format so we uncompress them.
You must edit the config file to set the monitor and mouse type. Depending on your hardware, other setup might be required.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The SVGAlib package contains libvga and libvgagl libraries, dumpreg, mode3, restorefont, restorepalette, restoretextmode, savetextmode, textmode and svgakeymap.
DirectFB is a graphics library on top of the Linux frame buffer device. It offers maximum hardware accelerated performance at a minimum of resource usage and overhead.
Download (HTTP): http://www.directfb.org/download/DirectFB/DirectFB-0.9.19.tar.gz
Download (FTP): ftp://ftp.lug.udel.edu/pub/linux/distributions/gentoo/distfiles/DirectFB-0.9.19.tar.gz
Download size: 1.1 MB
Estimated Disk space required: 13.8 MB
Estimated build time: 0.51 SBU
Optional image and video providers: http://www.directfb.org/download/DirectFB-extra/DirectFB-extra-0.9.16.tar.gz
Note: DirectFB needs a Linux kernel with frame buffer support. Check the documentation in the kernel tree (/usr/src/linux/Documentation/fb/) on how to enable the frame buffer device for your graphics card.
Install DirectFB by running the following commands:
./configure --prefix=/usr && make && make install |
If you decided to add optional image and video providers then you have to install DirectFB-extra package too:
./configure --prefix=/usr && make && make install |
Note: The current version of avifile does not work with DirectFB. You have to use the avifile version which can be found at http://www.directfb.org/download/contrib/ or alternatively disable the avifile video provider by calling configure with --disable-avifile.
DirectFB is shipped with reasonable defaults but you might have to tweak things. There are several ways to do this. You may edit the system-wide configuration file /etc/directfbrc, the user-specific ~/.directfbrc or you may configure the DirectFB application via the command-line. Consult the directfbrc(5) manual page for details.
The DirectFB package provides dfbdump, dfbg, dfbinfo, dfblayer, directfb-config, directfb-csource and libdirectfb libraries.
Imlib2 is a graphics library for fast file loading, saving, rendering and manipulation.
Download (HTTP): http://heanet.dl.sourceforge.net/sourceforge/enlightenment/imlib2-1.1.0.tar.gz
Download (FTP): ftp://ftp.tux.org/X-Windows/enlightenment/ftp/enlightenment/imlib2-1.1.0.tar.gz
Download size: 796 KB
Estimated Disk space required: 20 MB
Estimated build time: 0.53 SBU
Install Imlib2 by running the following commands:
./configure --prefix=/usr && make && make install |
The bc package contains an arbitrary precision numeric processing language.
Download (HTTP): http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
Download size: 280 KB
Estimated Disk space required: 1.6 MB
Estimated build time: 0.07 SBU
Download the patches for bc from http://www.linuxfromscratch.org/patches/blfs/5.0.
Install bc by running the following commands:
patch -Np1 -i ../bc-1.06-flex-invocation.patch && patch -Np1 -i ../bc-1.06-readline.patch && ./configure --prefix=/usr --with-readline && make && make install |
The rep-gtk package contains a Lisp and GTK binding. This is useful for extending GTK-2 and GDK libraries with Lisp. The rep-gtk-0.15 package contains the bindings to GTK and uses the same instructions. They can both can be installed, if needed.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/rep-gtk/rep-gtk-0.18.tar.gz
Download size: 152 KB
Estimated Disk space required: 7.7 MB
Estimated build time: 0.18 SBU
Compface provides utilities and a library to convert from/to X-Face format, a 48x48 bitmap format used to carry thumbnails of email authors in a mail header.
Download (HTTP): http://www.ibiblio.org/pub/Linux/apps/graphics/convert/compface-1.4.tar.gz
Download (FTP): ftp://ftp.ibiblio.org/pub/Linux/apps/graphics/convert/compface-1.4.tar.gz
Download size: 28 KB
Estimated Disk space required: 520 KB
Estimated build time: 0.01 SBU
Install Compface by running the following commands:
./configure --prefix=/usr && make && make install |
This chapter contains mainly hardware utilities. It also contains some applications used by other applications in the book for installation purposes.
GPM (the General Purpose Mouse daemon) is a mouse server for applications running in the console. It not only provides cut and paste support generally, but its library component is used by various software such as links to provide mouse support to the application generally. It is useful on desktops, especially if following (Beyond) Linux From Scratch instructions - it's often much easier (and less error prone) to cut and paste between two console windows than to type everything by hand!
The GPM package contains a mouse server for the console and xterm. This is useful for cutting and pasting text in console mode, and also because many console-based programs need it to compile mouse support into themselves.
Download (FTP): ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2
Download size: 556 KB
Estimated Disk space required: 5.3 MB
Estimated build time: 0.09 SBU
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.0/gpm-1.20.1-segfault.patch
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.0/gpm-1.20.1-silent.patch
Install GPM by running the following commands:
patch -Np1 -i ../gpm-1.20.1-segfault.patch && patch -Np1 -i ../gpm-1.20.1-silent.patch && LDFLAGS="-lm" ./configure --prefix=/usr && make && make install && ldconfig -n -l /usr/lib/libgpm.so.1.19.0 |
export LDFLAGS="-lm": The math library must be linked with gpm, as ceil() is used in some cursor scrolling logic. LDFLAGS is only needed if you optimize gpm for size.
ldconfig -n -l : During installation, gpm outputs a message to run the above command to create the proper library links.
The gpm init.d script can be created using the following commands:
cat > /etc/rc.d/init.d/gpm << "EOF" #!/bin/sh # Begin $rc_base/init.d/gpm # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org # GPM specific parts by Mark Hymers - markh@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions if [ -f /etc/sysconfig/mouse ] then source /etc/sysconfig/mouse fi if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ] then echo "Please create an /etc/sysconfig/mouse file containing" echo "MDEVICE and PROTOCOL values" exit 1; fi case "$1" in start) echo "Starting gpm..." loadproc gpm -m $MDEVICE -t $PROTOCOL ;; stop) echo "Stopping gpm..." killproc gpm ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc gpm ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/gpm EOF chmod 755 /etc/rc.d/init.d/gpm |
You then need to create symbolic links to this file in the relevant rc.d directories. For example:
cd /etc/rc.d/init.d && ln -sf ../init.d/gpm ../rc0.d/K10gpm && ln -sf ../init.d/gpm ../rc1.d/K10gpm && ln -sf ../init.d/gpm ../rc2.d/K10gpm && ln -sf ../init.d/gpm ../rc3.d/S70gpm && ln -sf ../init.d/gpm ../rc4.d/S70gpm && ln -sf ../init.d/gpm ../rc5.d/S70gpm && ln -sf ../init.d/gpm ../rc6.d/K10gpm |
/etc/sysconfig/mouse This file contains the name of your mouse device and the protocol which it uses. To create this file, run the following:
cat > /etc/sysconfig/mouse << "EOF" # start /etc/sysconfig/mouse MDEVICE=[yourdevice] PROTOCOL=[yourprotocol] # end /etc/sysconfig/mouse EOF |
Examples of values to set MDEVICE and PROTOCOL to are
MDEVICE=/dev/psaux PROTOCOL=imps2 |
A list of which protocol values are known can be found by running gpm -t -help. Your MDEVICE setting depends on which type of mouse you have. For example, /dev/ttyS0 for a serial mouse (on Windows this is COM1), /dev/input/mice is often used for USB mice and /dev/psaux for PS2 mice. It is normally thought not a good idea to link /dev/mouse to the relevant device, but instead to reference it directly.
The Fcron package contains a periodical command scheduler which aims at replacing Vixie Cron.
Download (HTTP): http://fcron.free.fr/fcron-2.9.3.src.tar.gz
Download (FTP): ftp://ftp.seul.org/pub/fcron/fcron-2.9.3.src.tar.gz
Download size: 365 KB
Estimated Disk space required: 3.3 MB
Estimated build time: 0.11 SBU
Sendmail-8.12.10 or Postfix-2.0.16 or qmail-1.03 or Exim-4.24 or Courier-0.43.2, Linux-PAM-0.77, OpenJade-1.3.2 and DocBook DSSSL Stylesheets-1.78
Fcron uses the cron facility of syslog to log all messages. Since LFS does not set up this facility in /etc/syslog.conf, it needs to be done prior to installing Fcron. This command will append the necessary line to the current /etc/syslog.conf.
cat >> /etc/syslog.conf << "EOF" # Begin fcron addition to /etc/syslog.conf cron.* -/var/log/cron.log # End fcron addition EOF |
The configuration file has been modified, so reloading the sysklogd daemon will activate the changes.
/etc/rc.d/init.d/sysklogd reload |
For security reasons, we need to create an unprivileged user and group for fcron:
groupadd fcron && useradd -c fcron -g fcron fcron |
Install Fcron by running the following commands:
./configure --without-sendmail --with-answer-all=no && make && make install |
--without-sendmail: Fcron does not require an MTA to run but will use one, if it is installed, to email you the results of the fcron script. If you wish to utilize this feature change the switch to --with-sendmail=[path to your MTA] .
--with-answer-all=no: After the files are installed, the make install script enters into a configuration routine. The first test will be whether to install a boot script in the /etc/rc.d/init.d directory with the appropriate symbolic links in run levels 2, 3, 4, and 5. The second is to stop any current fcron processes and start a new one. Since this is probably your first install and we want a boot script based upon the BLFS template we answer 'n' to both tests.
--with-dsssl-dir=/usr/share/sgml/docbook/dsssl-stylesheets-1.78 : Can be added if you have installed OpenJade and dsssl-stylesheets to generate the documentation from the DocBook source files.
There are no required changes in any of the config files. Configuration information can be found in the man page for fcron.conf.
fcron scripts are written using fcrontab . Refer to the man page for fcrontab for proper parameters for your situation.
Create the boot script with the following:
cat > /etc/rc.d/init.d/fcron << "EOF" #!/bin/sh # Begin $rc_base/init.d/fcron # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting fcron..." loadproc fcron ;; stop) echo "Stopping fcron..." killproc fcron ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc fcron ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/fcron EOF chmod 755 /etc/rc.d/init.d/fcron |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/fcron ../rc0.d/K08fcron && ln -sf ../init.d/fcron ../rc2.d/S40fcron && ln -sf ../init.d/fcron ../rc3.d/S40fcron && ln -sf ../init.d/fcron ../rc4.d/S40fcron && ln -sf ../init.d/fcron ../rc5.d/S40fcron && ln -sf ../init.d/fcron ../rc6.d/K08fcron |
The hdparm package contains a utility that useful for controlling ATA/IDE controllers and hard drives both to increase performance and sometimes to increase stability.
WARNING! As well as being useful, incorrect usage of hdparm can destroy your information and in rare cases, drives. Use with caution and make sure you know what you are doing. If in doubt, we recommend you leave the default kernel parameters alone.
Download (HTTP): http://www.ibiblio.org/pub/Linux/system/hardware/hdparm-5.4.tar.gz
Download (FTP): ftp://ftp.ibiblio.org/pub/Linux/system/hardware/hdparm-5.4.tar.gz
Download size: 33 KB
Estimated Disk space required: 257 KB
Estimated build time: 0.01 SBU
Install hdparm by running the following commands:
make && make install |
Note that by default, hdparm is installed in /sbin as some systems may require it during the boot process before /usr is mounted. If you wish to install hdparm under the /usr hierarchy, then replace the above commands with the following:
make && make binprefix=/usr install |
The presence / absence of the which program in the main LFS book is probably one of the most contentious issues we have on the mailing lists. It has resulted in at least one flame war in the recent past. To hopefully put an end to this once and for all, we here present two of the options for equipping your system with "which".
The first option is to install the actual GNU program which.
Download (HTTP): http://ftp.gnu.org/gnu/which/which-2.14.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/which/which-2.14.tar.gz
Download size: 110 KB
Estimated Disk space required: 719 KB
Estimated build time: 0.01 SBU
Install which by running the following commands:
./configure --prefix=/usr && make && make install |
The second option (for those who don't want to install the program) is to create a simple script:
cat > /usr/bin/which << "EOF" #!/bin/bash type -p "$@" EOF chmod 755 /usr/bin/which chown root:root /usr/bin/which |
This should generally work OK and is probably the easiest solution for boxes which don't need a good user environment to work in.
The UnZip package contains ZIP extraction utilities. These are useful for extracting files from ZIP archives. ZIP archives are created with PKZIP or Info-ZIP utilities primarily in a DOS environment.
Download (HTTP): http://www.mirror.ac.uk/sites/ftp.info-zip.org/pub/infozip/src/unzip550.tar.gz
Download (FTP): ftp://ftp.info-zip.org/pub/infozip/src/unzip550.tar.gz
Download size: 1.1 MB
Estimated Disk space required: 5.8 MB
Estimated build time: 0.42 SBU
Required patch: http://www.linuxfromscratch.org/patches/blfs/5.0/unzip-5.50-fix-Makefile.patch
Required patch: http://www.linuxfromscratch.org/patches/blfs/5.0/unzip-5.50-fix-libz.patch
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.0/unzip-5.50-dotdot.patch
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.0/unzip-5.50-dont-make-noise.patch
By default, UnZip does not support shrink decompression. To enable it or to obtain more information, check out the UnZip FAQ at http://www.info-zip.org/pub/infozip/FAQ.html#unshrink.
Install UnZip by running the following commands:
patch -Np1 -i ../unzip-5.50-fix-Makefile.patch && patch -Np1 -i ../unzip-5.50-fix-libz.patch && patch -Np1 -i ../unzip-5.50-dont-make-noise.patch && patch -Np1 -i ../unzip-5.50-dotdot.patch && cp unix/Makefile . && make prefix=/usr linux && make prefix=/usr linux_shlibz && make prefix=/usr install && cp -a libunzip.so* /usr/lib |
make prefix=/usr linux: This command overrides the prefix variable that is set to /usr/local in the Makefile and builds the executables for a linux system. The alternatives to 'linux' can be seen with a 'make list' command.
make prefix=/usr linux_shlibz: Build shared libunzip and link UnZip against it and zlib.
The Zip package contains Zip utilities. These are useful for compressing files into ZIP archives.
Download (HTTP): http://www.mirror.ac.uk/sites/ftp.info-zip.org/pub/infozip/src/zip23.tar.gz
Download (FTP): ftp://ftp.info-zip.org/pub/infozip/src/zip23.tar.gz
Download size: 839 KB
Estimated Disk space required: 3.6 MB
Estimated build time: 0.05 SBU
Install Zip by running the following commands:
cp unix/Makefile . && make prefix=/usr generic_gcc && make prefix=/usr install |
make prefix=/usr generic_gcc: This command overrides the prefix variable that is set to /usr/local in the Makefile and builds the executables for a linux system. The alternatives to 'generic_gcc' can be seen with a 'make list' command.
The PCI Utilities package is a set of programs for listing PCI devices, inspecting their status and setting their configuration registers.
Download (HTTP): http://www.kernel.org/pub/software/utils/pciutils/pciutils-2.1.11.tar.bz2
Download (FTP): ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-2.1.11.tar.bz2
Download size: 107 KB
Estimated Disk space required: 1.1 MB
Estimated build time: 0.02 SBU
The pkgconfig package contains tools for passing the include path and/or library path to the compiler during the make script.
Download (HTTP): http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-0.15.0.tar.gz
Download (FTP): ftp://ftp.netbuddy.org/linux/pkgconfig-0.15.0.tar.gz
Download size: 604 KB
Estimated Disk space required: 5.2 MB
Estimated build time: 0.22 SBU
Install pkgconfig by running the following commands:
./configure --prefix=/usr && make && make install |
Add to your system or personal profile:
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig |
The default settings for PKG_CONFIG_PATH are /lib/pkgconfig, /usr/lib/pkgconfig and /usr/local/lib/pkgconfig. These settings are hard-coded and do not have to be exported with the additional paths.
The cpio package contains tools for archiving.
Download (HTTP): http://ftp.gnu.org/pub/gnu/cpio/cpio-2.5.tar.gz
Download (FTP): ftp://ftp.gnu.org/pub/gnu/cpio/cpio-2.5.tar.gz
Download size: 188 KB
Estimated Disk space required: 1 MB
Estimated build time: 0.06 SBU
Install cpio by running the following commands:
./configure --prefix=/usr --libexec=/usr/sbin \ --bindir=/bin && make && make install |
MC (Midnight Commander) is a text-mode full-screen file manager and visual shell. It provides a clear, user-friendly, and somewhat protected interface to a Unix system while making many frequent file operations more efficient and preserving the full power of the command prompt.
Download (HTTP): http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.0.tar.gz
Download (FTP): ftp://ftp.uni-koeln.de/util/shell/mc-4.6.0.tar.gz
Download size: 3.6 MB
Estimated Disk space required: 31 MB
Estimated build time: 0.45 SBU
GPM-1.20.1, XFree86-4.3.0.1, Samba-2.2.8a, slang-1.4.9, Zip-2.3, UnZip-5.50 and GNOME Libraries-1.4.2
Install MC by running the following commands:
./configure --prefix=/usr && make && make install |
An LFS is a development system, but only for C, C++ and Perl. This chapter expands the languages available.
The Python package contains the Python development environment. This is useful for object-oriented programming, writing scripts, prototyping large programs or developing them entirely.
Download (HTTP): http://www.python.org/ftp/python/2.3.2/Python-2.3.2.tgz
Download (FTP): ftp://ftp.python.org/pub/python/2.3.2/Python-2.3.2.tgz
Download size: 6.8 MB
Estimated Disk space required: 69 MB
Estimated build time: 1.13 SBU
The Perl module packages add useful objects to the Perl language. Modules utilized by packages throughout BLFS are listed here along with their dependencies.
Install Perl modules by running the following commands:
perl Makefile.PL && make && make install |
Below are installation instructions for modules that happen to be broken at the present time.
Gtk-Perl-0.7008:
perl Makefile.PL --without-guessing && make cp Gtk/Makefile Gtk/Makefile.bak && sed '/^OBJECT/s/xs/./g' Gtk/Makefile.bak > Gtk/Makefile && cp Gtk/Makefile Gtk/Makefile.bak && sed '/^OBJECT/s/build/./g' Gtk/Makefile.bak > Gtk/Makefile && make && make install |
The librep package contains a Lisp system. This is useful for scripting or for applications that may use the Lisp interpreter as an extension language.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/librep/librep-0.16.2.tar.gz
Download size: 896 KB
Estimated Disk space required: 9.1 MB
Estimated build time: 0.52 SBU
Install librep by running the following commands:
./configure --prefix=/usr --libexec=/usr/lib --mandir=/usr/share/man \ --infodir=/usr/share/info && make && make install |
The J2SDK package contains Sun's Java development environment. This is useful for developing Java programs and provides the runtime environment necessary to run Java programs. It also includes a plug-in for browsers so that they can be Java aware.
The JDK comes in two flavors, a precompiled binary and a source package. Previously, the plugin included in the JDK binary package was unusable on LFS owing to incompatibilities with GCC-3 compiled browsers. This is not the case anymore.
The source package requires registration at the Sun developer site and accepting the Sun Community Source License. The source code cannot be downloaded from some countries, so for users from those countries, the binary may be the only option.
Even if you plan on compiling the JDK source, you will need to download the binary version to bootstrap the JDK build. Follow the below link to download both source and binary packages. When downloading the source also download the Mozilla headers package available at the same location.
Download (HTTP): http://freshmeat.net/projects/sunjdk
Version used (binary): 1.4.2_01
Download size (binary): 59 MB
Download size (source): 77 MB
Estimated Disk space required: 1810 MB
Estimated build time: 85 SBU
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-fix-intl-files.patch
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-gcc33-1.patch
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-link-missing-libs.patch
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-motif-mkmsgcat.patch
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-remove-fixed-paths.patch
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-syntax-fixes.patch
http://www.linuxfromscratch.org/patches/blfs/5.0/j2sdk-1.4.1-use-included-motif.patch
Both versions will be installed in parallel. You may choose to keep either or both.
Installation of the precompiled JDK is easy, change the executable bit for the downloaded file, change to the directory where you want it installed and execute the downloaded file.
VERSION=1.4.2_01 && MV=`echo $VERSION | cut -d "_" -f 1,1` && V=`echo ${VERSION} | sed -e "s/\./_/g"` && chmod +x j2sdk-${V}-linux-i?86.bin && ./j2sdk-${V}-linux-i?86.bin && cd j2sdk${VERSION} && install -d /opt/j2sdk/j2sdk-precompiled-${MV} && mv * /opt/j2sdk/j2sdk-precompiled-${MV} |
The binary version is now installed.
If you don't want to compile the source or are not in a postition to download the source owing to license restrictions, skip ahead to the configuration section.
Add the recently compiled JDK to the path.
export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} && export PATH=$PATH:${JAVA_HOME}/bin |
Unzip and patch the source:
VERSION=1.4.1 && V=`echo $VERSION | sed -e "s/\./_/g"` && unzip j2sdk-${V}-src-scsl.zip && unzip j2sdk-${V}-mozilla_headers-unix.zip && patch -Np1 -i j2sdk-${VERSION}-gcc33-1.patch && patch -Np1 -i j2sdk-${VERSION}-fix-intl-files.patch && patch -Np1 -i j2sdk-${VERSION}-link-missing-libs.patch && patch -Np1 -i j2sdk-${VERSION}-remove-fixed-paths.patch && patch -Np1 -i j2sdk-${VERSION}-syntax-fixes.patch && patch -Np1 -i j2sdk-${VERSION}-motif-mkmsgcat.patch && patch -Np1 -i j2sdk-${VERSION}-use-included-motif.patch |
Set some variables which affect the build:
export ALT_BOOTDIR="$JAVA_HOME" && unset JAVA_HOME && unset CLASSPATH unset CFLAGS unset CXXFLAGS unset LDFLAGS export ALT_DEVTOOLS_PATH="/usr/bin" && export BUILD_NUMBER="blfs-`date +%s`" && export DEV_ONLY=true && export ALT_MOZILLA_PATH=$PWD && export INSANE=true && export MAKE_VERBOSE=true && export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts |
Additionally, if you would like to make in parallel, add the following (adjust MAKE_PARALLEL to your liking):
export HOTSPOT_BUILD_JOBS=$MAKE_PARALLEL |
If the included Motif doesn't build properly, the error is noticed much later in the build. A solution is to build the Motif library before compiling the J2SDK.
cd motif/lib/Xm && make && cd ../../.. |
Make and Install J2SDK with the following commands. There will be a lot of messages about missing files that look like errors. As long as the build doesn't stop, the messages are harmless, so ignore them.
cd control/make && make && cd ../.. && cd control/build/linux-i?86 && cp -a j2sdk-image /opt/j2sdk/j2sdk-1.4.1 |
export ALT_BOOTDIR="$JAVA_HOME": This var sets location of the bootstrap JDK.
export ALT_MOZILLA_PATH=$PWD: This sets the variable that points to where you unzipped the Mozilla headers.
export ALT_DEVTOOLS_PATH="/usr/bin": This changes the location where the build finds the needed executables.
export BUILD_NUMBER="blfs-`date +%s`": This will help you identify this compiled version of the runtime environment and virtual machine by appending this information to the version in the output to java -version.
export DEV_ONLY=true: This command eliminates compiling the documentation and eliminates a dependency for rpm.
unset JAVA_HOME: This clears the JAVA_HOME variable as recommended by the build instructions.
unset CLASSPATH: This clears the CLASSPATH variable as per the recommendations in the build instructions.
unset CFLAGS...: These flags cause miscompilation of the build. Never set these.
export INSANE=true: Unless you specify that you are insane the build will not proceed. The certified platform for the build is Redhat 6.1. The above variable ensures that all the errors related to compiling on a non-certified platform will be converted to warnings.
export MAKE_VERBOSE=true: Allows the current compilation command to be displayed on the console.
export ALT_CACERTS_FILE...: Specifies the certificate file to use.
We have two Java 2 SDK's installed in /opt/j2sdk. Decide on which one you would like to use as the default. For example if you decide to use the source compiled J2SDK, do the following:
ln -nsf j2sdk-1.4.1 /opt/j2sdk/j2sdk |
Add the following lines to your shell startup file (e.g. /etc/profile).
export JAVA_HOME=/opt/j2sdk/j2sdk export PATH=$PATH:$JAVA_HOME/bin |
Add $JAVA_HOME/man to your MANPATH variable or to /etc/man.conf
The Java plugin is in the directory $JAVA_HOME/jre/plugin/i?86/ns610/. Make a symbolic link to the file in that directory from your plugins directory.
The J2SDK package contains appletviewer, extcheck, idlj, jar, jarsigner, java, javac, javadoc, javah, javap, jdb, keytool, native2ascii, orbd, policytool, rmic, rmid, rmiregistry, rmiregistry, serialver, servertool and tnameserv.
extcheck checks a specified JAR file for title and version conflicts with any extensions installed in the JDK software.
jarsigner signs JAR (Java ARchive) files and verifies the signatures and integrity of a signed JAR.
java launches a Java application by starting a Java runtime environment, loading a specified class and invoking that class's main method.
javac reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files.
javadoc parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing the classes, interfaces, constructors, methods, and fields.
native2ascii converts files that contain non-supported character encoding into files containing Latin-1 or Unicode-encoded characters.
orbd is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment.
rmic generates stub and skeleton class files for remote objects from the names of compiled Java classes that contain remote object implementations.
rmiregistry creates and starts a remote object registry on the specified port on the current host.
serialver returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class.
The Ruby package contains the Ruby development environment. This is useful for object-oriented scripting.
Download (HTTP): http://rubyforge.org/download.php/34/ruby-1.8.0.tar.gz
Download (FTP): ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.0.tar.gz
Download size: 1.9 MB
Estimated Disk space required: 25.6 MB
Estimated build time: 0.52 SBU
The GCC package contains GNU compilers. This is useful for compiling programs written in Ada, C, C++, Fortran, Java and Objective C.
Download (HTTP): http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.3.1/gcc-3.3.1.tar.bz2
Download (FTP): ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.3.1/gcc-3.3.1.tar.bz2
Download size: 23 MB
Estimated Disk space required: 889 MB
Estimated build time: 29.3 SBU
If you plan to compile Ada, you will need to install GNAT temporarily to satisfy the circular dependency when you recompile GCC to include Ada.
Download (FTP): ftp://cs.nyu.edu/pub/gnat/3.15p/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz
Download size: 13.2 MB
Estimated Disk space required: 48.9 MB
Estimated build time: 0.01 SBU
Install GNAT by running the following commands:
./doconfig |
The above script will ask you how and where you would like to install GNAT. To avoid conflicts with the system gcc, the package will be installed in a separate directory, that can later be removed from the system.
In response to the questions asked by the doconfig script, enter 3 in response to the first question and /opt/gnat in response to the second question.
To finish the install, run
./doinstall |
The GNAT compiler can be invoked by executing the gcc binary installed by the above script.
Patch the source files with the following command:
patch -Np1 -i ../gcc-3.3.1-no_fixincludes-2.patch && patch -Np1 -i ../gcc-3.3.1-suppress-libiberty.patch |
Install GCC by running the following commands:
PATH_HOLD=$PATH && export PATH=/opt/gnat/bin:$PATH && cd gcc/ada && touch treeprs.ads [es]info.h nmake.ad[bs] && cd ../.. && mkdir ../gcc-build && cd ../gcc-build && CC=/usr/bin/gcc ../gcc-3.3.1/configure --prefix=/usr --enable-shared \ --enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \ --enable-__cxa_atexit --enable-clocale=gnu && make bootstrap && make -C gcc gnatlib_and_tools && make install && ln -sf g77 /usr/bin/f77 && export PATH=$PATH_HOLD |
You may remove the GNAT installation:
rm -rf /opt/gnat |
PATH_HOLD=$PATH: This command stores your current path before it's modified so that it can be restored after installation.
export PATH=/opt/gnat/bin:$PATH: This command allows the build to find GNAT's Ada compiler to build Ada.
touch treeprs.ads [es]info.h nmake.ad[bs]: This command creates necessary files for the Ada build. This step may be skipped if you don't want to compile the Ada front end.
CC=/usr/bin/gcc: This command works around the new PATH which puts GNAT 's gcc as the primary compiler.
--enable-languages=c,c++,objc,f77,ada,java: This command builds all available languages in the GCC package. You may modify this command to remove unwanted languages.
--enable-shared --enable-threads=posix --enable-__cxa_atexit: These commands are required to build the C++ libraries to published standards.
--enable-clocale=gnu: This command is a failsafe for incomplete locale data.
make gnatlib_and tools: This command completes the Ada build process. Skip this step if you have not enabled Ada as one of the languages.
The GCC package contains c++, c++filt, cpp, g++, g77, gcc, gccbug, gcov, glob, gnat, gnatbind, gnatbl, gnatchop, gnatfind, gnatkr, gnatlink, gnatls, gnatmake, gnatprep, gnatpsta, gnatpsys, gnatxref and >GCC libraries.
The programs and libraries whose descriptions are missing here have been described in the LFS GCC-3.3.1 page.
add2line converts the ASCII form of the 2-line orbital elements in a file to binary form and appends them to the orbdata files.
gnatchop is useful for renaming files to meet the standard Ada default file naming conventions.
gnatkr is used to determine the crunched name for a given file, when crunched to a specified maximum length.
gnatmem is the GNAT utility that monitors dynamic allocation and deallocation activity in a program.
gnatpsta determines the values of all the relevant parameters in Standard and outputs to stdout.
The Tcl package contains Tool Command Language.
Download (HTTP): http://aleron.dl.sourceforge.net/sourceforge/tcl/tcl8.4.4-src.tar.gz
Download size: 3.2 MB
Estimated Disk space required:
Estimated build time:
Install Tcl by running the following commands:
VERSION=8.4.4 && V=`echo $VERSION | cut -d "." -f 1,2` && DIR=$PWD && cd unix && ./configure --prefix=/usr && make && sed -i "s:${DIR}/unix:/usr/lib:" tclConfig.sh && sed -i "s:${DIR}:/usr/include/tcl${V}:" tclConfig.sh && sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh && make install && install -d /usr/include/tcl${V}/unix && install -m644 *.h /usr/include/tcl${V}/unix/ && install -d /usr/include/tcl${V}/generic && install -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ && rm -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h && ln -nsf /usr/include/tcl${V} /usr/lib/tcl${V}/include && ln -sf libtcl${V}.so /usr/lib/libtcl.so && ln -sf tclsh${V} /usr/bin/tclsh |
sed -i ...: The Tcl package assumes that the source that is used to build Tcl is always kept around for compiling packages that depend on Tcl. These sed's remove the reference to the build directory and replace them by saner system wide locations.
install ...: These commands install the internal headers into a system-wide location.
ln -sf ...: These commands create compatibility symbolic links.
The Tk package contains TCL GUI Toolkit.
Download (HTTP): http://aleron.dl.sourceforge.net/sourceforge/tcl/tk8.4.4-src.tar.gz
Download size: 3.0 MB
Estimated Disk space required:
Estimated build time:
Install Tk by running the following commands:
VERSION=8.4.4 && V=`echo $VERSION | cut -d "." -f 1,2` && DIR=$PWD && cd unix && ./configure --prefix=/usr && make && sed -i "s:${DIR}/unix:/usr/lib:" tkConfig.sh && sed -i "s:${DIR}:/usr/include/tk${V}:" tkConfig.sh && make install && install -d /usr/include/tk${V}/unix && install -m644 *.h /usr/include/tk${V}/unix/ && install -d /usr/include/tk${V}/generic && install -m644 ../generic/*.h /usr/include/tk${V}/generic/ && rm -f /usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h && ln -nsf /usr/include/tk${V} /usr/lib/tk${V}/include && ln -sf libtk${V}.so /usr/lib/libtk.so && ln -sf wish${V} /usr/bin/wish |
sed -i ...: The Tk package assumes that the source that is used to build Tk is always kept around for compiling packages that depend on Tk. These sed's remove the reference to the build directory and replace them by saner system wide locations.
install ...: These commands install the internal headers into a system-wide location.
ln -sf ...: These commands create compatibility symbolic links.
There are two reasons for installing GCC-2.95.3. The first is that the kernel developers have certified GCC-2.95.3 as the preferred compiler for compiling the kernel. The other (and more compelling reason) is that some commercial closed-source packages (such as Netscape Navigator, Yahoo Pager) and precompiled packages (such as Mozilla) are linked against GCC-2.95.3 libs.
Download (HTTP): http://ftp.gnu.org/gnu/gcc/gcc-2.95.3.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3.tar.gz
Download size: 7 MB
Estimated Disk space required: 104 MB
Estimated build time:
Apply the patches:
patch -Np1 -i ../gcc-2.95.3-2.patch && patch -Np1 -i ../gcc-2.95.3-no-fixinc.patch && patch -Np1 -i ../gcc-2.95.3-returntype-fix.patch |
The GCC development team recommends building in a separate directory.
mkdir ../gcc-build && cd ../gcc-build |
Configure GCC to build the C and C++ compilers and enable the related C++ options.
../gcc-2.95.3/configure \ --prefix=/opt/gcc-2.95.3 \ --enable-shared --enable-languages=c,c++ \ --enable-threads=posix |
Compile and install GCC:
make bootstrap && make install |
Make note of the library that is installed.
L=`find /opt/gcc-2.95.3/lib -name "*libstdc++*.so" -type f` && IL=`basename $L` |
Move the C++ libraries to the standard lib directory to avoid having to add /opt/gcc-2.95.3/lib to /etc/ld.so.conf.
for i in /opt/gcc-2.95.3/lib/*.so*; do mv -f $i /usr/lib; ln -sf /usr/lib/`basename $i` /opt/gcc-2.95.3/lib; done |
Create symlinks required by commercial and precompiled packages.
ln -sf $IL /usr/lib/libstdc++-libc6.1-1.so.2 && ln -sf $IL /usr/lib/libstdc++-libc6.2-2.so.3 && ln -sf $IL /usr/lib/libstdc++-libc6.3-2.so.3 |
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The instructions given above make compatibility symlinks that pre-compiled packages in BLFS require. You may create additional compatibility links based on your requirements.
If you only need the GCC-2.95.3 libraries, you may delete /opt/gcc-2.95.3.
Whenever you need to use GCC-2.95.3 instead of you system installed compiler, add /opt/gcc-2.95.3/bin to the front of your PATH or (preferably) set the CC environment variable before compiling the concerned package.
NASM (Netwide Assembler) is an 80x86 assembler designed for portability and modularity. It includes a disassembler as well.
Download (HTTP): http://unc.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.38.tar.bz2
Download (FTP): ftp://sunsite.ccu.edu.tw/pub14/sourceforge/n/nasm/nasm-0.98.38.tar.bz2
Download size: 536 KB
Estimated Disk space required: 6.3 MB
Estimated build time: 0.14 SBU
The LFS book covers setting up networking by connecting to a LAN with a static IP. There are other methods used to connect to LAN's and other networks (such as the Internet). We cover the most popular methods in this chapter.
The PPP package contains the pppd daemon and the chat program. This is used for connecting to other machines; often for connecting to the Internet via a dial-up connection to an ISP.
Download (HTTP): http://rz-obrian.rz.uni-karlsruhe.de/download/src/ppp-2.4/ppp-2.4.1.tar.gz
Download (FTP): ftp://cs.anu.edu.au/pub/software/ppp/ppp-2.4.1.tar.gz
Download size: 524 KB
Estimated Disk space required: 4.1 MB
Estimated build time: 0.09 SBU
Required patch if you plan on using RP-PPPoE-3.5 with demand dialing or kernel mode PPPoE http://www.linuxfromscratch.org/patches/blfs/5.0/ppp-2.4.1-pppoe-5.patch
Note: PPP support must be compiled into the kernel or available as a kernel module.
If you need PPPoE related patch, apply it:
patch -Np1 -i ../ppp-2.4.1-pppoe-5.patch |
Install PPP by running the following commands:
./configure && make && make install |
The PPP daemon itself requires very little configuration. The main trick is scripting the connection. This can be done either using the chat program which comes with this package or by using WvDial-1.53.
The WvDial package contains a no nonsense, quick and easy to use alternative to chat and pppd scripts. If you simply want to dial a modem without the fuss and hassle of chat issues, then you'll want this.
Download (HTTP): http://open.nit.ca/download/wvdial-1.53.tar.gz
Download (FTP): ftp://ftp.ing-steen.se/pub/unix/unsort/wvdial-1.53.tar.gz
Download size: 66 KB
Estimated Disk space required: 2.3 MB
Estimated build time: 0.06 SBU
Install WvDial by running the following commands:
make PREFIX=/usr && make PREFIX=/usr install |
touch /etc/wvdial.conf && wvdialconf /etc/wvdial.conf |
wvdialconf will test that you have a working modem and try to determine it's exact setup. You will then need to enter your ISP's phone number, login name and password into the /etc/wvdial.conf file.
You then start wvdial with:
wvdial |
For more information examine the wvdialconf, wvdial.conf and wvdial man pages.
DHCP stands for Dynamic Host Configuration Protocol. It is a protocol which is used by many sites to automatically provide information such as IP addresses, subnet masks and routing information to computers. If your network uses DHCP, you will need a DHCP client in order to connect to it. DHCP is also used by some cable modems.
We currently provide installation instructions for two DHCP clients, dhclient (from the dhcp package) and dhcpcd. We begin with a page which shows how to alter the LFS boot scripts for generic DHCP support. We then present the two sets of installation instructions which also discuss how to create an appropriate configuration file to work with the DHCP client of your choice.
/etc/sysconfig/network, /etc/sysconfig/network-devices/ifup-eth0, /etc/sysconfig/network-devices/ifdown-eth0, /etc/sysconfig/network-devices/ifconfig.eth0
Note that on this and the following pages, we use eth0 as the example interface. If you want to configure a different (or more than one) interface, simply replace eth0 with the interface you wish to use.
These instructions will convert the configuration files from LFS (a static configuration) to a configuration using the DHCP protocol. Note that static and DHCP-based interfaces can co-exist on a LFS system. To do this, you should only make the alterations to those interfaces which need to support DHCP. All of the instructions on this page are applicable no matter which DHCP client you intend to use.
If the interface you intend to use as your default gateway is going to use DHCP, the first step is to remove the GATEWAY and GATEWAY_IF variables from /etc/sysconfig/network. This will only need to be done once.
cd /etc/sysconfig && cp network network.bak && sed "s/GATEWAY/# GATEWAY/" network.bak > network |
You then need to create scripts which will override the default network scripts and provide DHCP support. These two scripts are generic and so for use with both DHCP clients. First, the ifup-eth0 script:
cat > /etc/sysconfig/network-devices/ifup-eth0 << "EOF" #!/bin/sh source /etc/sysconfig/rc || exit source $rc_functions || exit source $network_devices/ifconfig.eth0 || exit echo "Bringing up the eth0 interface..." modprobe eth0 loadproc $DHCP_PROG $DHCP_START EOF |
Then the ifdown-eth0 script:
cat > /etc/sysconfig/network-devices/ifdown-eth0 << "EOF" #!/bin/sh source /etc/sysconfig/rc || exit source $rc_functions || exit source $network_devices/ifconfig.eth0 || exit echo "Bringing down the eth0 interface..." $DHCP_PROG $DHCP_STOP evaluate_retval EOF |
Finally, we need to make these scripts executable:
chmod 755 /etc/sysconfig/network-devices/ifup-eth0 && chmod 755 /etc/sysconfig/network-devices/ifdown-eth0 |
The DHCP package comes with both a client (called dhclient) and a server program for using DHCP. If you want to install this package, the instructions can be found at DHCP-3.0pl2. Note that if you only want to use the client, you do not need to run the server and so do not need the startup script and links provided for the server daemon. You only need to run the DHCP server if you're providing this service to a network, and it's likely that you'll know if that's the case; if it isn't, don't run the server! Once you have installed the package, return here for information on how to configure the client (dhclient).
To configure dhclient, you need to create two files, /etc/sysconfig/network-devices/ifconfig.eth0 and /etc/dhclient.conf.
First, create the ifconfig.eth0 file with the following commands (note that this will overwrite any existing file):
cd /etc/sysconfig/network-devices && cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF" ONBOOT=yes DHCP_PROG=/sbin/dhclient DHCP_START=<appropriate start parameters> DHCP_STOP=-r EOF |
For more information on the appropriate DHCP_START and DHCP_STOP values, examine the man page for dhclient.
Next, you should then create the /etc/dhclient.conf using the following command:
cat > /etc/dhclient.conf << "EOF" # dhclient.conf interface "eth0"{ prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; require subnet-mask, domain-name-servers; } # end dhclient.conf EOF |
The dhcpcd package contains the dhcpcd client. This is useful for connecting your computer to a network which uses DHCP to assign network addresses.
Download (HTTP): http://www.phystech.com/ftp/dhcpcd-1.3.22-pl4.tar.gz
Download (FTP): ftp://ftp.phystech.com/pub/dhcpcd-1.3.22-pl4.tar.gz
Download size: 145 KB
Estimated Disk space required: 750 KB
Estimated build time:
Install dhcpcd by running the following commands:
patch -Np1 -i ../dhcpcd-1.3.22-pl4-fhs.patch && ./configure --prefix="" --sysconfdir=/var/lib \ --mandir=/usr/share/man && make && make install |
patch -Np1 -i ../dhcpcd-1.3.22-pl4-fhs.patch : Dhcpcd unpatched puts all configuration and temporary files in /etc/dhcpc. This becomes very annoying when dhcpcd tells you it's running and it's not. You look in /var/run for the PID file, but it's not there, the PID file that needs deleting is in /etc/dhcpc. This patch brings this program into FHS compliance, but more importantly, puts files where you expect them to be.
--prefix="": There may be a good reason for abandoning the normal BLFS convention of using --prefix=/usr here. If you are installing DHCP, it is likely that it is required during the boot process and /usr may be network mounted in which case, dhcpcd wouldn't be available due to being on the network! Therefore, depending on your situation, you may want it to be installed in /sbin or /usr/sbin. This command installs to /sbin.
--sysconfdir=/var/lib: This command install configuration files in the /var/lib directory.
--mandir=/usr/share/man: This command install the man pages to the /usr/share/man directory.
To configure dhcpcd, create the ifconfig.eth0 file with the following commands (note that this will overwrite any existing file):
cd /etc/sysconfig/network-devices && cat > ifconfig.eth0 << "EOF" ONBOOT=yes DHCP_PROG=/sbin/dhcpcd DHCP_START=<appropriate start parameters> DHCP_STOP=-k EOF |
For more information on the appropriate DHCP_START and DHCP_STOP values, examine the man page for dhcpcd.
Other methods to connect to large networks are through ISDN and PPPoE interfaces, among others. PPPoE is discussed here. Pages written for ISDN (or others as the need arises) are always welcome and will be included in future books, if available.
The Roaring Penguin PPPoE package contains both a client and a server component that works with the client. The client allows you to connect to large networks that use the PPPoE protocol, common among ADSL providers. The server component runs alongside the client, allowing you to configure other clients that send out a configuration request.
Download (HTTP): http://www.roaringpenguin.com/pppoe/rp-pppoe-3.5.tar.gz
Download (FTP): ftp://ftp.rutgers.edu/pub/slackware/slackware_source/n/rp-pppoe/rp-pppoe-3.5.tar.gz
Download size: 185 KB
Estimated Disk space required: 2.5 MB
Estimated build time:
If you plan on using demand dialing, or kernel mode PPPoE, confirm that you have applied the patch during installation of PPP-2.4.1. Additional information about kernel mode PPPoE can be found in rp-pppoe-3.5/doc/KERNEL-MODE-PPPOE.
Install RP-PPPoE by running the following commands:
cd src && ./configure && make && make install |
These are the standard installation commands that will install into the /usr prefix. You can optionally use the go script in the root of the source tree, to run the same commands, which are then immediately followed by the adsl-setup script.
/etc/ppp/pppoe.conf, /etc/ppp/firewall-standalone, /etc/ppp/firewall-masq, /etc/ppp/pppoe-server-options, /etc/resolv.conf, /etc/ppp/pap-seecrets, /etc/ppp/chap-secrets
To configure RP-PPPoE after installation, you should run the adsl-setup script.
When configuring your connection, you will need to have your ISP's nameserver information available, as well as your username and password. You will also be asked whether to configure a dial-on-demand or a constant connection. If your service provider does not charge by the minute, it is usually good to have a bootscript handle the connection for you. You can, of course, choose not to install the following script, and start your connection manually with the adsl-start script.
Use the following commands to create the optional adsl bootscript:
cat > /etc/rc.d/init.d/adsl << "EOF" #!/bin/bash # Begin $rc_base/init.d/adsl # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org # adsl script written by DJ Lucas - dj@lucasit.com source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Bringing up the ADSL interface..." /usr/sbin/adsl-start evaluate_retval ;; stop) echo "Bringing down the ADSL interface..." /usr/sbin/adsl-stop evaluate_retval ;; restart) $0 stop sleep 1 $0 start ;; status) /usr/sbin/adsl-status ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/adsl EOF chmod 755 /etc/rc.d/init.d/adsl |
Now create the necessary symlinks:
ln -sf ../init.d/adsl /etc/rc.d/rc0.d/K49adsl && ln -sf ../init.d/adsl /etc/rc.d/rc1.d/K49adsl && ln -sf ../init.d/adsl /etc/rc.d/rc2.d/K49adsl && ln -sf ../init.d/adsl /etc/rc.d/rc3.d/S24adsl && ln -sf ../init.d/adsl /etc/rc.d/rc4.d/S24adsl && ln -sf ../init.d/adsl /etc/rc.d/rc5.d/S24adsl && ln -sf ../init.d/adsl /etc/rc.d/rc6.d/K49adsl |
The RP-PPPoE package contains adsl-setup, adsl-start, adsl-status, adsl-stop, pppoe, pppoe-relay, pppoe-server and pppoe-sniff.
These applications are support libraries for other applications in the book. It is unlikely that you would just install these libraries, you will generally find that you will be referred to this chapter to satisfy a dependency of other applications.
The cURL package contains curl and its support library. This is useful for transferring files with URL syntax. For example, curl http://curl.haxx.se/download/curl-7.10.7.tar.gz > curl-7.10.7.tar.gz would download this program's TAR ball to the current directory. This ability to both download and redirect files can be incorporated into other programs to support functions like streaming media.
Download (HTTP): http://curl.haxx.se/download/curl-7.10.7.tar.bz2
Download (FTP): ftp://ftp.sunet.se/pub/www/utilities/curl/curl-7.10.7.tar.bz2
Download size: 964 KB
Estimated Disk space required: 24.3 MB
Estimated build time: 0.43 SBU
Install cURL by running the following commands:
./configure --prefix=/usr && make && make install |
curl is a client that can get documents from or send documents to any of the following protocols: HTTP, HTTPS (needs OpenSSL-0.9.7c), FTP, GOPHER, DICT, TELNET, LDAP (needs OpenLDAP-2.1.22) or FILE.
The WvStreams package contains the network programming libraries. These are needed to compile wvdial.
Download (HTTP): http://open.nit.ca/download/wvstreams-3.70.tar.gz
Download (FTP): ftp://ftp.ing-steen.se/pub/unix/unsort/wvstreams-3.70.tar.gz
Download size: 178 KB
Estimated Disk space required: 11.5 MB
Estimated build time: 0.17 SBU
Install WvStreams by running the following commands:
patch -Np1 -i ../wvstreams-3.70-wvcrypto.patch && patch -Np1 -i ../wvstreams-3.70-wvresolver.patch && make PREFIX=/usr LDFLAGS="-lcrypt" && make PREFIX=/usr install |
make PREFIX=/usr LDFLAGS="-lcrypt": This fixes libwvstreams' issues with OpenSSL's crypto library.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The GNet package contains a simple network library. This is useful for supporting TCP sockets, UDP and IP multicast, asynchronous DNS lookup, and more.
Download (HTTP): http://gnetlibrary.org/src/gnet-2.0.4.tar.gz
Download (FTP): ftp://ftp.man.olsztyn.pl/pub/linux/slackware/slackware-current/source/l/gnet/gnet-2.0.4.tar.gz
Download size: 448 KB
Estimated Disk space required: 9.6 MB
Estimated build time: 0.18 SBU
The libsoup package contains an HTTP library implementation in C. This is useful for accessing HTTP servers in a completely asynchronous mode.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/libsoup/1.99/libsoup-1.99.23.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/libsoup/1.99/libsoup-1.99.23.tar.bz2
Download size: 220 KB
Estimated Disk space required: 6.3 MB
Estimated build time: 0.14 SBU
People who are new to Unix-based systems tend to ask the question "Why on earth would I want a text-mode browser? I'm going to compile X and use Konqueror/Mozilla/Whatever!". Those who have been around systems for a while know that when (not if) you manage to mess up your graphical browser install and you need to look up some information on the web, a console based browser will save you. Also, there are quite a few people who prefer to use one of these browsers as their principle method of browsing; either to avoid the clutter and bandwidth which accompanies images or because they may use a text-to-speech synthesizer which can read the page to them (of use for instance to partially sighted or blind users). We currently have installation instructions for three console web browsers:
Links is a text and graphics mode WWW browser. It includes support for rendering tables and frames, features background downloads, can display colors and has many other features.
Download (HTTP): http://atrey.karlin.mff.cuni.cz/~clock/twibright/links/download/links-2.1pre11.tar.bz2
Download (FTP): ftp://atrey.karlin.mff.cuni.cz/pub/local/clock/links/links-2.1pre11.tar.bz2
Download size: 3.6 MB
Estimated Disk space required: 40.6 MB
Estimated build time: 0.57 SBU
GPM-1.20.1, OpenSSL-0.9.7c, libpng-1.2.5, libjpeg-6b, libtiff-3.5.7, SVGAlib-1.4.3 and XFree86-4.3.0.1
Install Links by running the following commands:
./configure --prefix=/usr && make && make install |
--enable-graphics: Add this switch if you want to use Links in graphics mode. You will also need to enable frame buffer support in your kernel and install GPM-1.20.1 or install one of the supported graphics libraries.
Lynx is a text based web browser.
Download (HTTP): http://lynx.isc.org/release/lynx2.8.4.tar.bz2
Download (FTP): ftp://ftp.netbuddy.org/linux/lynx2.8.4.tar.bz2
Download size: 1.9 MB
Estimated Disk space required: 16 MB
Estimated build time: 1.66 SBU
Install Lynx by running the following commands.
./configure --prefix=/usr --libdir=/etc --with-ssl --with-zlib && make && make install && make DOCDIR=/usr/share/doc/lynx-2.8.4/lynx_doc \ HELPDIR=/usr/share/doc/lynx-2.8.4/lynx_help install-doc && make DOCDIR=/usr/share/doc/lynx-2.8.4/lynx_doc \ HELPDIR=/usr/share/doc/lynx-2.8.4/lynx_help install-help && sed s/"t\/etc"/"t\/usr\/share\/doc\/lynx\-2\.8\.4"/ \ /etc/lynx.cfg > /etc/lynx.bak && mv /etc/lynx.bak /etc/lynx.cfg |
--libdir=/etc: For some reason, the configure and make routine for lynx uses libdir as the prefix for the configuration file. We set this to /etc so that the system wide configuration file is /etc/lynx.cfg.
--with-ssl: This enables support for linking SSL into lynx.
--with-zlib: This enables support for linking zlib into Lynx.
DOCDIR=... HELPDIR=...: We set these variables to avoid getting the help and documentation files installed under /etc.
sed... mv /etc/lynx.bak /etc/lynx.cfg: This sed command changes the /etc/lynx.cfg file so it looks for the help files in the correct place.
w3m is primarily a pager but it can also be used as a text-mode WWW browser.
Download (HTTP): http://unc.dl.sourceforge.net/sourceforge/w3m/w3m-0.4.1.tar.gz
Download (FTP): ftp://sunsite.ccu.edu.tw/pub15/sourceforge/w/w3m/w3m-0.4.1.tar.gz
Download size: 1.2 MB
Estimated Disk space required: 8.2 MB
Estimated build time: 0.20 SBU
GPM-1.20.1, OpenSSL-0.9.7c, Imlib-1.9.14, Imlib2-1.1.0, GDK Pixel Buffer-0.22.0 and Compface-1.4
We configure w3m to use the "monster" model, which includes color, menu, mouse, cookie, and SSL support. Other models include:
baby - bare minimum
little - color and menu support
mouse - color, menu, and mouse support
cookie - color, menu, mouse, and cookie support
Install w3m by running the following commands:
./configure -yes -lang=en -model=monster -prefix=/usr && make && make install |
These applications are generally client applications used to access the appropriate server across the building or across the world. Tcpwrappers and portmap are support programs for daemons that you may have running on your machine.
The NcFTP package contains a powerful and flexible interface to the Internet standard File Transfer Protocol. It is intended to replace or supplement the stock ftp program.
Download (FTP): ftp://ftp.ncftp.com/ncftp/ncftp-3.1.6-src.tar.bz2
Download size: 396 KB
Estimated Disk space required: 5.2 MB
Estimated build time: 0.26 SBU
There are two ways to build NcFTP. The first (and optimal) way, builds most of the functionality as a shared library and then builds and installs the program linked against this library. The second method simply links all of the functionality into the binary statically. This doesn't make the dynamic library available for linking by other applications. You need to choose which method best suits you. Note that the second method does not create an entirely statically linked binary; only the libncftp parts are statically linked in, in this case. Be aware that building and using the shared library is covered by the Clarified Artistic License; however, developing applications that utilize the shared library is subject to a different license.
To install NcFTP using the first (and optimal) method, run the following commands:
./configure --prefix=/usr && cd libncftp && make shared && make soinstall && cd .. && make && make install |
To install NcFTP using the second method (with the libncftp functionality linked in statically) run the following commands:
./configure --prefix=/usr && make && make install |
cd libncftp && make shared && make soinstall |
Most NcFTP configuration is done while in the program and the configuration files are dealt with automatically. One exception to this is ~/.ncftp/prefs_v3. There are various options to alter in there, including:
yes-i-know-about-NcFTPd=yes |
There are other options in the prefs_v3 file. Most of these are self-explanatory.
The NcFTP package contains ncftp, ncftpbatch , ncftpbookmarks, ncftpget, ncftpls, ncftpput and ncftpspooler.
The ssh client is a secure replacement for telnet. If you want to install it, the instructions can be found in Chapter 23 - OpenSSH-3.7.1p2. Note that if you only want to use the client, you do not need to run the server and so do not need the startup script and links. In accordance with good practice, only run the server if you actually need it (and if you don't know whether you need it or not, it's likely that you don't!).
rsync is a utility for fast incremental file transfers. If you want to install it, the instructions can be found in Chapter 23 - rsync-2.5.6. Note that if you only want to use the client, you do not need to run the server and so do not need the startup script and links. In accordance with good practice, only run the server if you actually need it (and if you don't know whether you need it or not, it's likely that you don't!).
CVS is the concurrent versioning system. This is useful for projects on which multiple people are working or where archives of previous versions of files need to be kept.
Download (HTTP): http://gd.tuwien.ac.at/opsys/linux/sf/s/scmlinux/cvs-1.11.6.tar.bz2
Download (FTP): ftp://ftp.cvshome.org/pub/release/stable/cvs-1.11.6/cvs-1.11.6.tar.bz2
Download size: 2.1 MB
Estimated Disk space required: 14 MB
Estimated build time: 0.37 SBU
Install cvs by running the following commands:
./configure --prefix=/usr && make && make install |
~/.cvsrc is the main CVS configuration file. This file is used by users to specify defaults for different cvs commands, for example to make all cvs diff commands run with -u, a user would add diff -u to their .cvsrc file.
~/.cvswrappers specifies wrappers to be used in addition to those specified in the CVSROOT/cvswrappers file in the repository.
The Wget package contains a utility useful for non-interactive downloading of files from the Web.
Download (HTTP): http://ftp.gnu.org/gnu/wget/wget-1.8.2.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/wget/wget-1.8.2.tar.gz
Download size: 1.1 MB
Estimated Disk space required: 5.4 MB
Estimated build time: 0.23 SBU
Install Wget by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
The tcpwrappers package provides daemon wrapper programs that report the name of the client requesting network services and the requested service.
Download (HTTP): http://files.ichilton.co.uk/nfs/tcp_wrappers_7.6.tar.gz
Download (FTP): ftp://ftp.zcu.cz/pub/security/tue/tcp_wrappers_7.6.tar.gz
Download size: 100 KB
Estimated Disk space required: 720 KB
Estimated build time: 0.16 SBU
Install tcpwrappers with the following commands:
patch -Np1 -i ../tcp_wrappers_7.6.diff && make REAL_DAEMON_DIR=/usr/sbin linux && cp libwrap.a /usr/lib && cp tcpd.h /usr/include && cp safe_finger /usr/sbin && cp tcpd /usr/sbin && cp tcpdchk /usr/sbin && cp tcpdmatch /usr/sbin && cp try-from /usr/sbin && cp -av *.3 /usr/share/man/man3 && cp -av *.5 /usr/share/man/man5 && cp -av *.8 /usr/share/man/man8 |
patch -Np1 -i ../tcp_wrappers_7.6.diff: This patch alters the original path and logging facility of the original tcpwrappers program.
/etc/hosts.allow, /etc/hosts.deny
File protections: the wrapper, all files used by the wrapper, and all directories in the path leading to those files, should be accessible but not writable for unprivileged users (mode 755 or mode 555). Do not install the wrapper set-uid.
Then perform the following edits on the /etc/inetd.conf configuration file:
finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd |
finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd |
Note: The finger server is used as an example here.
Similar changes must be made if xinetd is used, with the emphasis being on calling /usr/sbin/tcpd instead of calling the service daemon directly, and passing the name of the service daemon to tcpd.
tcpd is the main access control daemon for all Internet services, which inetd or xinetd will run instead of running the requested service daemon.
tcpdmatch is used to predict how the tcp wrapper would handle a specific request for a service.
The portmap package is a more secure replacement for the original SUN portmap package. Portmap is used to forward RPC requests to RPC daemons such as NFS and NIS.
Download (HTTP): http://files.ichilton.co.uk/nfs/portmap_5.orig.tar.gz
Download (FTP): ftp://ftp.cvut.cz/adamantix/dists/adamantix-1.0.1/main/source/net/portmap_5.orig.tar.gz
Download size: 20 KB
Estimated Disk space required: 250 KB
Estimated build time: 0.03 SBU
Required patch (HTTP): http://files.ichilton.co.uk/nfs/portmap_5-1.diff.gz
Required patch (HTTP): http://downloads.linuxfromscratch.org/blfs-patches/portmap_5-errno.patch
Install portmap with the following commands:
patch -Np1 -i ../portmap_5-1.diff && patch -Np1 -i ../portmap_5-errno.patch && mkdir /usr/share/doc/portmap && make && make install |
patch -Np1 -i ../portmap_5-1.diff: This patch provides added security for the portmap package, including only allowing portmap table changes from the local host.
mkdir /usr/share/doc/portmap: This directory must be created before installation.
cat > /etc/rc.d/init.d/portmap << "EOF" #!/bin/sh # Begin /etc/rc.d/init.d/portmap source /etc/rc.d/init.d/functions case "$1" in start) echo "Starting RPC Portmap" loadproc /sbin/portmap ;; stop) echo "Stopping Portmap" killproc /sbin/portmap ;; restart) $0 stop /bin/sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac # End /etc/rc.d/init.d/portmap EOF chmod 754 /etc/rc.d/init.d/portmap && cd /etc/rc.d/init.d && ln -sf ../init.d/portmap ../rc0.d/K49portmap && ln -sf ../init.d/portmap ../rc1.d/K49portmap && ln -sf ../init.d/portmap ../rc2.d/K49portmap && ln -sf ../init.d/portmap ../rc3.d/S22portmap && ln -sf ../init.d/portmap ../rc4.d/S22portmap && ln -sf ../init.d/portmap ../rc5.d/S22portmap && ln -sf ../init.d/portmap ../rc6.d/K49portmap |
The Inetutils package contains network clients and servers. Inetutils installation in LFS lacks installation of the various servers that are included in the package. The instructions in BLFS removes this deficiency.
Download (HTTP): http://gd.tuwien.ac.at/gnu/gnusrc/inetutils/inetutils-1.4.2.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/inetutils/inetutils-1.4.2.tar.gz
Download size: 1018 KB
Estimated Disk space required: 2.3 MB
Estimated build time:
Install Inetutils by running the following commands:
./configure --prefix=/usr --disable-syslogd \ --libexecdir=/usr/sbin --infodir=/usr/share/info \ --sysconfdir=/etc --localstatedir=/var \ --mandir=/usr/share/man --with-wrap && make && make install && mv /usr/bin/ping /bin |
--disable-syslogd: This switch prevents Inetutils installing a System Log Daemon, which is installed in the LFS Book.
--with-wrap: This switch makes Inetutils compile against tcp-wrappers. Omit this option if you didn't install tcp-wrappers.
--disable-whois: This switch will prevent Inetutils installing a WhoIs client, since the included whois client is out of date. Add this option if you plan on installing Whois-4.6.7.
--with-pam: This switch makes Inetutils compile against for Linux-PAM . Add this option if you want to utilize PAM.
--disable-servers: Some of the servers included with Inetutils are insecure in nature and in some cases better alternative exist. You can choose this switch and enable only the servers you want to avoid installing unneeded servers.
The NCPFS package contains client and administration tools for use with Novell networks.
Download (HTTP): http://platan.vc.cvut.cz/ftp/pub/linux/ncpfs/ncpfs-2.2.3.tar.gz
Download (FTP): ftp://platan.vc.cvut.cz/pub/linux/ncpfs/ncpfs-2.2.3.tar.gz
Download size: 1.5 MB
Estimated Disk space required: 40 MB
Estimated build time:
Install NCPFS by running the following commands:
./configure --prefix=/usr --includedir=/usr/include \ --mandir=/usr/share/man --datadir=/usr/share && make && make install && make install-dev |
--prefix="": installs binaries on the root partition so that they are available at boot time. This may not be ideal for all systems. If /usr is mounted locally, --prefix=/usr may be a better option.
--includedir=/usr/include: Tells configure to look in /usr/include for header files. It also tells make to install NCPFS's headers here.
--mandir=/usr/share/man: installs the man pages in the correct location.
--datadir=/usr/share: correctly installs the locale files to /usr/share/.
Note: If you do not need to use the IPX protocol, or you use a different IPX package, you can optionally pass --disable-ipx and/or --disable-ipx-tools to the configure script to disable these options.
A config file ~/.nwclient should be placed in the home directory of each user that intends to use ncpfs . The permissions on this file should be set to 600, for obvious security reasons. The configuration file should contain a single line per server that the user will use. Each line should contain the server name, the user name, and optionally the password. Below is a sample .nwclient file.
# Begin example ~/.nwclient config file Server1/User1 Password Server2/User1 Server2/Guest1 - # End example .nwclient config file |
The syntax for the .nwclient file is simple, server_name/user_name password. Be extremely careful when creating or editing this file as the client utilities are very picky about syntax. There should always be a space immediately after the username. If this space is substituted by a tab or multiple spaces, you will not get the expected results when attempting to use the NCPFS tools. If no password is supplied, the client utilities will ask for a password when it is needed. If no password is needed, for instance when using a guest account, a single '-' should be put in place of a password.
It should be noted that the ncpmount is not intended to mount individual volumes because each mount point creates a separate client connection to the Novell server. Mounting each individual volume separately would be unwise, as mounting all volumes on a server under one mount point uses only one client connection.
If you need to set up the IPX protocol at boot, you can create the following scripts. These scripts assume IPX will be set up on eth0 and the network frame type is 802.2. You should confirm that these are the correct settings and adjust as necessary.
cat > /etc/sysconfig/network-devices/ifup-ipx0 << "EOF" #!/bin/sh # Begin /etc/sysconfig/network-devices/ifup-ipx0 source /etc/sysconfig/rc || exit source $rc_functions || exit echo "Setting up the IPX protocol on eth0..." /bin/ipx_interface add eth0 802.2 && /bin/ipx_configure --auto_interface=on --auto_primary=on evaluate_retval # End /etc/sysconfig/network-devices/ifup-ipx0 EOF cat > /etc/sysconfig/network-devices/ifdown-ipx0 << "EOF" #!/bin/sh # Begin /etc/sysconfig/network-devices/ifdown-ipx0 source /etc/sysconfig/rc || exit source $rc_functions || exit echo "Stopping IPX on the eth0 interface..." /bin/ipx_configure --auto_interface=off --auto_primary=off && /bin/ipx_interface del eth0 802.2 evaluate_retval # End /etc/sysconfig/network-devices/ifdown-ipx0 EOF echo "ONBOOT=yes" > /etc/sysconfig/network-devices/ifconfig.ipx0 chmod 755 /etc/sysconfig/network-devices/ifup-ipx0 chmod 755 /etc/sysconfig/network-devices/ifdown-ipx0 |
Client Utilities: ncpmount, ncpumount, nprint, nsend, nwpasswd, nwsfind, pqlist, pqrm, pqstat, and slist.
Server Admin Utilities: ncopy, nwbocreate, nwbols, nwboprops, nwborm, nwbpadd, nwbpcreate, nwbprm, nwbpset, nwbpvalues, nwdir, nwdpvalues, nwfsctrl, nwfsinfo, nwfstime, nwgrant, nwpurge, nwrevoke, nwrights, nwtrustee, nwtrustee2, nwuserlist, amd nwvolinfo.
IPX Interface Utilities: ipx_cmd, ipx_configure, ipx_interface, ipx_internal_net, and ipx_route.
Other Utilities: ncpmap and nwauth.
The NTP package contains a client and server to keep the time synchronized between various computers over a network. This package is the official reference implementation of the NTP protocol.
Download (HTTP): http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.1.2.tar.gz
Download (FTP): ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-4.1.2.tar.gz
Download size: 2.2 MB
Estimated Disk space required: 13 MB
Estimated build time:
Install NTP by running the following commands:
./configure --prefix=/usr && make && make install |
The following configuration file defines various NTP servers to use with the primary server designated with the prefer tag. It also creates a drift file where ntpd stores the frequency offset. Since the documentation included with the package is sparse, visit the NTP website at http://www.ntp.org/ for more information.
server time-a.nist.gov prefer server time-b.nist.gov server tick.usno.navy.mil driftfile /var/cache/ntp.drift |
There are two options. Option one is to use run ntpd continuously and allow it to synchronize the time in a gradual manner. The other option is to run ntpd periodically (using cron) and update the time each time ntpd is scheduled.
If you choose Option one, then create the bootscript /etc/rc.d/init.d/ntp and put the start and stop symlinks:
#!/bin/bash # Begin $rc_base/init.d/ntp source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting ntpd..." loadproc ntpd ;; stop) echo "Stopping ntpd..." killproc ntpd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc ntpd ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/ntp |
If you prefer to start ntpd periodically, add the following command to the root's crontab:
ntpd -q |
ntpd: NTP daemon that runs in the background and keeps the date/time synchronized based on response from configured NTP servers. It also functions as a NTP server.
ntpdate: NTP Client program that sets the date/time based on the response from an NTP Server. This command is deprecated.
ntp-genkeys: This program generates cryptographic data files used by the NTPv4 authentication and identification schemes. a ARPANET file transfer client.
ntpdc and ntpq: Programs to query and set ntpd configuration.
ntptrace: Trace a chain of NTP servers back to the primary source.
This chapter contains some tools that come in handy when the network need some investigating.
The Traceroute package contains a program which is used to display the network route that packets take to reach a specified host. This is a standard network troubleshooting tool. If you find yourself unable to connect to another system, traceroute can help pinpoint the problem.
Download (HTTP): http://gd.tuwien.ac.at/platform/sun/packages/solaris/freeware/SOURCES/traceroute-1.4a12.tar.gz
Download (FTP): ftp://ftp.ee.lbl.gov/traceroute-1.4a12.tar.gz
Download size: 35 KB
Estimated Disk space required: 75 KB
Estimated build time:
Install Traceroute by running the following commands:
cp Makefile.in Makefile.in.bak && sed 's/-o bin/-o root/' Makefile.in.bak > Makefile.in && ./configure --prefix=/usr && make && make install && make install-man |
sed 's/-o bin/-o root/'... |
make install: Installs traceroute with UID set to root in the /usr/sbin directory. This makes it possible for all users to execute traceroute. For absolute security, turn off the SUID bit in traceroute's file permissions with the command:
chmod 0755 /usr/sbin/traceroute |
The risk is that if a security problem such as a buffer overflow were ever found in the Traceroute code, a regular user on your system could gain root access if the program is SUID root. Removing the SUID permission of course also makes it impossible for users other than root to utilize traceroute, so decide what's right for your individual situation.
Now, to be completely FHS compliant, as is our aim, if you do leave the traceroute binary SUID root, then you should move traceroute to /usr/bin with the following command:
mv /usr/sbin/traceroute /usr/bin |
This ensures that the binary is in the path for non-root users.
Nmap is a utility for network exploration and security auditing. It supports ping scanning, port scanning and TCP/IP fingerprinting.
Download (HTTP): http://download.insecure.org/nmap/dist/nmap-3.30.tgz
Download size: 1108 KB
Estimated Disk space required: 7 MB
Estimated build time:
Whois is a client-side application which queries the whois directory service for information pertaining to a particular domain name.
Download (HTTP): http://www.linux.it/~md/software/whois_4.6.7.tar.gz
Download (FTP): ftp://ftp.debian.org/debian/pool/main/w/whois/whois_4.6.7.tar.gz
Download size: 46 KB
Estimated Disk space required: 528 KB
Estimated build time: 0.01 SBU
BIND Utilities is not a separate package, it is a collection of the client side programs that are included with BIND-9.2.2. The BIND package includes client side programs such as nslookup, dig and host. If you install BIND server, these programs will be installed automatically. This section is for those users who don't need the complete BIND server, but need these client side applications.
Download (HTTP): http://gd.tuwien.ac.at/infosys/servers/isc/bind9/9.2.2/bind-9.2.2.tar.gz
Download (FTP): ftp://ftp.isc.org/isc/bind9/9.2.2/bind-9.2.2.tar.gz
Download size: 4.8 MB
Estimated Disk space required: 90 MB
Estimated build time: 0.89 SBU
Install BIND Utilities by running the following commands:
./configure --prefix=/usr && make -C lib/dns && make -C lib/isc && make -C bin/dig && make -C bin/dig install |
Mail Clients help us retrieve (Fetchmail), sort (Procmail), read and compose responses (Nail, Mutt, Pine, Kmail, Balsa, Evolution, Mozilla) to email.
News clients also help us retrieve, sort, read and compose responses, but these messages travel through USENET (a worldwide bulletin board system) using the Network News Transfer Protocol (NNTP).
The Nail package contains a command-line Mail User Agent that is compatible with the mail command available in commercial Unix versions. The mail command is useful for writing scripts.
Download (HTTP): http://omnibus.ruf.uni-freiburg.de/~gritter/archive/nail/nail-10.5.tar.gz
Download (FTP): http://ftp.uni-koeln.de/mail/nail-10.5.tar.gz
Download size: 190 KB
Estimated Disk space required: 3.8 MB
Estimated build time:
Install Nail by running the following commands. (Note: If you would like nail to be linked against openssl , add --with-opensslto the configure command mentioned below.)
./configure --prefix=/usr && make && make install && ln -sf nail /usr/bin/mail |
The Procmail package contains an autonomous mail processor. This is useful for filtering and sorting incoming mail.
Download (HTTP): http://www.procmail.org/procmail-3.22.tar.gz
Download (FTP): ftp://ftp.procmail.net/pub/procmail/procmail-3.22.tar.gz
Download size: 338 KB
Estimated Disk space required: 1.5 MB
Estimated build time:
Install Procmail by running the following commands:
make BASENAME=/usr install && make install-suid |
BASENAME=/usr: The equivalent of ./configure --prefix=/usr on other package installations.
make install-suid: Modifies permissions of the installed files.
The Fetchmail package contains the a mail retrieval program. "It retrieves mail from remote mail servers and forwards it to your local (client) machine's delivery system, so it can then be read by normal mail user agents."
Download (HTTP): http://www.catb.org/~esr/fetchmail/fetchmail-6.2.3.tar.gz
Download (FTP): ftp://gnome.dti.ad.jp/.1/unix/net/mail/fetchmail/fetchmail-6.2.3.tar.gz
Download size: 1.2 MB
Estimated Disk space required: 5.7 MB
Estimated build time: 0.22 SBU
Install Fetchmail by running the following commands:
./configure --prefix=/usr --with-ssl --enable-fallback=procmail && make && make install |
--with-ssl: This enables SSL if found, so that you can handle connections to secure POP3 and IMAP servers.
--enable-fallback=procmail: This tells Fetchmail to hand incoming mail to Procmail for delivery if your port 25 mail server is not present or not responding.
set logfile /var/log/fetchmail.log set no bouncemail set postmaster root poll SERVERNAME : user "username" pass "password"; mda "/usr/bin/procmail -f %F -d %T"; |
Is an example configuration that should suffice for most people. You can add as many users and servers as you need using the same syntax.
man fetchmail: Look for the section near the bottom named CONFIGURATION EXAMPLES it gives some quick examples too. There are countless other config options once you get used to it.
The Mutt package contains a Mail User Agent. This is useful for reading, writing, replying, saving, and deleting your email.
Download (HTTP): http://gd.tuwien.ac.at/infosys/mail/mutt/mutt-1.4.1i.tar.gz
Download (FTP): ftp://ftp.mutt.org/mutt/mutt-1.4.1i.tar.gz
Download size: 2.5 MB
Estimated Disk space required: 12 MB
Estimated build time: 0.69 SBU
Mutt requires a group named 'mail'. You can add this group, if it does not exist, with this command:
groupadd mail |
If you did not install a MTA, such as Postfix-2.0.16 or Sendmail-8.12.10, you need to modify the ownership of /var/mail with this command:
chgrp mail /var/mail |
Install Mutt by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
--sysconfdir=/etc: This installs the configuration files into /etc instead of /usr/etc.
The Pine package contains the Pine Mail User Agent and several server daemons for various mail protocols, in addition to some nice file and directory editing/browsing programs.
Download (HTTP): http://mirror.sit.wisc.edu/pub/net/mail/pine/pine4.56.tar.bz2
Download (FTP): ftp://ftp.cac.washington.edu/pine/pine4.56.tar.bz2
Download size: 2.8 MB
Estimated Disk space required: 54 MB
Estimated build time:
Recommended patch: http://www.linuxfromscratch.org/patches/blfs/5.0/pine-4.56-fhs.patch
Install Pine by running the following commands:
patch -Np1 -i ../pine-4.56-fhs.patch && ./build slx MAILSPOOL='/var/mail' \ SSLDIR=/usr SSLCERTS=/etc/ssl/certs && cp doc/pine.1 doc/pico.1 doc/rpdump.1 doc/rpload.1 /usr/share/man/man1 && cd bin && install pine imapd ipop2d ipop3d mailutil mtest pico pilot rpdump \ rpload /usr/bin |
patch -Np1 -i ../pine-4.56-fhs.patch: This patch will make Pine use /etc for configuration files.
The build procedure for Pine is somewhat unusual, in that options usually passed as ./configure options or housed in $CFLAGS must all be passed on the command line to the ./build script.
./build slx: Pine offers quite a few target platforms, slx specifies Linux using -lcrypt to get the crypt function. See the doc/pine-ports file for more information and other authentication options.
MAILSPOOL='/var/mail': Location of mail spool files, /var/mail.
cd bin && install pine imapd ipop2d ipop3d mailutil mtest pico pilot rpdump \ rpload /usr/bin |
The Pine package contains pine, pico, pilot, imapd, ipop2d, ipop3d, mtest, rpload and rpdump.
slrn is a slang-based news reader, capable of reading local news spools as well as groups from an NNTP server. Small local news spools can also be created with the use of the slrnpull program included in the slrn distribution.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/slrn/slrn-0.9.7.4.tar.bz2
Download (FTP): ftp://ftp.fu-berlin.de/pub/unix/news/slrn/slrn-0.9.7.4.tar.gz
Download size: 850 KB
Estimated Disk space required: 2.1 MB
Estimated build time:
Install slrn by running the following commands:
./configure --prefix=/usr --with-slrnpull && make LDFLAGS="-ldl" && make install |
./configure --prefix=/usr: Specify /usr to install to instead of /usr/local.
./configure --with-slrnpull: Build the slrnpull executable.
Pan-0.14.2 is an GTK2 based newsreader program.
KNode is a Qt based newsreader program from kdenetwork-3.1.4.
KMail is a Qt based mail client from kdenetwork-3.1.4.
Balsa-2.0.14 is an GTK2 based mail client.
Mozilla-1.4 includes both a mail client and newsreader in its installation along with notes for installing Mozilla Thunderbird, a mail/news client based on the Mozilla code base.
Evolution-1.4.4 includes an GTK2 based mail client.
This chapter includes applications needed for the qmail server. Their installation instructions are different than most packages in the book because we want to support the FHS throughout the book.
The daemontools package is a replacement for inetd or xinetd. The main reason for using it here is because it is recommended for use with qmail and djbdns.
Download (HTTP): http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
Download (FTP): ftp://incal.net/pub/net/daemontools-0.76.tar.gz
Download size: 162 KB
Estimated Disk space required: 1.8 MB
Estimated build time:
Install daemontools by running the following commands:
cd admin/daemontools-0.76 && patch -Np1 -i ../../daemontools-0.76-errno.patch && package/compile && cd package && sed 's|command|usr/sbin|' boot.inittab > boot.inittab~ && mv boot.inittab~ boot.inittab && cd ../command && sed -e 's|/command:/usr/local/bin:/usr/local/sbin:||' \ -e 's|command|usr/sbin|' \ -e 's|/service|/etc/service|g' svscanboot > svscanboot~ && mv svscanboot~ svscanboot && chmod 555 svscanboot && cp * /usr/sbin && cd ../package && cat /etc/inittab boot.inittab > /etc/inittab~ && mv -f /etc/inittab~ /etc/inittab && mkdir /etc/service && telinit Q |
The first thing to understand in installing any package written by Daniel J. Bernstein, and this includes qmail, djbdns and ucspi-tcp in addition to daemontools, is that he is willing to completely disregard standards if his idea of the correct thing to do differs from an particular standard. Professor Bernstein is a standards body unto himself when it comes to his own software.
It is therefore necessary to make quite a few changes to the installation commands for his packages to get them to install in a manner that is compliant with the Filesystem Hierarchy Standard (FHS). Most of the following commands are due to this difficulty.
cd admin/daemontools-0.76: First off, the package is unpacked in an admin directory. You will find the actual packages two directory levels below this.
package/compile: This command actually compiles the source and prepares the binaries.
Since we are installing the binaries in /usr/sbin rather than creating a non-standard /command directory, several paths have to be changed:
sed 's|command|usr/sbin|' boot.inittab > boot.inittab~ mv boot.inittab~ boot.inittab |
In boot.inittab, /command/svscanboot is changed to /usr/sbin/svscanboot.
sed -e 's|/command:/usr/local/bin:/usr/local/sbin:||' \ -e 's|command|usr/sbin|' \ -e 's|/service|/etc/service|g' svscanboot > svscanboot~ && |
Here various paths are adjusted in the svscanboot script. In our setup svscan will check the /etc/service directory instead of the /service directory for daemons to run.
cp * /usr/sbin: We must manually copy the binaries to the /usr/sbin directory.
cat /etc/inittab boot.inittab > /etc/inittab~ mv -f /etc/inittab~ /etc/inittab |
mkdir /etc/service: This command creates the daemontools control directory, which - even if empty - needs to exist for daemontools to run properly.
telinit Q: This command tells the init process to re-read its configuration file (inittab) and act upon any changes that have been made. The svscanboot script is started.
The daemontools package contains svscanboot, svscan, supervise, svc, svok, svstat, fghack, pgrphack, readproctitle, multilog, tai64n, tai64nlocal, setuidgid, envuidgid, envdir, softlimit and setlock. More detailed descriptions of these commands may be found at http://cr.yp.to/daemontools.html.
svscan checks the service directory for daemons to run and starts a supervise process for each run script that it finds.
supervise runs the run script passed to it by svscan and monitors the process the script starts so that if it dies, supervise restarts it.
multilog is a logging program. It takes output from a daemon and appends it to any number of logs.
The daemontools package does not come with man pages, so install this package if you want online help with the daemontools programs.
Download (HTTP): http://smarden.org/pape/djb/manpages/daemontools-0.76-man.tar.gz
Download size: 8 KB
Estimated Disk space required: 76 KB
Estimated build time:
Install daemontools-man by running the following commands:
cd daemontools-man && gzip -9 *.8 && package/compile && cp *.8.gz /usr/share/man/man8/ |
The ucspi-tcp package consists of a suite of tools that allow the easy creation of client-server tcp daemons. tcpserver is a more secure alternative to inetd. It has built in functionality for rule based access control, and will gracefully defer connections when the configurable maximum load is reached, unlike inetd. tcpserver is also recommended for use with qmail, and was written by the same author.
Download (HTTP): http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
Download size: 56 KB
Estimated Disk space required: 2 MB
Estimated build time:
Install ucspi-tcp by running the following commands:
patch -Np1 -i ../ucspi-tcp-0.88-errno.patch && sed 's|/usr/local|/usr|' conf-home > conf-home~ && mv conf-home~ conf-home && sed 's/bin/sbin/' hier.c > hier.c~ && mv hier.c~ hier.c && make && make setup check |
sed 's|/usr/local|/usr|' conf-home > conf-home~ mv conf-home~ conf-home sed 's/bin/sbin/' hier.c > hier.c~ mv hier.c~ hier.c |
cd /usr/sbin mv tcpclient *@ mconnect delcr addcr tcpcat /usr/bin |
The ucspi-tcp package contains tcpserver, tcprules, tcprulescheck, argv0, fixcrio, recordio, rblsmtpd, tcpclient, who@, date@, finger@, http@, tcpcat, mconnect, addcr and delcr
You can also find detailed descriptions of each of these programs at http://cr.yp.to/ucspi-tcp/tcpserver.html, but here is a brief summary:
tcpserver listens for incoming TCP connections on a given port, and runs a program of your choosing in response to a connection.
tcprules compiles rules that govern access control for tcpserver into a fast access database format.
tcprulescheck makes it possible to see how tcpserver will react to connections from a given address without actually having to connect via that address. This is useful for checking to see if the access control rules you are using are doing what you expected.
rblsmtpd is a spam blocking program that works in conjunction with your SMTP daemon and tcpserver .
who@ is a demonstration program using tcpclient that has the functionality of the rwho program. It requires a server running sysstat on port 11.
date@ is a demonstration program using tcpclient that will return the system time of a remote host which is running a daytime service on port 13.
finger@ is a demonstration program using tcpclient that mimics the functionality of the finger program. It requires a server running fingerd on port 79.
mconnect connects to a TCP port, delivers any input specified to the port, and prints any output from the port.
MTAs are the programs which transport mail from one machine to the other. The traditional MTA is sendmail however there are several other choices.
As well as SMTP servers there is a POP server (qpopper) and an IMAP server (Courier-IMAP).
The Postfix package contains a Mail Transport Agent (MTA). This is useful for sending email to other users of your host machine. It can also be configured to be a central mail server for your domain, a mail relay agent or simply a mail delivery agent to your local Internet Service Provider (ISP).
Download (FTP): ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.0.16.tar.gz
Download size: 1.3 MB
Estimated Disk space required: 94 MB
Estimated build time: 0.29 SBU
Before you compile the program, you need to create users and groups that will be expected to be in place when the install script executes. Add the users and groups with the following commands:
groupadd postfix && groupadd postdrop && groupadd -g 65534 nogroup && useradd -c postfix -d /dev/null -g postfix -s /bin/false postfix && useradd -c nobody -d /home -g nogroup -s /bin/bash -u 65534 nobody && chown postfix:postfix /var/mail |
Install postfix by running the following commands:
make && sh postfix-install daemon_directory=/usr/sbin \ manpage_directory=/usr/share/man \ sample_directory=/usr/share/doc/postfix \ -non-interactive |
The final installation step is to install the program's documentation with this command:
cp -rf html/* /usr/share/doc/postfix |
sh postfix-install ... -non-interactive : We don't want the install script to ask any questions so we call it with a non-interactive switch and accept default destination directories in all but three cases.
cat > /etc/aliases << "EOF" # Begin /etc/aliases MAILER-DAEMON: postmaster postmaster: root root: LOGIN # End /etc/aliases EOF |
The /etc/aliases file that was just created, the main.cf and the master.cf must be personalized for your system. The aliases file needs your non-root login identity so mail addressed to root can be forwarded to you at the user level. The main.cf file needs your fully qualified hostname. All of these edits can be done with sed commands entered into the console with appropriate substitutions of your non-root login name for [user] and your fully qualified hostname for [localhost.localdomain]. You will find the main.cf file is self documenting, so load it into your editor to make the changes you need for your situation.
cp /etc/aliases /etc/aliases.bak cp /etc/postfix/main.cf /etc/postfix/main.cf.bak cp /etc/postfix/master.cf /etc/postfix/master.cf.bak sed "s/LOGIN/[user]/" /etc/aliases.bak > /etc/aliases sed "s/#myhostname = host.domain.tld/myhostname = \ [localhost.localdomain]/" \ /etc/postfix/main.cf.bak > /etc/postfix/main.cf /usr/bin/newaliases /usr/sbin/postfix start |
To automate the running of Postfix, use following command to create the init.d script:
cat > /etc/rc.d/init.d/postfix << "EOF" #!/bin/sh # Begin $rc_base/init.d/postfix # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting Postfix..." loadproc postfix start ;; stop) echo "Stopping Postfix..." loadproc postfix stop ;; reload) echo "Reloading Postfix..." loadproc postfix reload ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|reload|restart}" exit 1 ;; esac # End $rc_base/init.d/postfix EOF chmod 755 /etc/rc.d/init.d/postfix |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/postfix ../rc0.d/K25postfix && ln -sf ../init.d/postfix ../rc1.d/K25postfix && ln -sf ../init.d/postfix ../rc2.d/K25postfix && ln -sf ../init.d/postfix ../rc3.d/S35postfix && ln -sf ../init.d/postfix ../rc4.d/S35postfix && ln -sf ../init.d/postfix ../rc5.d/S35postfix && ln -sf ../init.d/postfix ../rc6.d/K25postfix |
The Postfix package contains bounce , cleanup, error, flush, lmtp, local, mailq, master, newaliases, nqmgr, pickup, pipe, postalias, postcat, postconf, postdrop, postfix, postkick, postlock, postlog, postmap, postqueue, postsuper, qmgr, qmqpd, sendmail, showq, smtp, smtpd, spawn, trivial-rewrite, and virtual.
master is the resident process that runs bounce, cleanup, error, flush, lmtp, local, nqmgr, pickup, pipe, qmgr, qmqpd, showq, smtp, smtpd, spawn, trivial-rewrite and virtual on demand. These programs are not designed to work as user commands.
postqueue implements the Postfix user interface for queue management. It implements all the operations that are traditionally available via the sendmail command.
sendmail implements the Postfix to Sendmail compatibility interface. mailq and newaliases are symlinks to sendmail.
The qmail package contains Dan Bernstein's Mail Transport Agent (MTA). qmail provides local and remote mail delivery/relaying.
Download (HTTP): http://www.qmail.org/qmail-1.03.tar.gz
Download (FTP): ftp://ftp.comimpex.cz/LINUX/System/qmail-1.03.tar.gz
Download size: 225 KB
Estimated Disk space required: 4.6 MB
Estimated build time:
qmail needs certain user and group account to be added before installation of the software. Add the users and groups with the following commands:
mkdir /var/qmail && groupadd nofiles && useradd -g nofiles -d /var/qmail/alias alias && useradd -g nofiles -d /var/qmail qmaild && useradd -g nofiles -d /var/qmail qmaill && useradd -g nofiles -d /var/qmail qmailp && groupadd qmail && useradd -g qmail -d /var/qmail qmailq && useradd -g qmail -d /var/qmail qmailr && useradd -g qmail -d /var/qmail qmails |
Install qmail by running the following commands:
patch -Np1 -i ../qmail-1.03.errno.patch && make setup check && ./config-fast `hostname` && cd /var/qmail && touch .qmail-postmaster .qmail-mailer-daemon .qmail-root && chmod 644 .qmail-* && ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail && mv /var/qmail/boot/home /var/qmail/rc && for mandir in 1 5 7 8; do mv /var/qmail/man/man$mandir/* \ /usr/man/man$mandir; done && rm -rf /var/qmail/man |
If inetd is used, the following command will add the qmaild entry to /etc/inetd.conf:
echo "smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env \ tcp-env /var/qmail/bin/qmail-smtpd" >> /etc/inetd.conf |
If xinetd is used, the following command will add the qmaild entry to /etc/xinetd.conf:
cat >> /etc/xinetd.conf << "EOF" service smtp { disable = no identifier = smtp-local socket_type = stream protocol = tcp wait = no user = qmaild server = /var/qmail/bin/tcp-env server_args = /var/qmail/bin/qmail-smtpd env = RELAYCLIENT= only_from = 127.0.0.1 log_on_failture += USERID } EOF |
To automate the running of qmail, use following command to create the init.d script:
cat > /etc/rc.d/init.d/qmail << "EOF" #!/bin/sh # Begin $rc_base/init.d/qmail # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting Qmail..." /var/qmail/rc & ;; stop) echo "Stopping Qmail..." killall qmail-send ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac # End $rc_base/init.d/qmail EOF chmod 755 /etc/rc.d/init.d/qmail |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/qmail ../rc0.d/K25qmail && ln -sf ../init.d/qmail ../rc1.d/K25qmail && ln -sf ../init.d/qmail ../rc2.d/K25qmail && ln -sf ../init.d/qmail ../rc3.d/S35qmail && ln -sf ../init.d/qmail ../rc4.d/S35qmail && ln -sf ../init.d/qmail ../rc5.d/S35qmail && ln -sf ../init.d/qmail ../rc6.d/K25qmail |
The qmail package contains bouncesaying, condredirect, except, forward, maildir2mbox, maildirmake, maildirwatch, mailsubj, preline, qbiff, qreceipt, qmail-clean, qmail-inject, qmail-local, qmail-pop3d, qmail-popup, qmail-qstat, qmail-send, qmail-smtpd and qmail-start.
The Sendmail package contains a Mail Transport Agent (MTA).
Download (HTTP): http://www.sendmail.org/ftp/sendmail.8.12.10.tar.gz
Download (FTP): ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.10.tar.gz
Download size: 1.8 MB
Estimated Disk space required: 13 MB
Estimated build time: 0.43 SBU
Before building Sendmail, we need to create users, groups and directories that sendmail uses with the following commands:
groupadd smmsp && groupadd mail && useradd -g smmsp -G mail smmsp && chmod 1777 /tmp && chmod 1777 /var/mail && mkdir /var/spool/mqueue |
Install Sendmail with the following commands:
cat > devtools/Site/site.config.m4 << "EOF" define(`confMANGRP',`root') define(`confMANOWN',`root') define(`confSBINGRP',`root') define(`confUBINGRP',`root') define(`confUBINOWN',`root') EOF cd sendmail && sh Build && cd ../cf/cf && cp generic-linux.mc sendmail.mc && mkdir /etc/mail && sh Build sendmail.mc && sh Build install-cf && cd ../../ && sh Build install |
echo `hostname` > /etc/mail/local-host-names cat > /etc/mail/aliases << "EOF" postmaster: root MAILER-DAEMON: root EOF cd /etc/mail && cp -R /usr/src/sendmail-8.12.10/cf/* . && cp -R /usr/src/sendmail-8.12.10/cf/cf/submit.mc . && cp -R /usr/src/sendmail-8.12.10/cf/cf/sendmail.mc . && newaliases -v |
To start and stop Sendmail on system boot/shutdown create the sendmail boot script with the following commands:
Note: The -qNm option, where N is number of minutes, controls how often Sendmail will process the mail queue. A default of 5 minutes is used here. Individual workstation users may want to set this as low as 1 minute, large installations handling more mail will want to set it higher.
cat > /etc/rc.d/init.d/sendmail << "EOF" #!/bin/sh # Begin $rc_base/init.d/sendmail # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting sendmail..." loadproc /usr/sbin/sendmail -bs -bd -q5m start ;; stop) echo "Stopping Sendmail..." killproc sendmail ;; status) statusproc sendmail ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 ;; esac # End $rc_base/init.d/sendmail EOF chmod 755 /etc/rc.d/init.d/sendmail |
Create the run level symlinks with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/sendmail ../rc0.d/K25sendmail && ln -sf ../init.d/sendmail ../rc1.d/K25sendmail && ln -sf ../init.d/sendmail ../rc2.d/K25sendmail && ln -sf ../init.d/sendmail ../rc3.d/S35sendmail && ln -sf ../init.d/sendmail ../rc4.d/S35sendmail && ln -sf ../init.d/sendmail ../rc5.d/S35sendmail && ln -sf ../init.d/sendmail ../rc6.d/K25sendmail |
The Sendmail package contains mail.local, rmail, smrsh, editmap, makemap, mailq, newaliases, sendmail, vacation, praliases and mailstats.
The Exim package contains a Mail Transport Agent written by the University of Cambridge, released under the GNU Public License.
Download (HTTP): http://gd.tuwien.ac.at/infosys/mail/exim/exim4/exim-4.24.tar.bz2
Download (FTP): ftp://ftp.exim.org/pub/exim/exim4/exim-4.24.tar.bz2
Download size: 1.2 MB
Estimated Disk space required: 11 MB
Estimated build time: 0.27 SBU
Before building Exim, we need to create the group and user exim which will run the exim daemon:
groupadd exim && useradd -d /dev/null -g exim -s /bin/false exim |
Install Exim with the following commands:
sed -e 's/^BIN_DIR.*$/BIN_DIRECTORY=\/usr\/sbin/' src/EDITME | \ sed -e 's/^CONF.*$/CONFIGURE_FILE=\/etc\/exim.conf/' | \ sed -e 's/^EXIM_USER.*$/EXIM_USER=exim/' | \ sed -e 's/^EXIM_MONITOR/#EXIM_MONITOR/' > Local/Makefile && make && make install && cp doc/exim.8 /usr/share/man/man8 && ln -s exim-4.24-1 /usr/sbin/exim && ln -s exim /usr/sbin/sendmail |
sed -e ... > Local/Makefile: Many of Exim's configuration options are compiled in. Here, we specify the minimum set of options, BIN_DIRECTORY, CONFIGURE_FILE and EXIM_USER. We also defer building the Exim monitor program, which requires the X Window System support, by commenting out the EXIM_MONITOR line in the Makefile.
ln -s exim /usr/sbin/sendmail: Create a link to sendmail for applications which need it. Exim will accept most Sendmail command-line options.
Create the Exim configuration files with the following commands:
cat >> /etc/aliases << "EOF" postmaster: root MAILER-DAEMON: root EOF exim -v -bi && /usr/sbin/exim -bd -q1m |
Note: To protect an existing /etc/aliases file, we will append these aliases to it if it exists. This file should be checked and duplicate aliases removed, if present.
To start and stop Exim on system boot/shutdown create the exim boot script with the following commands:
cat > /etc/rc.d/init.d/exim << "EOF" #!/bin/sh # Begin $rc_base/init.d/exim # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting exim..." loadproc /usr/sbin/exim -bd -q1m ;; stop) echo "Stopping exim..." killproc exim ;; status) statusproc exim ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 ;; esac # End $rc_base/init.d/exim EOF chmod 755 /etc/rc.d/init.d/exim |
Create the run level symlinks with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/exim ../rc0.d/K25exim && ln -sf ../init.d/exim ../rc1.d/K25exim && ln -sf ../init.d/exim ../rc2.d/K25exim && ln -sf ../init.d/exim ../rc3.d/S35exim && ln -sf ../init.d/exim ../rc4.d/S35exim && ln -sf ../init.d/exim ../rc5.d/S35exim && ln -sf ../init.d/exim ../rc6.d/K25exim |
The Exim package contains exim, exim_dumpdb, exim_fixdb, exim_tidydb, exinext, exiwhat, exim_dbmbuild, exicyclog, exigrep, eximstats, exiqsumm, exiqgrep, exim_lock and exim_checkaccess.
The Qpopper package contains a POP3 mail server.
Download (HTTP): http://public.www.planetmirror.com/pub/mail/popper/qpopper4.0.5.tar.gz
Download (FTP): ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper4.0.5.tar.gz
Download size: 2.2 MB
Estimated Disk space required: 9.0 MB
Estimated build time: 0.13 SBU
Install Qpopper with the following commands:
./configure --prefix=/usr && make && make install |
If you use inetd, the following command will add the qpopper entry to /etc/inetd.conf:
echo "pop stream tcp nowait root /usr/sbin/popper popper" >> \ /etc/inetd.conf && echo "pop 110/tcp" >> /etc/services && killall inetd || inetd && echo "local0.notice;local0.debug /var/log/POP.log" >> \ /etc/syslog.conf && killall -HUP syslogd |
Issue a killall -HUP inetd to reread the changed inetd.conf file.
If you use xinetd, the following command will add the qpopper entry to /etc/xinetd.conf:
cat >> /etc/xinetd.conf << "EOF" service pop { port = 110 socket_type = stream protocol = tcp wait = no user = root passenv = PATH server = /usr/sbin/popper server_args = popper } EOF |
Issue a killall -HUP xinetd to reread the changed xinetd.conf file.
The Courier package contains a Mail Transport Agent (MTA). This is useful for sending email to other users of your host machine. It can also be configured to be a central mail server for your domain or a mail relay agent. The Courier packages also includes a web-based email interface, IMAP, IMAP-SSL, POP3, and POP3-SSL. The configuration listed below will allow users with PAM and virtual-users in a MySQL Database access to email.
Download (HTTP): http://osdn.dl.sourceforge.net/sourceforge/courier/courier-0.43.2.tar.bz2
Download (FTP): ftp://courier.sourceforge.net/courier/courier-0.43.2.tar.bz2
Download size: 3.3 MB
Estimated Disk space required: 55 MB
Estimated build time:
MySQL-4.0.15 or PostgreSQL-7.3.4, Linux-PAM-0.77, OpenSSL-0.9.7c, FAM-2.6.10, OpenLDAP-2.1.22, expect, Apache-2.0.47 and aspell-0.50.3
Before you compile the program, you need to create users and groups that will be expected to be in place when the install script executes. Add the users and groups with the following commands:
groupadd courier && useradd -c 'Courier Mail Server -d /dev/null -g courier -s /bin/false courier |
Install courier by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc/courier --with-piddir=/var/run \ --libexecdir=/usr/sbin --datadir=/usr/share/courier \ --localstatedir=/var/spool/courier --disable-root-check --with-db=gdbm \ --with-mailuser=courier --withmailgroup=courier \ --enable-workarounds-for-imap-client-bugs \ --with-ispell=/usr/bin/aspell && make && make install && make install-configure |
--sysconfdir=/etc/courier: Specifies the directory where Courier's configuration files are installed.
--with-piddir=/var/run: Specifies the directory where Courier's PID files are stored when Courier is active.
--libexecdir=/usr/sbin: libexecdir contains programs and libraries that cannot be directly executed from the command-line.
--datadir=/usr/share/courier: Specifies the directory where miscellaneous shell scripts, Perl scripts, and data files will be installed.
--localstatedir=/var/lib/courier: Specifies the directory that will hold the mail queue, and other temporary data. This option defaults to the subdirectory var in the directory specified by the --prefix option.
--disable-root-check: Allows Courier to be built as the root user.
--with-db=gbbm: Courier requires either the GDBM or the DB database library. GDBM is used if both are present. This option forces the selection of the database library.
--with-mailuser=courier: All except two Courier daemons run as a non-privileged user. This option specifies the userid that Courier will install and run as.
--withmailgroup=courier: like --with-mailuser, but specifies the group ID.
--enable-workarounds-for-imap-client-bugs: there are several confirmed bugs in some IMAP clients that do not properly implement the IMAP4rev1 protocol. This option enables some workarounds for those buggy IMAP clients. NOTE: make check will fail if this option is used. You should first configure without this option, and if all post-configuration tests succeed, rerun configure with this option and recompile.
--with-ispell=/usr/bin/aspell: Courier's webmail server can use spell checking, if the aspell program is available. If configure finds ispell, spell checking is enabled. If aspell is not in the current search path, use --with-ispell=program to explicitly set the location of aspell.
Make the following changes in this file if you are utilizing MySQL:
MYSQL_SERVER localhost MYSQL_USERNAME courier MYSQL_PASSWORD (your choice) MYSQL_SOCKET /tmp/mysql.sock MYSQL_PORT 3306 MYSQL_DATABASE courier-mail MYSQL_USER_TABLE users MYSQL_CLEAR_PWFIELD clear DEFAULT DOMAIN (your domain) MYSQL_QUOTA_FIELD quota |
If you utilize PAM:
cat > /etc/pam.d/esmtp << "EOF # Begin /etc/pam.d/esmtp auth required pam_unix.so try_first_pass account required pam_unix.so session required pam_unix.so # End /etc/pam.d/esmtp EOF cat > /etc/pam.d/pop3 << "EOF # Begin /etc/pam.d/pop3 auth required pam_unix.so try_first_pass account required pam_unix.so session required pam_unix.so # End /etc/pam.d/pop3 EOF cat > /etc/pam.d/imap << "EOF # Begin /etc/pam.d/imap auth required pam_unix.so try_first_pass account required pam_unix.so session required pam_unix.so # End /etc/pam.d/imap EOF cat > /etc/pam.d/webmail << "EOF # Begin /etc/pam.d/webmail auth required pam_unix.so try_first_pass account required pam_unix.so session required pam_unix.so # End /etc/pam.d/webmail EOF |
This command will create the mysql database for authentication:
mysqladmin -uroot -p[password] create courier-mail |
This command will setup the table users for the courier-mail database:
mysql -uroot -p[password] courier-mail CREATE TABLE users ( id char(128) DEFAULT '' NOT NULL, crypt char(128) DEFAULT '' NOT NULL, clear char(128) DEFAULT '' NOT NULL, name char(128) DEFAULT '' NOT NULL, uid int(10) unsigned DEFAULT '65534' NOT NULL, gid int(10) unsigned DEFAULT '65534' NOT NULL, home char(255) DEFAULT '' NOT NULL, quota char(255) DEFAULT '' NOT NULL, KEY id (id(128)) ); |
This will add the courier user that we specified earlier in the authmysql file:
mysql -uroot -p[password] mysql grant all privileges on *.* to courier@localhost identified by '[password]' with grant option; |
General Settings for Mail
You will need to create the following files with the contents specified.
/etc/courier/defaultdomain
cat > /etc/courier/defaultdomain << "EOF" [yourdomain] EOF |
/etc/courier/me
cat > /etc/courier/me << "EOF" [servername.yourdomain] EOF |
/etc/courier/locals
cat > /etc/courier/locals << "EOF" localhost [yourdomain] EOF |
/etc/courier/esmtpacceptmailfor.dir/system
cat >/etc/courier/esmtpacceptmailfor.dir/system << "EOF" localhost [yourdomain] EOF |
You will also need to edit the aliases file and change the following entry.
/etc/courier/aliases/system
postmaster: [your administrator email] |
If you want to deny access from some hosts from sending mail you will need to edit the /etc/courier/smtpaccess/default.
After the above steps are completed you will need to run the following commands:
makesmtpaccess makehosteddomains makealiases |
SMTP/SMTMP-SSL Configuration
This section will enable the SMTP Server from Courier
/etc/courier/esmtpd
ESMTPDSTART=YES |
/etc/courier/esmtpd-ssl
ESMTPDSSLSTART=YES |
POP3/POP3-SSL Configuration
This section will enable the POP3 Server from Courier
/etc/courier/pop3d
POP3DSTART=YES |
/etc/courier/pop3d-ssl
POP3DSLLSTART=YES |
IMAP/IMAP-SSL Configuration
This section will enable the IMAP Server from Courier
/etc/courier/imapd
IMAPDSTART=YES |
/etc/courierd/imapd-ssl
IMAPDSSLSTART=YES |
Creating Mail directories for System Users
This section will explain on how to create MailDirs for your system users.
cd /home/[username] maildirmake Maildir chown [username].[username] Maildir -R |
Setup for Virtual users
This section will explain how to setup Maildir for your virtual users.
echo "vmailman:x:9000:9000:Virtual Mailman:/home/vmailman:/bin/bash" >> /etc/passwd echo "vmailman:x:9000:" >> /etc/group |
Now to setup the maildir for these virtual users.
cd /home/vmailman mkdir [virtual_user] cd [virtual_user] maildirmake Maildir chown vmailman.vmailman Maildir -R |
Add the virtual user to the MySQL database. You need to enter at least on version of the password either clear text or encrypted.
mysql -ucourier -p[password] courier-mail insert into users values('[virtual_users]@[domain.com], '[encrypted password or blank]','[clear text password or blank]', '[User's Name]',9000,9000,'[location of Maildir]','[Quota in Bytes']); |
example
insert into users values ('blfsuser@linuxfromscratch.org',' ','password','BLFS User',9000,9000,'/home/vmailman/blfsuser',''); |
Setup for Web-based Email
This section will explain how to setup Courier Web-based email system.
You will need to copy the file webmail from /usr/sbin/courier/webmail/webmail to your cgi-bin directory of your Apache server.
cp -a /usr/sbin/courier/webmail/webmail /var/www/cgi-bin |
You will then need to copy the images to a directory under your htdocs directory of your Apache server. The directory needs to be named webmail or you need to specify it during the configure phase with --enable-imageurl=/url.
cp -a /usr/share/courier/sqwebmail/images /var/www/htdocs/webmail |
Setup for Web-based Email
This section will explain how to setup Courier Web-based administration system.
You will need to copy the file webadmin from /usr/sbin/courier/webmail/webmin to your cgi-bin directory of your Apache server.
cp -a /usr/sbin/courier/webmail/webadmin /var/www/cgi-bin |
/etc/courier/webadmin/password
cat > /etc/courier/webadmin/password << "EOF" [password] EOF |
If you are not using SSL on your Apache server, you will need to add /etc/courier/webadmin/unsecureok, so you will be able to use your web based administration tool.
touch /etc/courier/webadmin/unsecureok |
The startup script from the Courier package is the easiest to use. It will automatically create missing data files, and SSL certificates if they are missing. To install the init.d file for Courier you will need to use the follow commands:
cp /usr/src/courier-0.43.2/courier.sysvinit /etc/rc.d/init.d/courier && chmod 755 /etc/rc.d/init.d/courier |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/courier ../rc0.d/K25courier && ln -sf ../init.d/courier ../rc1.d/K25courier && ln -sf ../init.d/courier ../rc2.d/K25courier && ln -sf ../init.d/courier ../rc3.d/S35courier && ln -sf ../init.d/courier ../rc4.d/S35courier && ln -sf ../init.d/courier ../rc5.d/S35courier && ln -sf ../init.d/courier ../rc6.d/K25courier |
The Courier package contains cancelmsg, courier-config, couriermlm, couriertls, deliverquota, dotforward, imapd, lockmail, mailbot, maildirkw, maildrop, mailq, makedat, makemime, mimegpg, preline, reformail, reformime, rmail, sendmail, testmxlookup, courier, courierfilter, courierlogger, couriertcpd, esmtpd, esmtpd-msa, esmtp-ssl, filterctl, imapd, imapd-ssl, makeacceptmailfor, makealiases, makehosteddomains, makepercentrelay, makesmtpacces, makesmtpaccess-msa, makeuserdb, makeuucpneighbors, mksmtpcert, mkimapdcert, mkpop3cert, pop3d, pop3d-ssl, pw2userdb, showconfig, showmodules, userdb, userdbpw, webgpg, authdaemon, authdaemon.mysql, authdaemon.plain, aliascombine, aliascreate, aliasexp, courierd, courierpop3d, courierpop3login, imaplogin, makedatprog, pcpd, submit, submitmkdir, webadmin, webmail, courierdsn, addcr, authend, authstate, courieresmtp, courieresmtpd, courierfax, courierdeliver, courierlocal, courieruucp, perlfilter, dupfilter.
mailbot reads an E-mail message on standard input and creates an E-mail message replying to the original message's sender..
maildrop is a replacement local mail delivery agent that includes a mail filtering language.
reformail program reads a message on standard input, reformats it in some way, and writes the message to standard output.
sendmail command reads an E-mail message and delivers the message to its recipients. This sendmail command is part of the Courier mail server, although it attempts to emulate the behavior of the original sendmail MTA.
testmxlookup lists the names and IP addresses of mail relays that receive mail for the domain. This is useful in diagnosing mail delivery problems..
courier Courier is a modular multi-protocol E-mail transport agent. The courier command is an administrative command, and most of its options are only available to the superuser..
courierfilter commands install or uninstall global mail filters. Global mail filters are used to selectively block unwanted mail.
filterctl commands install or uninstall global mail filters. Global mail filters are used to selectively block unwanted mail.
makeacceptmailfor Build a list of domains to accept mail for from the /etc/courier/esmtpacceptmailfor.dirdirectory.
makealiases Build a list of aliases from /etc/courier/aliases or /etc/courier/aliasdir directories.
makesmtpaccess-msa Build ESMTP server access file from /etc/courier/smtpaccess directory. This esmtp list is for the MSA protocol.
Here you will find many ways to share your machine with the rest of the world or your local network. Before installing any packages in this chapter, you need to be sure you understand what the package does and how to set it up correctly. It might also be helpful to learn about the consequences of an improper setup so that you can analyze the risks.
The BIND package provides a DNS server and client utilities.
Download (HTTP): http://gd.tuwien.ac.at/infosys/servers/isc/bind9/9.2.2/bind-9.2.2.tar.gz
Download (FTP): ftp://ftp.isc.org/isc/bind9/9.2.2/bind-9.2.2.tar.gz
Download size: 4.8 MB
Estimated Disk space required: 90 MB
Estimated build time: 0.89 SBU
Install BIND by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
We will configure BIND to run in a chroot jail as an unprivileged user (named). This configuration is more secure in that a DNS compromise can only affect a few files in the named user's HOME directory.
First we create the unprivileged user and group named:
groupadd -g 200 named && useradd -m -g named -u 200 -s /bin/false named |
Then we set up some files, directories and devices needed by BIND:
cd /home/named && mkdir -p dev etc/namedb/slave var/run && mknod /home/named/dev/null c 1 3 && mknod /home/named/dev/random c 1 8 && chmod 666 /home/named/dev/{null,random} && mkdir /home/named/etc/namedb/pz && cp /etc/localtime /home/named/etc |
Create the named.conf file from which named will read the location of zone files, root name servers and secure DNS keys:
cat > /home/named/etc/named.conf << "EOF" options { directory "/etc/namedb"; pid-file "/var/run/named.pid"; statistics-file "/var/run/named.stats"; }; controls { inet 127.0.0.1 allow { localhost; } keys { rndc_key; }; }; key "rndc_key" { algorithm hmac-md5; secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K"; }; zone "." { type hint; file "root.hints"; }; zone "0.0.127.in-addr.arpa" { type master; file "pz/127.0.0"; }; EOF |
Create a zone file with the following contents:
cat > /home/named/etc/namedb/pz/127.0.0 << "EOF" $TTL 3D @ IN SOA ns.local.domain. hostmaster.local.domain. ( 1 ; Serial 8H ; Refresh 2H ; Retry 4W ; Expire 1D) ; Minimum TTL NS ns.local.domain. 1 PTR localhost. EOF |
Create the root.hints file with the following commands:
Note: Caution must be used to insure no leading spaces in this file.
cat > /home/named/etc/namedb/root.hints << "EOF" . 6D IN NS A.ROOT-SERVERS.NET. . 6D IN NS B.ROOT-SERVERS.NET. . 6D IN NS C.ROOT-SERVERS.NET. . 6D IN NS D.ROOT-SERVERS.NET. . 6D IN NS E.ROOT-SERVERS.NET. . 6D IN NS F.ROOT-SERVERS.NET. . 6D IN NS G.ROOT-SERVERS.NET. . 6D IN NS H.ROOT-SERVERS.NET. . 6D IN NS I.ROOT-SERVERS.NET. . 6D IN NS J.ROOT-SERVERS.NET. . 6D IN NS K.ROOT-SERVERS.NET. . 6D IN NS L.ROOT-SERVERS.NET. . 6D IN NS M.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4 B.ROOT-SERVERS.NET. 6D IN A 128.9.0.107 C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12 D.ROOT-SERVERS.NET. 6D IN A 128.8.10.90 E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10 F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241 G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4 H.ROOT-SERVERS.NET. 6D IN A 128.63.2.53 I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17 J.ROOT-SERVERS.NET. 6D IN A 192.58.128.30 K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129 L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12 M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33 EOF |
The root.hints file is a list of root name servers. This file must be updated periodically with the dig utility. Consult the BIND 9 Administrator Reference Manual for details.
Create the rndc.conf with the following commands:
cat > /etc/rndc.conf << "EOF" key rndc_key { algorithm "hmac-md5"; secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K"; }; options { default-server localhost; default-key rndc_key; }; EOF |
The rndc.conf file contains information for controlling named operations with the rndc utility.
Create or modify resolv.conf to use the new name server with the following commands:
Note: Replace yourdomain.com with your own valid domain name.
cp /etc/resolv.conf /etc/resolv.conf.bak && cat > /etc/resolv.conf << "EOF" search yourdomain.com nameserver 127.0.0.1 EOF |
Set permissions on the chroot jail with the following command:
chown -R named.named /home/named |
Create the BIND boot script:
cat > /etc/rc.d/init.d/bind << "EOF" #!/bin/bash # Begin $rc_base/init.d/bind # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting named..." loadproc /usr/sbin/named -u named -t /home/named -c \ /etc/named.conf ;; stop) echo "Stopping named..." killproc /usr/sbin/named ;; restart) $0 stop sleep 1 $0 start ;; reload) echo "Reloading named..." /usr/sbin/rndc -c /etc/rndc.conf reload ;; status) statusproc /usr/sbin/named ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/bind EOF |
Add the run level symlinks:
chmod 754 /etc/rc.d/init.d/bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc0.d/K49bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc1.d/K49bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc2.d/K49bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc3.d/S22bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc4.d/S22bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc5.d/S22bind && ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc6.d/K49bind |
Now start BIND with the new boot script:
/etc/rc.d/init.d/bind start |
Test out the new BIND 9 installation. First query the local host address with dig:
dig -x 127.0.0.1 |
Now try an external name lookup, taking note of the speed difference in repeated lookups due to the caching. Run the dig command twice on the same address:
dig beyond.linuxfromscratch.org && dig beyond.linuxfromscratch.org |
The BIND package contains dig, host, rndc, rndc-confgen, named-checkconf, named-checkzone, lwresd, named, dnssec-signzone, dnssec-signkey, dnssec-keygen, dnssec-makekeyset and nsupdate.
We will discuss setting up a CVS server using OpenSSH as the remote access method. Other access methods, including :pserver: and :server: will not be used for write access to the CVS repository. The :pserver: method sends clear text passwords over the network and the :server: method is not supported in all CVS ports. Instructions for anonymous, read only CVS access using :pserver: can be found at the end of this section.
Configuration of our CVS server consists of four steps:
Create a new CVS repository with the following commands, logged in as root:
mkdir /cvsroot && chmod 1777 /cvsroot && export CVSROOT=/cvsroot && cvs init |
Import a source module into the repository with the following commands, issued from a user account on the same machine as the CVS repository:
export CVSROOT=/cvsroot && cd sourcedir && cvs import -m "repository test" cvstest vendortag releasetag |
Test access to the CVS repository from the same user account with the following command:
cvs co cvstest |
Test access to the CVS repository from a remote machine using a user account that has ssh access to the CVS server with the following commands:
Note: Replace [servername] with the IP address or host name of the CVS repository machine. You will be prompted for the user's shell account password before CVS checkout can continue.
export CVS_RSH=/usr/bin/ssh && cvs -d:ext:[servername]:/cvsroot co cvstest |
CVS can be set up to allow anonymous read only access using the :pserver: method by logging on as root and executing the following commands:
(grep anonymous /etc/passwd || useradd anonymous -s /bin/false) && echo anonymous: > /cvsroot/CVSROOT/passwd && echo anonymous > /cvsroot/CVSROOT/readers |
If you use inetd, the following command will add the pserver entry to /etc/inetd.conf:
echo "2401 stream tcp nowait root /usr/bin/cvs cvs -f \ --allow-root=/cvsroot pserver" >> /etc/inetd.conf |
Issue a killall -HUP inetd to reread the changed inetd.conf file.
If you use xinetd, the following command will add the pserver entry to /etc/xinetd.conf:
cat >> /etc/xinetd.conf << "EOF" service cvspserver { port = 2401 socket_type = stream protocol = tcp wait = no user = root passenv = PATH server = /usr/bin/cvs server_args = -f --allow-root=/cvsroot pserver } EOF |
Issue a killall -HUP xinetd to reread the changed xinetd.conf file.
Testing anonymous access to the new repository requires an account on another machine that can reach the CVS server via network. No account on the CVS repository is needed. To test anonymous access to the CVS repository log in to another machine as an unprivileged user and execute the following command:
cvs -d:pserver:anonymous@[servername]:/cvsroot co cvstest |
Note: Replace [servername] with the IP address or hostname of the CVS server
mkdir /cvsroot: Create the CVS repository directory.
chmod 1777 /cvsroot: Sticky bit permissions for CVSROOT.
export CVSROOT=/cvsroot: Specify new CVSROOT for all cvs commands.
cvs init: Initialize the new CVS repository.
cvs import -m "repository test" cvstest vendortag releasetag: All source code modules must be imported into the CVS repository before use, with the cvs import command. the -m flags specifies an initial descriptive entry for the new module. the "cvstest" parameter is the name used for the module in all subsequent cvs commands. the "vendortag" and "releasetag" parameters are used to further identify each CVS module and are mandatory whether used or not.
(grep anonymous /etc/passwd || useradd anonymous -s /bin/false): Check for an existing anonymous user and create one if not found.
echo anonymous: > /cvsroot/CVSROOT/passwd : Add the anonymous user to the CVS passwd file, which is unused for anything else in this configuration.
echo anonymous > /cvsroot/CVSROOT/readers: Add the anonymous user to the CVS readers file, a list of users who have read only access to the repository.
The DHCP package contains both the client and server programs for DHCP. dhclient (the client) is useful for connecting your computer to a network which uses DHCP to assign network addresses. dhcpd (the server) is useful for assigning network addresses on your private network.
Download (HTTP): http://gd.tuwien.ac.at/infosys/servers/isc/dhcp/dhcp-3.0pl2.tar.gz
Download (FTP): ftp://ftp.isc.org/isc/dhcp/dhcp-3.0pl2.tar.gz
Download size: 852 KB
Estimated Disk space required: 29.6 MB
Estimated build time: 1.98 SBU
Note: You must have Packet Socket support compiled in the kernel and Socket Filtering either compiled in or as a kernel module.
Install DHCP by running the following commands:
./configure && make && make LIBDIR=/usr/lib INCDIR=/usr/include install |
LIBDIR=/usr/lib INCDIR=/usr/include: This command installs the library and include files in /usr instead of /usr/local.
Information on configuring the DHCP client can be found in Chapter 14.
Note that you only want to start the DHCP server if you want to issue LAN addresses over your network. The DHCP client doesn't need this script to be used. Also note that this script is coded for the eth1 interface, which may need to be modified for your hardware configuration. With that in mind the DHCP init.d script can be created using the following commands.
cat > /etc/rc.d/init.d/dhcp << "EOF" #!/bin/sh # Begin $rc_base/init.d/dhcp # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting DHCP Server..." loadproc dhcpd -q eth1 ;; stop) echo "Stopping DHCP Server..." killproc dhcpd ;; reload) echo "Reloading DHCP Server..." reloadproc dhcpd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc dhcpd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/dhcp EOF chmod 755 /etc/rc.d/init.d/dhcp |
The lease file must exist on startup. The following command will satisfy that requirement:
touch /var/state/dhcp/dhcpd.leases |
The follow commands will create a base configuration file for a DHCP server. There are several options that you may want to add (information that is passed back to the DHCP client) and those are covered in the man pages for dhcp.conf.
cat > /etc/dhcpd.conf << "EOF" default-lease-time 72000; max-lease-time 144000; ddns-update-style ad-hoc; subnet 192.168.5.0 netmask 255.255.255.0 { range 192.168.5.10 192.168.5.240; option broadcast-address 195.168.5.255; option routers 192.168.5.1; } EOF |
All addresses should be changed to meet your circumstance.
Leafnode is an NNTP server designed for small sites to provide a local USENET spool.
Download (HTTP): http://unc.dl.sourceforge.net/sourceforge/leafnode/leafnode-1.9.43.rel.tar.bz2
Download (FTP): ftp://unc.dl.sourceforge.net/pub/sourceforge/leafnode/leafnode-1.9.43.rel.tar.bz2
Download size: 614 KB
Estimated Disk space required: 14 MB
Estimated build time: 0.11 SBU
Create the group and user news, if not present:
groupadd news && useradd -g news news |
Install Leafnode by running the following commands:
./configure --prefix=/usr --localstatedir=/var \ --sysconfdir=/etc/news --with-lockfile=/var/lock/fetchnews.lck && make && make install && ldconfig && make update |
--localstatedir=/var: Change the default spool directory of /usr/var.
--sysconfdir=/etc/news: leafnode reads its configuration data from a file called config which will be created in /etc/news to avoid any potential conflict with other packages.
make update: Create an initial /etc/news/config.example file, which must be renamed to /etc/news/config.
/etc/leafnode/config, /etc/inetd.conf and /etc/xinetd.conf
Leafnode may be configured to use inetd by adding an entry to the /etc/inetd.conf file with the following command:
echo "nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode" \ >> /etc/inetd.conf |
Alternatively, Leafnode may be configured to use xinetd by adding an entry to the /etc/xinetd.conf file with the following command:
cat >> /etc/xinetd.conf << "EOF" service nntp { flags = NAMEINARGS NOLIBWRAP socket_type = stream protocol = tcp wait = no user = news server = /usr/sbin/tcpd server_args = /usr/sbin/leafnode instances = 7 per_source = 3 } EOF |
The /etc/news/config file must be edited to reflect the name of the upstream NNTP provider. Copy the example configuration file to /etc/news/config and save the original for reference:
cp /etc/news/config.example /etc/news/config |
Change the
server = |
The NNTPSERVER environment variable must be set to 127.0.0.1 to prevent news clients from reading news from the upstream feed, add the following to /etc/profile or $HOME/.bash_profile:
export NNTPSERVER=127.0.0.1 |
The Leafnode package contains leafnode-version, leafnode, applyfilter, texpire, checkgroups, fetchnews and newsq.
The OpenSSH package contains ssh clients and the sshd daemon. This is useful for encrypting all traffic over a network.
Download (HTTP): http://sunsite.ualberta.ca/pub/OpenBSD/OpenSSH/portable/openssh-3.7.1p2.tar.gz
Download (FTP): ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.7.1p2.tar.gz
Download size: 780 KB
Estimated Disk space required: 28.6 MB
Estimated build time: 0.32 SBU
OpenSSH runs as two processes when connecting to other computers. The first process is a privileged process and controls the issuance of privileges as necessary. The second process communicates with the network. Additional installation steps are necessary to set up the proper environment which are performed by the following commands:
mkdir /var/empty && chown root:sys /var/empty && groupadd sshd && useradd -c 'sshd privsep' -d /var/empty -g sshd -s /bin/false sshd |
Install OpenSSH by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc/ssh \ --libexecdir=/usr/sbin --with-md5-passwords && make && make install |
--sysconfigdir=/etc/ssh: This prevents the configuration files from going to /usr/etc.
--with-md5-passwords: This is required if you made the changes recommended by the shadowpasswd_plus LFS hint on your SSH server when you installed the Shadow Password Suite or if you access a SSH server that authenticates by user passwords encrypted with md5.
--libexecdir=/usr/sbin: OpenSSH puts programs called by programs in /usr/libexec . sftp-server is a sshd utility and ssh-askpass is a ssh-add utility that is installed as a link to X11-ssh-askpass. Both of these should go in /usr/sbin not /usr/libexec.
/etc/ssh/ssh_config, /etc/ssh/sshd_config
There are no required changes in either of these files. However you may wish to view them to make changes for appropriate security to your system. Configuration information can be found in the man pages for sshd, ssh and ssh-agent
Note that you only want to start the sshd server if you want to be able to ssh into your machine. The ssh client doesn't need this script to be used. Having said that, if you want to run the ssh daemon, the OpenSSH daemon init.d script can be created using the following commands:
cat > /etc/rc.d/init.d/sshd << "EOF" #!/bin/sh # Begin $rc_base/init.d/sshd # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting SSH Server..." loadproc /usr/sbin/sshd ;; stop) echo "Stopping SSH Server..." killproc /usr/sbin/sshd ;; reload) echo "Reloading SSH Server..." reloadproc /usr/sbin/sshd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/sshd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/sshd EOF chmod 755 /etc/rc.d/init.d/sshd |
Create the symbolic links to this file in the relevant rc.d directories with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/sshd ../rc0.d/K30sshd && ln -sf ../init.d/sshd ../rc1.d/K30sshd && ln -sf ../init.d/sshd ../rc2.d/K30sshd && ln -sf ../init.d/sshd ../rc3.d/S30sshd && ln -sf ../init.d/sshd ../rc4.d/S30sshd && ln -sf ../init.d/sshd ../rc5.d/S30sshd && ln -sf ../init.d/sshd ../rc6.d/K30sshd |
The OpenSSH package contains ssh, sshd, ssh-agent, ssh-add, sftp, scp, ssh-keygen, sftp-server and ssh-keyscan.
The rsync package contains the rsync utility. This is useful for synchronizing large file archives over a network.
Download (HTTP): http://rsync.samba.org/ftp/rsync/rsync-2.5.6.tar.gz
Download (FTP): ftp://rsync.samba.org/pub/rsync/rsync-2.5.6.tar.gz
Download size: 571 KB
Estimated Disk space required: 6.4 MB
Estimated build time: 0.65 SBU
For security reasons, running rsync server as an unprivileged user and group is encouraged.
groupadd rsyncd && useradd -c rsyncd -d /home/rsync -g rsyncd -s /bin/false rsyncd |
Install rsync by running the following commands:
./configure --prefix=/usr && make && make install |
/etc/rsyncd.conf
This is a simple download-only configuration. See the rsyncd man-page for additional options (i.e. user authentication).
cat > /etc/rsyncd.conf << "EOF" # This is a basic rsync configuration file # It exports a single module without user authentication. motd file = /home/rsync/welcome.msg use chroot = yes [localhost] path = /home/rsync comment = Default rsync module read only = yes list = yes uid = rsyncd gid = rsyncd EOF |
Note that you only want to start the rsync server if you want to provide a rsync archive on your machine. The rsync client doesn't need this script to be used. Having said that, if you want to run the rsync daemon, the rsync daemon init.d script can be created using the following commands:
cat > /etc/rc.d/init.d/rsyncd << "EOF" #!/bin/sh # Begin $rc_base/init.d/rsyncd # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting RSYNC Server..." loadproc /usr/bin/rsync --daemon --compress ;; stop) echo "Stopping RSYNC Server..." killproc /usr/bin/rsync ;; reload) echo "Reloading RSYNC Server..." reloadproc /usr/bin/rsync ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/bin/rsync ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/rsyncd EOF chmod 755 /etc/rc.d/init.d/rsyncd |
Create the symbolic links to this file in the relevant rc.d directories with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/rsyncd ../rc0.d/K30rsyncd && ln -sf ../init.d/rsyncd ../rc1.d/K30rsyncd && ln -sf ../init.d/rsyncd ../rc2.d/K30rsyncd && ln -sf ../init.d/rsyncd ../rc3.d/S30rsyncd && ln -sf ../init.d/rsyncd ../rc4.d/S30rsyncd && ln -sf ../init.d/rsyncd ../rc5.d/S30rsyncd && ln -sf ../init.d/rsyncd ../rc6.d/K30rsyncd |
rsync is a replacement for rcp (and scp) that has many more features. It uses the "rsync algorithm" which provides a very fast method for remote files into sync. It does this by sending just the differences in the files across the link, without requiring that both sets of files are present at one of the ends of the link beforehand.
The OpenLDAP package provides an open source implementation of the Lightweight Directory Access Protocol.
Download (HTTP): http://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-release/openldap-2.1.22.tgz
Download (FTP): ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.1.22.tgz
Download size: 2.0 MB
Estimated Disk space required: 126 MB
Estimated build time: 3.90 SBU
Install OpenLDAP by running the following commands:
./configure --prefix=/usr --libexecdir=/usr/sbin \ --sysconfdir=/etc --localstatedir=/var \ --disable-debug --enable-ldbm && make depend && make && make test && make install |
--sysconfdir=/etc: Sets the configuration file directory to avoid the default of /usr/etc.
--libexecdir=/usr/sbin: Puts the server executables in /usr/sbin instead of /usr/libexec.
--enable-ldbm: Build slapd with primary database back end using either Berkeley DB or GNU Database Manager.
--disable-debug: Disable debugging code.
make test: Validate correct build of the package.
The only configuration needed for OpenLDAP is to run ldconfig. The LDAP server can be started by /usr/sbin/slapd as described in the man page slapd(8).
Data can be added to the LDAP database via ldapadd. There are other programs that can use the database. For more information see the appropriate man page.
The OpenLDAP package contains ldapadd, ldapcompare, ldapdelete, ldapmodify, ldapmodrdn, ldappasswd, ldapsearch, ldapwhoami, slapadd, slapcat, slapd, slapindex, slappasswd, slurpd, liblber and libldap.
ldapcompare opens a connection to an LDAP server, binds and performs a compare using specified parameters.
ldapsearch opens a connection to an LDAP server, binds and performs a search using specified parameters.
slapadd is used to add entries specified in LDAP Directory Interchange Format (LDIF) to a slapd database.
The Samba package provides file and print services to SMB/CIFS clients.
Download (HTTP): http://us1.samba.org/samba/ftp/samba-2.2.8a.tar.bz2
Download size: 4.4 MB
Estimated Disk space required: 43 MB
Estimated build time: 5.40 SBU
Install Samba by running the following commands:
cd source && mkdir -p /etc/samba/private && mkdir -p /var/cache/samba && ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-piddir=/var/run \ --with-fhs \ --with-smbmount && make && make install && rm -rf /usr/private && echo "swat 901/tcp" >> /etc/services && echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" >> \ /etc/inetd.conf |
mkdir -p /etc/samba/private mkdir -p /var/cache/samba |
--prefix=/usr: Sets the prefix for almost all the file paths to /usr.
--sysconfdir=/etc: Sets the configuration file directory to avoid the default of /usr/etc.
--localstatedir=/var: Sets the variable data directory to avoid the default of /usr/var.
--with-fhs: Assigns all other file paths in a manner compliant with the Filesystem Hierarchy Standard (FHS).
--with-smbmount: Orders the creation of an extra binary for use by the mount command so that mounting remote SMB (windows) shares becomes no more complex than mounting remote NFS shares.
rm -rf /usr/private: Removes a directory erroneously created by source/scripts/installbin.sh during the make install.
We will configure one Samba server (SAMBABOX) to act as a primary domain controller, as well as configure one domain client running Windows 2000 Server(WIN2KBOX) and acting as a member server of the domain. Detailed instructions will be given for adding WIN2KBOX to the domain due to the extra steps necessary. Instructions for adding Windows 95/98/XP clients can be found in the newly installed documentation by pointing a web browser to:
file:///usr/share/samba/swat/using_samba/ch03_01.html#ch03-55770. |
/etc/samba/smb.conf, /etc/rc.d/init.d/samba
First we set up some directories needed by Samba :
mkdir /var/lib/samba && mkdir /var/lib/samba/netlogon && mkdir /var/lib/samba/ntprofile && mkdir /var/lib/samba/profiles && chmod -R 1777 /var/lib/samba |
And the Samba configuration file:
cat > /etc/samba/smb.conf << "EOF" [global] netbios name = SAMBABOX workgroup = DOMAIN01 os level = 64 preferred master = yes domain master = yes local master = yes security = user encrypt passwords = yes domain logons = yes log file = /var/log/log.%m log level = 1 logon path = \\%N\home\%u logon drive = H: logon home = \\homeserver\%u logon script = logon.cmd [netlogon] path = /var/lib/samba/netlogon read only = yes write list = ntadmin [profiles] path = /var/lib/samba/ntprofile read only = no create mask = 0600 directory mask = 0700 ; World writable share for testing [tmp] comment = Temporary file space path = /tmp read only = no public = yes [home] comment = Users' home directories path = /home read only = no public = no EOF |
Now add the machine trust account for WIN2KBOX:
/usr/sbin/useradd -g 100 -d /dev/null -c \ "machine nickname" -s /bin/false win2kbox$ && passwd -l win2kbox$ && smbpasswd -a -m win2kbox |
Create the Samba boot script:
cat > /etc/rc.d/init.d/samba << "EOF" #!/bin/bash # Begin $rc_base/init.d/samba # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting nmbd..." loadproc /usr/sbin/nmbd -D echo "Starting smbd..." loadproc /usr/sbin/smbd -D ;; stop) echo "Stopping smbd..." killproc /usr/sbin/smbd echo "Stopping nmbd..." killproc /usr/sbin/nmbd ;; reload) echo "Reloading smbd..." reloadproc /usr/sbin/smbd echo "Reloading nmbd..." reloadproc /usr/sbin/nmbd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/nmbd statusproc /usr/sbin/smbd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/samba EOF |
Add the run level symlinks:
chmod 754 /etc/rc.d/init.d/samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc0.d/K48samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc1.d/K48samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc2.d/K48samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/S24samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc4.d/S24samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc5.d/S24samba && ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc6.d/K48samba |
Now, we'll use our new boot script to start Samba :
/etc/rc.d/init.d/samba start |
We have to add the SAMBABOX root account to the Samba user list first in order to join WIN2KBOX to the DOMAIN01 domain:
smbpasswd -a root |
After starting Samba and adding root to the Samba user list, the first machine we'll join to DOMAIN01 will be WIN2KBOX, the Windows 2000 Server box we created the machine trust account for. On WIN2KBOX:
1. Right click on My Computer. 2. Click on Properties. 3. Click on the Network Identification notebook tab. 4. Click on the Properties button. 5. In the Computer Name: edit field enter WIN2KBOX. 6. Click on the Domain: radio button and enter DOMAIN01 in the edit field and click OK. 7. When presented with the Domain Username And Password dialog box, enter root and root's password on SAMBABOX and click OK. 8. After the machine trust is negotiated, click the OK button in the dialog box welcoming you to the DOMAIN01 domain. 9. Click OK in the reboot reminder dialog box. 10. Click OK to close the System Properties window. 11. Click Yes to reboot WIN2KBOX. |
Before logging on to WIN2KBOX, we will create a new user with the following commands:
useradd -m win2kuser01 && passwd win2kuser01 && smbpasswd -a win2kuser01 |
Now we will log on the domain as our newly created user as follows:
1. Press Ctrl-Alt-Del to bring up the Log On to Windows dialog box. 2. Enter the win2kuser01 name and password. 3. Select DOMAIN01 from the Log on to: combination box and click OK. |
Add the swat entry to /etc/serviceswith the following command:
echo "swat 901/tcp" >> /etc/services |
If inetd is used, the following command will add the swat entry to /etc/inetd.conf:
echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" \ >> /etc/inetd.conf |
If xinetd is used, the following command will add the swat entry to /etc/xinetd.conf:
cat >> /etc/xinetd.conf << "EOF" service swat { port = 901 socket_type = stream wait = no only_from = 127.0.0.1 user = root server = /usr/sbin/swat log_on_failure += USERID } EOF |
The Samba Web Administration Tool, SWAT, can be launched with the following command on SAMBABOX:
lynx http://localhost:901 |
Note: Be sure inetd is running, and issue a killall -HUP inetd before starting SWAT.
The Lynx browser is used in this demonstration, but is not necessary.
cat > /etc/samba/smb.conf << "EOF" : Create a default Samba configuration file. This configuration will allow Samba to act as a Primary Domain Controller for a Microsoft Windows based network. If this is not desired, a simpler default smb.conf file is bundled with the Samba distribution. See the samba2.2.8a/examples/smb.conf.default file. Primary Domain Controller configuration is slightly more complicated than ordinary member server configuration, so instructions for PDC configuration will be given here.
cat > /etc/rc.d/init.d/samba << "EOF": Create the Samba boot script, used to start and stop Samba automatically on machine startup and shutdown.
/usr/sbin/useradd -g 100 -d /dev/null -c \ "Win2k Server" -s /bin/false win2kbox$ |
echo "swat 901/tcp" >> /etc/services: Register the swat service to run on port 901.
echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" >> /etc/inetd.conf: Instruct inetd where to find and how to run swat.
ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/S600samba etc.: Create the Samba boot scripts, used to start and stop Samba automatically on machine startup and shutdown.
The Samba package contains make_smbcodepage, make_unicodemap, mount.smbfs, nmbd, nmblookup, rpcclient, smbcacls, smbclient, smbcontrol, smbd, smbpasswd, smbspool, smbstatus, swat, testparm, testprns, wbinfo and winbindd.
make_smbcodepage converts text descriptions of code pages to binary code page files and vice versa.
make_unicodemap converts text Unicode map files to binary, for use in mapping characters to 16 bit Unicode.
xinetd is the eXtended InterNET services Daemon, a secure replacement for inetd.
Download (HTTP): http://www.xinetd.org/xinetd-2.3.12.tar.gz
Download size: 285 KB
Estimated Disk space required: 6.5 MB
Estimated build time: 0.14 SBU
Install xinetd by running the following commands:
./configure --prefix=/usr && make && make install |
./configure --prefix=/usr: Change the default installation directory of /usr/local.
Create the xinetd.conf file with the following commands:
cp /etc/xinetd.conf /etc/xinetd.conf.bak |
Insure the path to all daemons is /usr/sbin, rather than the default path of /usr/etc:
sed -e 's/etc/sbin/g' xinetd/sample.conf > /etc/xinetd.conf |
The format of the /etc/xinetd.conf is documented in the xinetd.conf man page. Further information can be found at http://www.xinetd.org.
Create the xinetd boot script:
cat > /etc/rc.d/init.d/xinetd << "EOF" #!/bin/bash # Begin $rc_base/init.d/xinetd # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting xinetd..." loadproc /usr/sbin/xinetd ;; stop) echo "Stopping xinetd..." killproc /usr/sbin/xinetd ;; reload) echo "Reloading xinetd..." killall -HUP xinetd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/xinetd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/xinetd EOF chmod 754 /etc/rc.d/init.d/xinetd |
Add the run level symlinks:
ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc0.d/K49xinetd && ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc1.d/K49xinetd && ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc2.d/K49xinetd && ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S23xinetd && ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc4.d/S23xinetd && ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc5.d/S23xinetd && ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc6.d/K49xinetd |
Now, we'll use our new boot script to start xinetd:
/etc/rc.d/init.d/xinetd start |
Checking the /var/log/daemon.log file should prove quite entertaining. This file may contain entries similar to the following:
Aug 22 21:40:21 dps10 xinetd[2696]: Server /usr/sbin/in.rlogind is not executable [line=29] Aug 22 21:40:21 dps10 xinetd[2696]: Error parsing attribute server - DISABLING SERVICE [line=29] Aug 22 21:40:21 dps10 xinetd[2696]: Server /usr/sbin/in.rshd is not executable [line=42] |
These errors are due to the fact that we don't have most of the servers that xinetd is trying to control installed yet.
This chapter includes databases that range from single-user read/write to industrial database servers with transaction support. Generally, you will be sent here to satisfy dependencies to other applications although building a SQL server on a base LFS system is entirely possible.
The Berkeley DB package contains programs and utilities used by many other applications for database related functions.
Download (HTTP): http://www.sleepycat.com/update/snapshot/db-4.1.25.tar.gz
Download (FTP): ftp://ftp.us.xemacs.org/pub/xemacs/aux/db-4.1.25.tar.gz
Download size: 3 MB
Estimated Disk space required: 27 MB
Estimated build time: 1.22 SBU
Install Berkeley DB by running the following commands:
cd build_unix && ../dist/configure --prefix=/usr \ --enable-compat185 \ --enable-cxx && make && make docdir=/usr/share/doc/db-4.1.25 install |
Note: If you wish to enable Java support in Berkeley DB-4.1.25, add --enable-java to the configure options. Java support is needed if you plan to use system installed Berkeley DB when compiling OpenOffice.
cd build_unix && ../dist/configure --prefix=/usr --enable-compat185: This replaces the normal ./configure command as Berkeley DB comes with the various build directories for different platforms.
make docdir=/usr/share/doc/db-4.1.25 install: This installs the documentation in the correct place.
If you recompile Perl after installing Berkeley DB-4.1.25 you will need to apply the perl-5.8.0-db-4.1.patch patch available at http://downloads.linuxfromscratch.org/blfs-patches.
The Berkeley DB package contains db_archive, db_checkpoint, db_deadlock, db_dump, db_load, db_printlog, db_recover, db_stat, db_upgrade and db_verify.
The Berkeley DB package contains version 3.3.11 of the Berkeley Database.
Download (HTTP): http://www.sleepycat.com/update/snapshot/db-3.3.11.tar.gz
Download (FTP): ftp://ftp.pu.edu.tw/Unix/Database/BerkeleyDB/db-3.3.11.tar.gz
Download size: 2.3 MB
Estimated Disk space required: 20.3 MB
Estimated build time: 0.80 SBU
Install Berkeley DB by running the following commands:
cd build_unix && ../dist/configure --prefix=/opt/db-3.3 --enable-compat185 && make && make docdir=/opt/db-3.3/doc/Berkeley-DB install && cd /opt/db-3.3/lib/ && rm -f libdb.so && for i in $(ls); do mv $i /usr/lib; ln -sf /usr/lib/$i; done && cd /opt/db-3.3/include/ && sed 's/^DB185/DB/' db_185.h > db_185.h.new && mv db_185.h.new db_185.h && ln -nsf /opt/db-3.3/include /usr/include/db3 |
sed 's/^DB185/DB/' /usr/include/db_185.h > /usr/include/db_185.h.new: Change the DB185 database pointer to DB.
The Berkeley DB package contains db_archive, db_checkpoint, db_deadlock, db_dump, db_load, db_printlog, db_recover, db_stat, db_upgrade and db_verify.
MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon and many different client programs and libraries.
Download (HTTP): http://mysql.he.net/Downloads/MySQL-4.0/mysql-4.0.15.tar.gz
Download (FTP): ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-4.0/mysql-4.0.15.tar.gz
Download size: 12 MB
Estimated Disk space required: 105 MB
Estimated build time: 4.31 SBU
For security reasons, running the server as an unprivileged user and group is strongly encouraged:
groupadd mysql && useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql |
Build and install MySQL by running the following commands:
cp configure configure.old && sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure && ./configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ --localstatedir=/var/lib/mysql \ --enable-thread-safe-client \ --enable-local-infile \ --without-debug \ --without-bench && make && make install |
sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure: This sed is used to disable the mysql test suite.
There are several default configurations file available in /usr/share/mysql which you can use.
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf |
We can now install a database and change the ownership to the unprivileged user and group.
mysql_install_db chown -R mysql:mysql /var/lib/mysql |
Further configuration requires that the mysql server be running:
mysqld_safe --user=mysql 2>&1 >/dev/null & |
A default installation does not setup a password for the administrator. So here we will login and set one. We strongly suggest changing 'new-password' to your own.
mysql -uroot mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 3.23.51-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> UPDATE user SET password=password('new-password') WHERE user='root'; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> EXIT; bye |
Now that we are done with the configuration of the server, we can shut it down.
kill `pidof -x mysqld_safe mysqld` |
To automate the running of MySQL, use the following command to create the init.d script:
cat > /etc/rc.d/init.d/mysql << "EOF" #!/bin/bash # Begin $rc_base/init.d/ # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting MySQL daemon..." /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null & evaluate_retval ;; stop) echo "Stopping MySQL daemon..." killproc mysqld ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/mysqld ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/ EOF chmod 755 /etc/rc.d/init.d/mysql |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/mysql ../rc0.d/K26mysql && ln -sf ../init.d/mysql ../rc1.d/K26mysql && ln -sf ../init.d/mysql ../rc2.d/K26mysql && ln -sf ../init.d/mysql ../rc3.d/S34mysql && ln -sf ../init.d/mysql ../rc4.d/S34mysql && ln -sf ../init.d/mysql ../rc5.d/S34mysql && ln -sf ../init.d/mysql ../rc6.d/K26mysql |
The MySQL package contains comp_err, isamchk, isamlog, msql2mysql, my_print_defaults, myisamchk, myisamlog, myisampack, mysql, mysql_config, mysql_convert_table_format, mysql_explain_log, mysql_find_rows, mysql_fix_extensions, mysql_fix_privilege_tables, mysql_install, mysql_install_db, mysql_secure_installation, mysql_setpermission, mysql_tableinfo, mysql_waitpid, mysql_zap, mysqlacess, mysqladmin, mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, mysqld_safe, mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, mysqlmanager-pwgen, mysqlmanagerc, mysqlshow, mysqltest, pack_isam, perror, replace, resolve_stack_dump, resolveip, libdbug, libheap, libmerge, libmyisam, libmyisammrg, libmysqlclient, libmystrings, libmysys, libnisam and libvio.
PostgreSQL is an advanced object-relational database management system (ORDBMS), derived from the Berkeley Postgres database management system.
Download (FTP): ftp://ftp8.us.postgresql.org/pub/pgsql/source/v7.3.4/postgresql-7.3.4.tar.gz
Download size: 11 MB
Estimated Disk space required: 86 MB
Estimated build time: 1.74 SBU
Install PostgreSQL with the following commands:
./configure --prefix=/usr && make && make install |
Initialize a database cluster with the following commands:
mkdir -p /var/pgsql/data && useradd -d /var/pgsql/data postgres && chown postgres /var/pgsql/data && su - postgres -c '/usr/bin/initdb -D /var/pgsql/data' |
Start the database server with the following command:
su - postgres -c '/usr/bin/postmaster -D /var/pgsql/data > \ /var/pgsql/data/logfile 2>&1 &' |
Now we can create a database and verify the installation:
su - postgres -c '/usr/bin/createdb test' echo "create table t1 ( name varchar(20), state_province varchar(20) );" \ | (su - postgres -c '/usr/bin/psql test ') echo "insert into t1 values ('Billy', 'NewYork');" \ | (su - postgres -c '/usr/bin/psql test ') echo "insert into t1 values ('Evanidus', 'Quebec');" \ | (su - postgres -c '/usr/bin/psql test ') echo "insert into t1 values ('Jesse', 'Ontario');" \ | (su - postgres -c '/usr/bin/psql test ') echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test') |
useradd -d /var/pgsql/data postgres: Add an unprivileged user to run the database server. Running the server as root is dangerous, and moreover simply will not work.
su - postgres -c '/usr/bin/initdb -D /var/pgsql/data': Initialize the database tablespace. This command may not be executed by root.
su - postgres -c '/usr/bin/postmaster -D /var/pgsql/data > /var/pgsql/data/logfile 2>&1 &': Start the database server. User postgres must execute this command as well.
createdb test, create table t1 , insert into t1 values..., select * from t1: Create a database, add a table to it, insert some rows into the table and select them to verify that the installation is working properly.
$PGDATA/pg_ident.con, $PGDATA/pg_hba.conf, $PGDATA/postgresql.conf
The PGDATA environment variable is used to distinguish database clusters from one another by setting it to the value of the directory which contains the cluster desired. The three configuration files exist in every PGDATA/ directory. Details on the format of the files and the options that can be set in each can be found in file:///usr/share/doc/postgresql/html/index.html.
Create the boot script with the following:
cat > /etc/rc.d/init.d/postgresql << "EOF" #!/bin/bash # Begin $rc_base/init.d/postgresql # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting PostgreSQL daemon..." su - postgres -c '/usr/bin/pg_ctl start -W -D /var/pgsql/data \ -l /var/pgsql/data/logfile -o "-i" ' evaluate_retval ;; stop) echo "Stopping PostgreSQL daemon..." /usr/bin/pg_ctl stop -m smart -D /var/pgsql/data evaluate_retval ;; restart) $0 stop sleep 1 $0 start ;; status) /usr/bin/pg_ctl status -D /var/pgsql/data ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/ EOF chmod 755 /etc/rc.d/init.d/postgresql |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/postgresql ../rc0.d/K26postgresql && ln -sf ../init.d/postgresql ../rc1.d/K26postgresql && ln -sf ../init.d/postgresql ../rc2.d/K26postgresql && ln -sf ../init.d/postgresql ../rc3.d/S34postgresql && ln -sf ../init.d/postgresql ../rc4.d/S34postgresql && ln -sf ../init.d/postgresql ../rc5.d/S34postgresql && ln -sf ../init.d/postgresql ../rc6.d/K26postgresql |
The PostgreSQL package contains clusterdb, createdb, createlang, createuser, dropdb, droplang, dropuser, ecpg, initdb, initlocation, ipcclean, pg_config, pg_controldata, pg_ctl, pg_dump, pg_dumpall, pg_encoding, pg_id, pg_resetxlog, pg_restore, postgres, postmaster, psql, vacuumdb, libecpg, libpq and various charset modules.
pg_controldata returns information initialized during initdb, such as the catalog version and server locale.
pg_dump dumps database data and metadata into scripts which are used to recreate the database.
This chapter includes applications that respond to requests originating from the Internet. Specifically covered are HTTP requests and FTP requests.
The Apache package contains an open-source HTTP server. It is useful for creating local intranet web sites or running huge web serving operations.
Download (HTTP): http://www.apache.org/dist/httpd/httpd-2.0.47.tar.gz
Download (FTP): ftp://ftp.tux.org/pub/net/apache/dist/httpd/httpd-2.0.47.tar.gz
Download size: 5.9 MB
Estimated Disk space required: 95 MB
Estimated build time: 1.31 SBU
Berkeley DB-4.1.25 or GDBM-1.8.3, OpenSSL-0.9.7c, OpenLDAP-2.1.22 and Lynx-2.8.4
For security reasons, running the server as an unprivileged user and group is strongly encouraged.
groupadd apache && useradd -c apache -d /dev/null -g apache -s /bin/false apache |
The following patch will define the layout of destination directories and, among them, the build directory at /usr/lib/apache/build. This will allow the modules added to Apache to be configured without errors. Apply the patch:
patch -Np1 -i ../httpd-2.0.47-config.patch |
Build and install Apache by running the following commands:
./configure --enable-layout=LFS \ --enable-mods-shared=all && make && make install |
--enable-mods-shared=all: We want modules to be compiled and used as Dynamic Shared Objects (DSOs) so they can be included and excluded from the server using the run-time configuration directives.
The main configuration file is called httpd.conf. See http://httpd.apache.org/docs-2.0/configuring.html for detailed instructions on customizing your Apache HTTP server.
To automate the running of Apache, use the following command to create the init.d script:
cat > /etc/rc.d/init.d/apache << "EOF" #!/bin/bash source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting Apache daemon..." /usr/sbin/apachectl -k start evaluate_retval ;; stop) echo "Stopping Apache daemon..." /usr/sbin/apachectl -k stop evaluate_retval ;; restart) echo "Restarting Apache daemon..." /usr/sbin/apachectl -k restart evaluate_retval ;; status) statusproc /usr/sbin/httpd ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac EOF chmod 755 /etc/rc.d/init.d/apache |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/apache ../rc0.d/K28apache && ln -sf ../init.d/apache ../rc1.d/K28apache && ln -sf ../init.d/apache ../rc2.d/K28apache && ln -sf ../init.d/apache ../rc3.d/S32apache && ln -sf ../init.d/apache ../rc4.d/S32apache && ln -sf ../init.d/apache ../rc5.d/S32apache && ln -sf ../init.d/apache ../rc6.d/K28apache |
The Apache package provides ab, apachectl, apr-config, apu-config, apxs, checkgid, dbmmanage, htdbm, htdigest, htpasswd, httpd, instdso.sh, logresolve, rotatelogs, libapr, libaprutil and various modules.
apachectl is a front end to the Apache HTTP server which is designed to help the administrator control the functioning of the Apache httpd daemon.
dbmmanage is used to create and update the DBM format files used to store usernames and password for basic authentication of HTTP users.
htdigest is used to create and update the flat-files used to store usernames, realm and password for digest authentication of HTTP users.
htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users.
PHP is the PHP Hypertext Preprocessor. Primary used in dynamic web sites, it allows for programming code to be directly embedded into the HTML code.
Download (HTTP): http://us2.php.net/distributions/php-4.3.3.tar.bz2
Download (FTP): ftp://ftp.isu.edu.tw/pub/Unix/Web/PHP/distributions/php-4.3.3.tar.bz2
Download size: 3.5 MB
Estimated Disk space required: 79 MB
Estimated build time: 1.24 SBU
OpenSSL-0.9.7c, bc-1.06, cURL-7.10.7, Berkeley DB-4.1.25, libjpeg-6b, libpng-1.2.5, FreeType-2.1.5, MySQL-4.0.15 and Apache-2.0.47
GDBM-1.8.3, Sendmail-8.12.10, pcre-4.3, PostgreSQL-7.3.4, readline-4.3, libtiff-3.5.7, expat-1.95.6 and GMP-4.1.2
Install PHP by running the following commands:
./configure --prefix=/usr --with-apxs2=/usr/sbin/apxs \ --with-config-file-path=/etc --with-openssl=/usr \ --with-zlib=/usr --enable-bcmath --with-bz2=/usr \ --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr \ --enable-gd-native-ttf --with-db4 --with-png-dir=/usr \ --with-freetype-dir=/usr --with-gettext --with-mysql=/usr \ --with-ncurses --sysconfdir=/etc && make && make install && cp php.ini-dist /etc/php.ini |
Note: PHP has many more configure options that will enable support for certain things. You can use ./configure --help to see a full list of the available options. Also, use of the PHP web site is highly recommended, as their online docs are very good.
The ProFTPD package contains a secure and highly configurable FTP daemon. This is useful for serving large file archives over a network.
Download (FTP): ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.8p.tar.bz2
Download size: 729 KB
Estimated Disk space required: 6.3 MB
Estimated build time: 0.26 SBU
For security reasons, running ProFTPD as an unprivileged user and group is encouraged.
groupadd proftpd && useradd -c proftd -d /home/ftp -g proftpd -s /bin/false proftpd |
Install ProFTPD by running the following commands:
install_user=proftpd install_group=proftpd \ ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var && make && make install |
install_user=proftpd install_groud=proftpd : Specify the user and group identity for ProFTPD.
--prefix=/usr : This installs ProFTPD in /usr instead of /usr/local.
--sysconfigdir=/etc : This prevents the configuration files from going to /usr/etc.
--localstatedir=/var : This uses /var instead of /usr/var for lock and log files.
/etc/proftpd.conf
This is a simple, download-only sample configuration. See the ProFTPD documentation in /usr/share/doc/proftpd and consult the website at http://www.proftpd.net/ for example configurations.
cat > /etc/proftpd.conf << "EOF" # This is a basic ProFTPD configuration file # It establishes a single server and a single anonymous login. ServerName "ProFTPD Default Installation" ServerType standalone DefaultServer on # Port 21 is the standard FTP port. Port 21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022 # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd) MaxInstances 30 # Set the user and group that the server normally runs at. User proftpd Group proftpd # Normally, we want files to be overwritable. <Directory /*> AllowOverwrite on </Directory> # A basic anonymous configuration, no upload directories. <Anonymous ~proftpd> User proftpd Group proftpd # We want clients to be able to login with "anonymous" as well as "proftpd" UserAlias anonymous proftpd # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message # Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous> EOF |
cat > /etc/rc.d/init.d/proftpd << "EOF" #!/bin/sh # Begin $rc_base/init.d/proftpd # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting FTP Server..." loadproc /usr/sbin/proftpd ;; stop) echo "Stopping FTP Server..." killproc /usr/sbin/proftpd ;; reload) echo "Reloading FTP Server..." reloadproc /usr/sbin/proftpd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/proftpd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/proftpd EOF chmod 755 /etc/rc.d/init.d/proftpd |
Create the symbolic links to this file in the relevant rc.d directories with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/proftpd ../rc0.d/K50proftpd && ln -sf ../init.d/proftpd ../rc1.d/K50proftpd && ln -sf ../init.d/proftpd ../rc2.d/K50proftpd && ln -sf ../init.d/proftpd ../rc3.d/S50proftpd && ln -sf ../init.d/proftpd ../rc4.d/S50proftpd && ln -sf ../init.d/proftpd ../rc5.d/S50proftpd && ln -sf ../init.d/proftpd ../rc6.d/K50proftpd |
This chapter contains a graphical user environment.
XFree86 is a freely redistributable open-source implementation of the X Window System. XFree86 provides a client/server interface between display hardware (the mouse, keyboard, and video displays) and the desktop environment while also providing both the windowing infrastructure and a standardized application interface (API).
Download (FTP): ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/
Download size: 64 MB
Estimated Disk space required: 633 MB
Estimated build time: 13.8 SBU
The following packages are included in the XFree86 package, however they are updated more often than the XFree86 package and are highly recommended: expat-1.95.6, FreeType-2.1.5 and Fontconfig-2.2.1
Note: If you choose to not install these separate packages, the host.def file below will have to be modified to instruct XFree86 build them.
There are several files that need to be fetched from the download location:
X430src-1.tgz
X430src-2.tgz
X430src-3.tgz
X430src-4.tgz
X430src-5.tgz
X430src-6.tgz
X430src-7.tgz
You should also download the patch file: ftp://ftp.xfree86.org/pub/XFree86/4.3.0/fixes/4.3.0-4.3.0.1.diff.gz
The first three packages are the XFree86 programs, the fourth and fifth are fonts, the sixth is normal documentation, and the seventh is hardcopy documentation. There are also two packages doctools-1.3.1.tgz, which contain programs to regenerate hardcopy documentation, and utils-1.1.0.tgz, which contain GNU TAR and zlib which are already installed on an LFS system.
To check your downloads for integrity, download the SUMS.md5sum file. Then:
md5sum X430src* > md5sums && diff md5sums SUMS.md5sum |
The fixes subdirectory also has a SUMS.md5sum and this can be checked against the patch file:
md5sum 4.3.0-4.3.0.1.diff.gz |
After unpacking the X430src-?.tgz files, change to the xc directory and run:
gunzip 4.3.0-4.3.0.1.diff.gz && patch -Np1 -i 4.3.0-4.3.0.1.diff |
If you have an Intel P6 (Pentium Pro, Pentium II and later) it is recommended that you compile MTRR (Memory Type Range Registers) support into the kernel. The kernel can map Cyrix and AMD CPUs to the MTRR interface so selecting this option is useful for those processors also. This option is found in the "Processor type and features" menu. It can increase performance of image write operations 2.5 times or more on PCI or AGP video cards.
In the "Character Devices" section, enable AGP Support and select the chipset support on your motherboard. If you do not know the chipset, you may select all the chip types at the expense of extra kernel size. You can usually determine your motherboard's chipset by doing:
cat /proc/pci |
In the "Character Devices" section, disable Direct Rendering Manager unless you have a Direct Rendering Infrastructure (DRI) supported video card. A complete list of DRI supported video cards can be found at http://dri.sourceforge.net in the Status section. Currently, supported cards include those from 3dfx (Voodoo, Banshee), 3Dlabs, ATI (Rage Pro, Rage 128, Radeon 7X00, Radeon 2), Intel (i810, i815), and Matrox (G200, G400, G450). Additionally NVidia provides their own closed source binary drivers. If you do enable DRI here, make sure you select the video card(s) you want to support as a module.
If you made any changes to the kernel configuration, recompile with
make dep && make bzImage && make modules && make modules_install |
Copy /usr/src/linux/arch/i386/boot/bzImage and /usr/src/linux/System.map to /boot, edit /etc/lilo.conf appropriately and run lilo. If you use grub, edit /boot/grub/grub.conf and add the new kernel to the boot menu.
Note: If you build XFree86 in a chroot environment, make sure the kernel version of the base system and the target system are the same. This is especially important if you enabled DRI support as a module as instructed above.
Although XFree86 will compile without a host.def file, the following file is recommended for customizing the installation. Start from the xc directory.
Note: The host.def file is a C file, not the usual configuration file. If you make any changes, be sure the comment characters (/* and */) are balanced. Most of the entries in the file below are commented out with the default settings shown.
cat > config/cf/host.def << "EOF" /* Begin XFree86 host.def file */ /* System Related Information. If you read and configure only one * section then it should be this one. The Intel architecture defaults are * set for a i686 and higher. Axp is for the Alpha architecture and Ppc is * for the Power PC. Note that there have been reports that the Ppc * optimization line causes segmentation faults during build. If that * happens, try building without the DefaultGcc2PpcOpt line. **************/ /* #define DefaultGcc2i386Opt -O2 -fomit-frame-pointer -march=i686 */ /* #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 */ /* #define DefaultGcc2PpcOpt -O2 -mcpu=750 */ /* The following definitions are normally set properly by XFree86's scripts. * You can uncomment them if you want to make sure. ************************/ /* #define HasMTRRSupport YES */ /* Enabled in kernel see kernel docs*/ /* #define HasMMXSupport NO */ /* Any i586 or above */ /* #define HasKatmaiSupport NO */ /* PIII SSE instructions */ /* #define Has3DNowSupport NO */ /* AMD instructions */ /* This setting reduces compile time a little by omitting rarely used input * devices. You can find the complete list in config/cf/xfree86.cf ********/ #define XInputDrivers mouse void /* VIDEO DRIVERS ***********************************************************/ /* If you are sure you only want the drivers for one or a few video cards, * you can delete the drivers you do not want. *****************************/ #define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \ neomagic i740 tdfx savage \ cirrus vmware tseng trident chips apm \ GlideDriver fbdev i128 nsc \ ati i810 AgpGartDrivers DevelDrivers ark \ cyrix siliconmotion \ vesa vga \ dummy XF86OSCardDrivers XF86ExtraCardDrivers /* FONT SERVER AND LIBRARY SETTINGS ****************************************/ /* These settings are the defaults ***************************************/ /* #define BuildFontServer YES */ /* For Ghostscript Print Server*/ /* #define SharedLibFont YES */ /* #define CompressAllFonts YES */ /* #define GzipFontCompression YES */ /* These settings ensure we use our libraries ******************************/ #define HasFreetype2 YES #define HasFontconfig YES #define HasExpat YES #define HasLibpng YES #define HasZlib YES /* The font path can be redefined in the XF86Config file *******************/ /* #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/75dpi/,\ $(FONTDIR)/100dpi/,$(FONTDIR)/Type1,$(FONTDIR)/local,\ $(FONTDIR)/TrueType,$(FONTDIR)/CID,$(FONTDIR)/Speedo */ /* INTERNATIONAL FONTS. Change to YES if you need any of them. These are * the defaults. ***********************************************************/ /* #define BuildCyrillicFonts NO */ /* #define BuildArabicFonts NO */ /* #define BuildISO8859_6Fonts NO */ /* #define BuildGreekFonts NO */ /* #define BuildISO8859_7Fonts NO */ /* #define BuildHebrewFonts NO */ /* #define BuildISO8859_8Fonts NO */ /* #define BuildKOI8_RFonts NO */ /* #define BuildJapaneseFonts NO */ /* #define BuildJISX0201Fonts NO */ /* #define BuildKoreanFonts NO */ /* #define BuildChineseFonts NO */ /* DOCUMENTATION SETTINGS **************************************************/ /* These setting are the defaults. *****************************************/ /* #define BuildLinuxDocHtml NO */ /* X Docs in Html format */ /* #define BuildLinuxDocPS NO */ /* PostScript format */ /* #define BuildAllSpecsDocs NO */ /* Various docs */ /* #define BuildHtmlManPages NO */ /* GENERAL SETTINGS: You generally want to leave these alone when * building X on an LFS system *********************************************/ #define GccWarningOptions -pipe /* Speed up compiles */ #define TermcapLibrary -lncurses #define XprtServer YES /* Needed by realplayer */ #define XnestServer YES #define XAppLoadDir EtcX11Directory/app-defaults #define VarLibDir /var/lib #define XFree86Devel NO #define FSUseSyslog YES #define ThreadedX YES #define HasPam NO #define SystemManDirectory /usr/share/man /* Instead of /usr/man */ #define HasLibCrypt YES #define InstallXinitConfig YES #define InstallXdmConfig YES #define ForceNormalLib YES #define BuildSpecsDocs NO /* End XFree86 host.def file */ EOF |
Edit the file for your hardware and desires.
Install XFree86 by running the following commands:
WORLDOPTS="" make World 2>&1 | tee xfree-compile.log && make install && make install.man && ln -sf /usr/X11R6/bin /usr/bin/X11 && ln -sf /usr/X11R6/lib/X11 /usr/lib/X11 && ln -sf /usr/X11R6/include/X11 /usr/include/X11 |
If you have one of the supported DRI cards and have enabled DRI kernel modules as explained above, you now need to update the kernel modules to ensure they are compatible with the current version of XFree86. To do this, perform the following:
cd programs/Xserver/hw/xfree86/os-support/linux/drm/kernel && make CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux && mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/ && cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o \ /lib/modules/`uname -r`/kernel/drivers/char/drm/ && depmod -a |
Warning |
If you recompile or upgrade your kernel, you will need to re-copy the appropriate driver module(s) to the kernel module library and rerun depmod. |
Note: If you created AGP support as a module when compiling the kernel, you may have to add a line to /etc/modules.conf to ensure the agpgart module is loaded. For instance, the AGP version of the Radeon video card will use the radeon.o driver. It will need to have the line
in /etc/modules.conf to enable DRI support.
below radeon agpgart
WORLDOPTS="" make World 2>&1 | tee xfree-compile.log: This command runs multiple makefiles to completely rebuild the system. WORLDOPTS="" disables the default setting to continue after encountering an error. 2>&1 redirects error messages to the same location as normal output. The tee command allows viewing of the output while logging the results to a file.
Note: When rebuilding XFree86, a separate command that may be used if only minor changes are made to the sources is make Everything. This does not automatically remove generated files and only rebuilds those files or programs that are out of date.
ln -sf /usr/X11R6/bin /usr/bin/X11, ln -sf /usr/X11R6/lib/X11 /usr/lib/X11, and ln -sf /usr/X11R6/include/X11 /usr/include/X11: These commands are present to enable other (broken) packages to build against XFree86. We do this even though the Filesystem Hierarchy Standard says: "In general, software must not be installed or managed via the above symbolic links. They are intended for utilization by users only."
make CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux: This builds the XFree86 compatible kernel modules using the same compiler used to compile the kernel.
cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o /lib/modules/`uname -r`/kernel/drivers/char/drm/: Put the kernel module(s) where the kernel can find them. You only need to copy the driver you need to support your video card.
depmod -a: Update the modules.dep file for module management.
Edit /etc/ld.so.conf and add /usr/X11R6/lib. Run
ldconfig |
Add /usr/X11R6/bin to your PATH environment variable in .bash_profile. The statement should look something like PATH=$PATH:/usr/X11R6/bin and be placed before the export PATH statement.
Run
source ~/.bash_profile |
Set up your mouse:
cd /dev ln -s psaux mouse |
Create the XF86Config file with
cd ~ XFree86 -configure |
Edit XF86Config.new to suit your system. The details of the file are located in the man page man XF86Config. Some things you may want to do are:
Section "Files". Change the order of the font paths searched. You may want to put 100dpi fonts ahead of 75dpi fonts if your system normally comes up closer to 100 dots per inch. You may want to remove some font directories completely.
Section "Monitor". Specify the VertRefresh and HorizSync values if the system does not automatically detect the monitor and its values.
Section "InputDevice". You may want to change the keyboard autorepeat rate by adding Option "Autorepeat" "250 30".
Section "Device". You may want to set some of the options available for your selected video driver. A description of the driver parameters is in the man page for your driver.
Section "Screen". Add a DefaultDepth statement such as: DefaultDepth 16. In the SubSection for your default depth, add a modes line such as: Modes "1280x1024" "1024x768". The first mode listed will normally be the starting resolution.
Test the system with
XFree86 -xf86config ~/XF86Config.new |
Move the configuration file to its final location
mv ~/XF86Config.new /etc/X11/XF86Config |
Create .xinitrc
cat > ~/.xinitrc << "EOF" # Begin .xinitrc file xterm -g 80x40+0+0 & xclock -g 100x100-0+0 & twm EOF |
Start X with
startx |
The XFree86 package contains the X Window System for Linux (and other operating systems). It includes the X server, fonts, xterm, a simple window manager (twm), various utilities, video output drivers, and various input drivers including the mouse and keyboard.
XFree86 also contains libraries and header files for development of the X Window System programs.
Note: The following list of programs is not comprehensive. The full list is in /usr/X11R6/bin. For additional information about these programs, see the respective man page.
xf86config is an interactive program for generating an XF86Config file for use with XFree86 X servers.
DRI is a framework for allowing software to access graphics hardware in a safe and efficient manner. It is installed in XFree86 by default if you have a supported video card. To check if DRI is installed properly, check the log file /var/log/XFree86.0.log for statements like:
(II) R128(0): Direct rendering enabled |
From an xterm, run glxinfo and look for the phrase:
direct rendering: Yes |
You can also run the test program glxgears. This program brings up a window with three gears turning. The xterm will display how many frames were drawn every five seconds so this is a reasonable benchmark. The window is scalable, and the frames drawn per second is highly dependent on the size of the window.
For troubleshooting problems, check the DRI Users Guide at http://dri.sourceforge.net/doc/DRIuserguide.html.
TrueType font support is built into XFree86. The following items need to be completed to make the fonts available.
Establish a directory for the fonts and move any TrueType fonts you want into that directory.
Create the fonts.scale and fonts.dir files in the TrueType font directory.
Ensure the TrueType module is loaded in XF86Config.
Ensure the FontPath in XF86Config contains the TrueType font directory.
The build of XFree86 as given above automatically creates a TrueType font directory: /usr/X11R6/lib/X11/fonts/TTF. This directory already has some TrueType fonts and is set up correctly. If this directory is satisfactory, copy any other TrueType fonts you want into that directory. If not, create a new directory, preferably in the /usr/X11R6/lib/X11/fonts/ directory and put your TrueType fonts there.
Now change to the directory where you have your TrueType fonts and run
mkfontscale && mkfontdir |
The "Module" section should look like:
Section "Module" ... Load "freetype" ... EndSection |
The "Files" section should look like
Section "Files" ... FontPath "/usr/X11R6/lib/X11/fonts/[TrueTypeDir]/" ... EndSection |
Finally, to update all the font cache files specified in /etc/fonts/fonts.conf, run
fc-cache |
XFree86 will now be able to use TrueType fonts when it is restarted. You can check to see if the new fonts are available with the xlsfonts or xfontsel program.
Note: You should re-run mkfontscale and mkfontdir any time you add or delete TrueType fonts. You should also rerun fc-cache each time you add or remove any fonts.
In this version of XFree86, it has been reported that non-Latin keyboard layouts do not include Latin configurations as was previous practice. To set up a keyboard for Latin and non-Latin input, change the XkbLayout keyboard driver option in the InputDevice section of the XF86Config file. For example:
Section "InputDevice" Identifier "Keyboard0" Driver "Keyboard" Option "XkbModel" "pc105" Option "XkbLayout" "en_US,ru" Option "XkbOptions" "grp:switch,grp:alt_shift_toggle,grp_led:scroll" EndSection |
In this example, you can use the Alt-Shift combination to switch between keyboard layouts and use the Scroll Lock LED to indicate when the second layout is active.
xdm provides a graphical logon capability and is normally set up in /etc/inittab. Most of the information you need to customize xdm is found in its man page. To execute xdm during bootup, change the initdefault level to 5 and add the following lines to /etc/inittab:
# Run xdm as a separate service x:5:respawn:/usr/X11R6/bin/xdm -nodaemon |
There are many options that can be set in XFree86 and X clients via resources. Typically resources are set in the ~/.Xresources file.
The layout of the ~/.Xresources file consists if a list of specifications in the form of
object.subobject[.subobject...].attribute: value |
Typically, components of a resource specification are linked together by either tight, represented by a dot (.), or loose, represented by an asterisk (*), bindings. A tight binding indicates that the components on either side of the dot must be directly next to each other as defined in a specific implementation. An asterisk is a wildcard character that means that any number of levels in a defined hierarchy can be between the components. For example, XFree86 offers two new cursors: redglass and whiteglass. To use one of these resources, you need to add the following line:
Xcursor.theme: whiteglass |
However, you can specify the background for all clients with:
*background: blue |
More specific resource variables will override less specific names.
Resource definitions can be found in the man pages for each respective client.
In order to load your resources, the xrdb program must be called with the appropriate parameters. Typically, the first time resources are loaded, you use:
xrdb -load <filename> |
To add resources to XFree86's database in memory use:
xrdb -merge <filename> |
The xrdb instruction is usually placed in ~/.xinitrc or ~/.xsession. To get more information, see the xrdb man page.
This chapter does not contain libraries that are required to run X. It does contain libraries that enhance X. The enhancement is as simple as font support or as complex as libraries that sit between X and applications that run on X whose purpose is to standardize the look and feel and inter-process communications so that applications written by different programmers end up looking and acting similarly. They also assist programmers by supplying common elements.
The FreeType2 package contains a library to allow XFree86 to properly render TrueType fonts.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.5.tar.bz2
Download size: 831 KB
Estimated Disk space required: 22 MB
Estimated build time: 0.35 SBU
Install FreeType2 by running the following commands:
cp include/freetype/config/ftoption.h include/freetype/config/ftoption.h.orig && sed -e "s%\/\* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER \*\/%#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER%" \ include/freetype/config/ftoption.h.orig > include/freetype/config/ftoption.h && ./configure --prefix=/usr && make && make install |
The Fontconfig package is a library for configuring and customizing font access.
Download (HTTP): http://pdx.freedesktop.org/software/fontconfig.org/releases/fontconfig-2.2.1.tar.gz
Download size: 1.4 MB
Estimated Disk space required: 9.6 MB
Estimated build time: 0.5 SBU
Note: The numbering system of Fontconfig is unusual. The beta versions of the package are numbered with a 9x in the last portion of the release number. This means that 2.2.90 is a beta release and the most current release is of the form 2.2.1
Install Fontconfig by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
The configuration file for Fontconfig is /etc/fonts/fonts.conf. Generally you do not want to edit this file. To put a new font directory in the configuration, update the file, /etc/fonts/local.conf with your local information. The default location of fonts in Fontconfig is:
/usr/share/fonts
~/.fonts
Because we have not built XFree86 yet, put the following directory entries into /etc/fonts/local.conf:
<dir>/usr/X11R6/lib/X11/fonts/TTF</dir>
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/X11R6/lib/X11/fonts/truetype</dir>
The Fontconfig program will automatically search the above directories and all subdirectories for needed fonts.
Note: X also includes an internal (and older) version of Fontconfig and unless it is explicitly disabled when building XFree86, the internal version is created leaving two slightly incompatible libraries on your system. It is recommended that you only install one version.
The Qt package contains a C++ GUI library. This is useful for creating graphical applications or executing graphical applications that are dynamically linked to the Qt library.
Download (FTP): ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.2.1.tar.bz2
Download size: 14 MB
Estimated Disk space required: 155 MB
Estimated build time: 29 SBU (full), 18 SBU (sub-tools)
./configure -prefix /opt/qt-3.2.1 -qt-gif -system-libpng \ -system-libmng -system-zlib -system-libjpeg -no-g++-exceptions \ -thread && make && make install && ln -sfn /opt/qt-3.2.1 /opt/qt && ln -s /opt/qt/lib/libqt-mt.so /opt/qt/lib/libqt.so && cp -r doc/man /opt/qt/doc && cp -r examples /opt/qt/doc |
Note: The build time for Qt is quite long. If you want to save some time and don't want the tutorials and examples, change the first make line above to:
make sub-tools
-prefix /opt/qt-3.2.1: This command sets up the install destination.
-qt-gif: This command adds support for gif files to the libraries.
-system-libpng -system-libmng -system-zlib -system-libjpeg: This command forces the library to use the shared libraries that are on your system instead of recreating its own set of support libraries for these functions.
-no-g++-exceptions: This command disables the exceptions coding generated by the C++ compiler.
-thread: This command compiles the library to support multi-threading.
ln -sfn /opt/qt-3.2.1 /opt/qt: This command standardizes the location of the Qt libraries to the ld.so.conf entry described below.
ln -s /opt/qt/lib/libqt-mt.so /opt/qt/lib/libqt.so: This command allows configure scripts to find a working Qt installation.
cp -r doc/man /opt/qt/doc: This command installs the man directory which is missed by make install.
cp -r examples /opt/qt/doc: This command installs the examples directory which is missed by make install.
As with most libraries, there is no configuration to do, save that the library directory /opt/qt/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. The following command will add it if it is missing:
cat >> /etc/ld.so.conf << "EOF" # Begin qt addition to /etc/ld.so.conf /opt/qt/lib # End qt addition EOF ldconfig |
You need to add the path for the Qt man pages to the man.conf file. This can be done with the following command:
cat >> /etc/man.conf << "EOF" # Begin qt addition to man.conf MANPATH /opt/qt/doc/man # End qt addition to man.conf EOF |
The GTK+ package contains GTK+ Libraries. This is useful for creating graphical user interfaces for applications.
Download (FTP): ftp://ftp.gtk.org/pub/gtk/v1.2/gtk+-1.2.10.tar.gz
Download size: 2.7 MB
Estimated Disk space required: 54 MB
Estimated build time: 1.96 SBU
Install GTK+ by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
The Pango package contains the libpango library. This is useful for the layout and rendering of text.
Download (FTP): ftp://ftp.gtk.org/pub/gtk/v2.2/pango-1.2.5.tar.gz
Download size: 1.3 MB
Estimated Disk space required: 21.8 MB
Estimated build time: 0.49 SBU
In order for Pango to find xft2, the PKG_CONFIG_PATH must include /usr/X11R6/lib/pkgconfig. This is a good place to add it if you haven't already. Specific instructions for modifying this variable can be found in the configuration section of pkgconfig-0.15.0.
Install Pango by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
The ATK package contains the ATK libraries. They are useful for allowing accessibility solutions to be available for all GTK2 applications.
Download (FTP): ftp://ftp.gtk.org/pub/gtk/v2.2/atk-1.2.4.tar.bz2
Download size: 328 KB
Estimated Disk space required: 6.2 MB
Estimated build time: 0.12 SBU
Install ATK by running the following commands:
./configure --prefix=/usr && make && make install |
The GTK+ package contains GTK+ Libraries. This is useful for creating graphical user interfaces for applications.
Download (FTP): ftp://ftp.gtk.org/pub/gtk/v2.2/gtk+-2.2.4.tar.bz2
Download size: 6.9 MB
Estimated Disk space required: 187 MB
Estimated build time: 2.88 SBU
GLib-2.2.3, XFree86-4.3.0.1, Pango-1.2.5, ATK-1.2.4, libpng-1.2.5, libtiff-3.5.7 and libjpeg-6b
Install GTK+ by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
The LessTif package contains an Open Source version of OSF/Motif(R).
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/lesstif/lesstif-0.93.46.tar.bz2
Download size: 2.5 MB
Estimated Disk space required: 33 MB
Estimated build time: 2.73 SBU
Install LessTif by running the following commands:
./configure --prefix=/usr \ --enable-build-20 \ --enable-build-21 \ --disable-debug \ --enable-production \ --disable-build-tests \ --with-xdnd && make && make install |
--enable-build-20: Build the Motif 2.0 compatible version of the LessTif libraries.
--enable-build-21: Also build the Motif 2.1 compatible versions.
--disable-debug: Do not generate debugging information.
--enable-production: Build the release version of the LessTif libraries.
--disable-build-tests: Do not build the test/ tree (see Testing LessTif).
--with-xdnd: Enable XDND GNOME compatibility support.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
It is advisable to test the installation of LessTif with the test suite located in lesstif-0.93.46/test. It is not required to install any of the resulting binaries to validate the installation, the following commands, executed from the source directory, will suffice:
cd test && ./configure && make |
The startup-notification package contains startup-notification libraries. These are useful for building a consistent manner to notify the user through the cursor that the application is loading.
Download (HTTP): http://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.5.tar.gz
Download size: 212 KB
Estimated Disk space required: 1.6 MB
Estimated build time: 0.08 SBU
Window Mangers and Desktop Environments are the primary user interfaces into the X Window System. A window manager is a program that controls the appearance of windows and provides the means by which the user can interact with them. A Desktop Environment provides a more complete interface to the operating system, and provides a range of integrated utilities and applications.
There are many Window Mangers available. Some of the more well known ones include fvwm2, Window Maker, AfterStep, Enlightenment, Sawfish, and Blackbox.
The Desktop Environments available for Linux are GNOME, KDE, and XFce.
Choosing a Window Manager or Desktop Environment is highly subjective. The choice depends on the look and feel of the packages, the resources (RAM, disk space) required, and the utilities included. One web site that provides a very good summary of what is available, screenshots, and their respective features is Window Managers for X.
In this chapter, the installation instructions of several Window Managers and one lightweight Desktop Environment are presented. Later in the book, both KDE and GNOME have their own Parts.
The sawfish package contains a window manager. This is useful for organizing and displaying windows where all window decorations are configurable and all user-interface policy is controlled through the extension language.
Download (HTTP): http://telia.dl.sourceforge.net/sawmill/sawfish-1.3.tar.gz
Download size: 1.5 MB
Estimated Disk space required: 17.5 MB
Estimated build time: 0.26 SBU
XFree86-4.3.0.1, librep-0.16.2, rep-gtk-0.18, EsounD-0.2.30 and GTK+-2.2.4
Install sawfish by running the following commands:
./configure --prefix=/usr --libexec=/usr/sbin --infodir=/usr/share/info \ --with-gnome-prefix=/opt/gnome-2.2 && make && make install |
--with-audiofile: This command directs sawfish to use libaudiofile for sound manipulation.
--with-esd: This command directs sawfish to use the Enlightened Sound Daemon.
--with-gnome-prefix=/opt/gnome-2.2: This command directs sawfish to GNOME's directory.
The Fluxbox package contains a windows manager.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/fluxbox/fluxbox-0.9.5.tar.bz2
Download size: 372 KB
Estimated Disk space required: 53.9 MB
Estimated build time: 1.28 SBU
Install Fluxbox by running the following commands:
./configure --prefix=/usr --enable-kde --enable-gnome && make && make install |
--enable-kde: This command activates Fluxbox's ability to allow KDE tray icons to be placed in the slit.
--enable-gnome: This command activates Fluxbox's ability to support GNOME.
Be sure to backup your current .xinitrc before proceeding.
cat >> ~/.xinitrc << "EOF"> exec fluxbox EOF |
mkdir ~/.fluxbox && cp /usr/share/fluxbox/init ~/.fluxbox/init && cp /usr/share/fluxbox/keys ~/.fluxbox/keys && cp /usr/share/fluxbox/menu ~/.fluxbox/menu |
Menu Items are added by editing~/.fluxbox/menu. The syntax is explained on the fluxbox man page.
The Metacity package contains a window manager. This is useful for organizing and displaying windows.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/metacity/2.4/metacity-2.4.55.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/metacity/2.4/metacity-2.4.55.tar.bz2
Download size: 1.3 MB
Estimated Disk space required: 31.5 MB
Estimated build time: 0.49 SBU
Install Metacity by running the following commands:
./configure --prefix=/usr --libexec=/usr/sbin --sysconfdir=/etc && make && make install |
The XFce package contains a lightweight desktop environment.
Download (HTTP): http://telia.dl.sourceforge.net/xfce/xfce-4.0.0-src.tar.bz2
Download size: 16 MB
Estimated Disk space required: 107 MB
Estimated build time: varies
XFce now distributes as a TAR ball of base packages and module packages. These instructions will only cover the bare minimum to run the application. The remaining modules would all follow the same pattern which will soon become obvious.
Install XFce by running the following commands:
cd src && tar -xzvf libxfce4util-4.0.0 && cd libxfce4util-4.0.0 && ./configure --prefix=/usr && make && make install && cd .. && tar -xzvf libxfcegui4-4.0.0 && cd libxfcegui4-4.0.0 && ./configure --prefix=/usr && make && make install && cd .. && tar -xzvf libxfce4mcs-4.0.0 && cd libxfce4mcs-4.0.0 && ./configure --prefix=/usr --sysconfdir=/etc && make && make install && cd .. && tar -xzvf xfce-mcs-manager-4.0.0 && cd xfce-mcs-manager-4.0.0 && ./configure --prefix=/usr && make && make install && cd .. && tar -xzvf xfwm4-4.0.0 && cd xfwm4r-4.0.0 && ./configure --prefix=/usr && make && make install && cd .. && tar -xzvf xfdesktop-4.0.0 && cd xfdesktop-4.0.0 && ./configure --prefix=/usr --sysconfdir=/etc && make && make install && cd .. && tar -xzvf xfce4-panel-4.0.0 && cd xfce4-panel-4.0.0 && ./configure --prefix=/usr --sysconfdir=/etc && make && make install && cd .. && tar -xzvf xfce-utils-4.0.0 && cd xfce-utils-4.0.0 && ./configure --prefix=/usr --sysconfdir=/etc && make && make install |
Modules not installed above are: dbh-1.0.15 (required for xffm), gtk-xfce-engine-2.1.6, xfce-mcs-plugins, xfce4-iconbox, xfce4-mixer, xfce4-systray, sxfce4-themes, xfce4-toys, xfce4-trigger-launcher, xffm, xffm-icons, xfprint, and xfwm4-themes.
The XFce package contains xfce-mcs-manager, xfce4-about, xfce-setting-show, xfce4-panel, xfdesktop, xfhelp4, xflock4, xfmountdev4, xfrun4, xfsamba4, xftaskbar4, xfterm4, xftrash4, xftree4, xfwm4 and libxfce4mcs, libxfce4util, and libxfcegui4 libraries.
xfce4-panel is the panel manager for XFce. It contains the launcher, clock, mail check, desktop switcher and separator programs.
xfmountdev4 mounts a device on the specified mount point and launches xftree4, then unmounts the device when xftree4 finishes.
KDE is a comprehensive desktop environment that builds on XFree86 and QT to provide a window manager and many user tools, including a browser, word processor, spreadsheet, presentation package, games, and numerous other utilities. It provides extensive capabilities for customization.
We divide the KDE instructions into two parts. The first part, the core packages, are needed for the rest of KDE to work. The second part presents additional packages which provide functionality in various areas (multimedia, graphics etc).
As the instructions for compiling and installing KDE were developed, the options to configure were examined and the parameters presented are the most likely to compile correctly. In each of the packages, one other option to configure can be added: --enable-final. This option can speed up the build process, but requires a lot of memory. If you have less than 256MB of RAM, this option may cause swapping and significantly slow compilation.
KDE also has many internationalization packages in the form of: kde-i18n-xx-3.1.4.tar.bz2 where the xx is a two to five letter code for the country covered. We do not cover the installation of these packages here.
All the KDE packages are comprised of various components. The default is to install most of the components. If specific components are to be eliminated, the official way is to set the variable DO_NOT_COMPILE. This comes in handy when there are problems compiling a particular component.
DO_NOT_COMPILE="component1 component2" \ ./configure --prefix=/opt/kde... |
The core KDE packages also honor this variable, but omitting components from the core packages is not advisable since it may result in an incomplete KDE installation.
The Analog Real-time Synthesizer (aRts) provides sound support for KDE. It provides necessary libraries for kdelibs.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/arts-1.1.4.tar.bz2
Download size: 963 KB
Estimated Disk space required: 42.5 MB
Estimated build time: 2.52 SBU
Before starting the build, ensure you have the QTDIR environment variable set:
export QTDIR=/opt/qt |
Install aRts by running the following commands:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking && make && make install && ln -sfn /opt/kde-3.1.4 /opt/kde |
Note: Another configure option is --enable-final. This option can speed up the build process, but requires a lot of memory. If you have less than 256MB of RAM, this option may cause swapping and significantly slow compilation.
--prefix=/opt/kde-3.1.4 : This option tells the process to install the package in /opt/kde-3.1.4. We put aRts here because this package is required before installing KDE.
--disable-debug : This option causes the system to be compiled without debugging code.
--disable-dependency-tracking : This option speeds up one time builds.
ln -sfn /opt/kde-3.1.4 /opt/kde : This command creates a link for access to KDE. If a newer version of KDE is released, the new system can be built by changing the --prefix location and then set up by changing the link as this command does.
The library directory /opt/kde/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. The following command will add it if it is missing:
cat >> /etc/ld.so.conf << "EOF" # Begin kde addition to /etc/ld.so.conf /opt/kde/lib # End kde addition EOF ldconfig |
This package includes libraries that are central to the development and execution of a KDE program, as well as internationalization files for these libraries, misc HTML documentation, theme modules and regression tests.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdelibs-3.1.4.tar.bz2
Download size: 10 MB
Estimated Disk space required: 193 MB
Estimated build time: 35.34 SBU
OpenSSL-0.9.7c, pcre-4.3, libxml2-2.5.11, libxslt-1.0.33, FAM-2.6.10 and libart_lgpl-2.3.11
Install kdelibs with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking --with-alsa --enable-fast-malloc=full && make && make install |
--prefix=/opt/kde-3.1.4 : This option tells the process to install the package in /opt/kde-3.1.4.
--disable-debug : This option causes the system to be compiled without debugging code.
--disable-dependency-tracking : This option speeds up one time builds.
--with-alsa : This option tells the build process to search for and use Alsa for sound support.
--enable-fast-malloc=full : This option tells KDE programs to use an internal memory allocation scheme optimized for KDE.
kdebase is the second mandatory package (besides kdelibs) for the K Desktop Environment. It provides various applications and infrastructure files and libraries.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdebase-3.1.4.tar.bz2
Download size: 14 MB
Estimated Disk space required: 196 MB
Estimated build time: 28.22 SBU
OpenSSL-0.9.7c, LessTif-0.93.46, CDParanoia-III-9.8, libvorbis-1.0 and CUPS-1.1.19
Check to see if /lib/libmisc.la exists. If not, run:
ln -sf /usr/lib/libmisc.la /lib/libmisc.la |
Install kdebase with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking --disable-lametest --with-shadow && make && make install |
--disable-lametest : Do not search for and use lame support. This package provides MP3 encoding. Omit this option if you installed lame.
--with-shadow : Use shadow password support.
Major programs in kdebase include kdesktop, kaddressbook, kappfinder, kcontrol, kdeprint, kdm, kfind, khelpcenter, khotkeys, kicker, klipper, kmenuedit, konqueror, konsole, kscreensaver and ktip
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdemultimedia-3.1.4.tar.bz2
Download size: 5.7 MB
Estimated Disk space required: 88 MB
Estimated build time: 11.47 SBU
Install kdemultimedia with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking --with-arts-alsa && sed -i -e 's/strings -ansi/strings/' kaudiocreator/Makefile && sed -i -e 's/strings -ansi/strings/' kioslave/audiocd/Makefile && sed -i -e 's/-ansi//' kscd/libwm/Makefile && make && make install |
--with-arts-alsa : Use the ALSA support built into aRts.
sed -i -e 's/strings -ansi/strings/' kaudiocreator/Makefile : Remove -ansi from gcc parameters to work around a broken header in the kernel. The broken file is asm/byteorder.h, where a parameter is used, but not defined, when -ansi is specified.
sed -i -e 's/strings -ansi/strings/' kioslave/audiocd/Makefile : Remove -ansi from gcc parameters to work around a broken header in the kernel.
sed -i -e 's/-ansi//' kscd/libwm/Makefile : Remove -ansi from gcc parameters to work around a broken header in the kernel.
There is no explicit configuration for the kde multimedia package, however Kscd needs to find the CD drive. The default is /dev/cdrom which may not exist on your system. The easiest way to do this is to create a symbolic link to this from your CD drive (e.g. /dev/hdc, /dev/scd0, etc):
cd /dev && ln -s "CD Drive" /dev/cdrom |
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdenetwork-3.1.4.tar.bz2
Download size: 4.8 MB
Estimated Disk space required: 86 MB
Estimated build time: 8.20 SBU
Install kdenetwork with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking && make && make install |
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdegraphics-3.1.4.tar.bz2
Download size: 4.4 MB
Estimated Disk space required: 49 MB
Estimated build time: 9.23 SBU
Install kdegraphics with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking && make && make install |
The KDE Graphics package provides kcoloredit, kdvi, kfax, kfract, kghostview, kiconedit, kooka, kpaint, kruler, ksnapshot, kuickshow and kview.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdepim-3.1.4.tar.bz2
Download size: 3.1 MB
Estimated Disk space required: 55 MB
Estimated build time: 7.03 SBU
Install kdepim with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking && make && make install |
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdeadmin-3.1.4.tar.bz2
Download size: 1.5 MB
Estimated Disk space required: 44 MB
Estimated build time: 2.53 SBU
kdegames is a compilation of various games.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdegames-3.1.4.tar.bz2
Download size: 8.1 MB
Estimated Disk space required: 92 MB
Estimated build time: 7.86 SBU
Install kdegames with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking && make && make install |
The KDE Games package provides kasteroids, kbounce, kfouleggs, ksirtet, ksmiletris, ksnakerace, kspaceduel, ktron, kbackgammon, kbattleship, kblakbox, kmahjongg, kreversi, kwin4, kenolaba, shisensho, kpoker, lieutnant, patience, katomic, kjumpingcube, kmines, ksokoban, kolorlines, konquest and samegame.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdeutils-3.1.4.tar.bz2
Download size: 1.3 MB
Estimated Disk space required: 31 MB
Estimated build time: 3.76 SBU
Install kdeutils with:
./configure --prefix=/opt/kde-3.1.4 --disable-debug \ --disable-dependency-tracking && make && make install |
The KDE Utils package provides kcalc, charselectapplet, arc, kdepasswd, kdf, kedit, kfloppy, khexeditor, kjots, kljtool, klpq and ktimer.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdeedu-3.1.4.tar.bz2
Download size: 19 MB
Estimated Disk space required: 105 MB
Estimated build time: 4.65 SBU
kdeartwork contains additional themes, screensaver, sounds, wallpapers and widget styles for KDE.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdeartwork-3.1.4.tar.bz2
Download size: 13 MB
Estimated Disk space required: 61 MB
Estimated build time: 1.13 SBU
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdetoys-3.1.4.tar.bz2
Download size: 1.8 MB
Estimated Disk space required: 18 MB
Estimated build time: 1.51 SBU
kdeaddons contains additional plugins and scripts for some KDE applications.
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/3.1.4/src/kdeaddons-3.1.4.tar.bz2
Download size: 1.0 MB
Estimated Disk space required: 26 MB
Estimated build time: 4.85 SBU
This chapter attempts to install a complete GNOME-2.2 desktop environment and a limited GNOME 1.4 library environment that is sufficient to run GNOME 1.4 applications included in this book. The order of the pages are meant to follow the build order defined by the GNOME development team as published in the release notes, with two exceptions. If a package is in the release notes build list, but not in this chapter, it has been installed elsewhere in the book.
The installation of GNOME-2.2 is a large undertaking and one we would like to see you complete with the least amount of stress. One of our first goals in this installation is to protect your previously installed software, especially if you are testing GNOME on your machine. GNOME-2.2 packages utilize the --prefix= option for configure, so we will use that and an Environment variable (GNOME_PREFIX) to add flexibility to the install.
If you know that you want GNOME as your desktop, it is recommended that you install with --prefix=/usr. If you are not sure that you are going to keep GNOME on your installation, it is recommended that you install with --prefix=/opt/gnome-2.2. Setting the Environment variable and the additional edits required by the second option are covered on the pre-installation page.
If you choose the second option, removal of GNOME-2.2 is as easy as removing the edits from the pre-installation page and issuing the following command:
rm /opt/gnome-2.2 -r |
If your system was completely built per LFS and BLFS instructions, you have a very good chance of using GNOME-2.2 after your first install. If you are a typical LFS user, you have made modifications to the instructions along the way knowing that you have to take those modifications into account on future installations. You should have no problems integrating GNOME-2.2 into your unique setup, but you will have 28 to 33 packages installed before you can run GNOME through any testing (assuming your window manager is preinstalled and tested). We would anticipate that you will be rebuilding GNOME at least once to make adjustments for your setup.
If you are building a GNOME 1.4 desktop environment, you would install only those libraries in the GNOME 1.4 chapter and any dependencies listed on those pages, whether labeled or not. GNOME packages without pages are simply installed with:
./configure --prefix=/opt/gnome && make && make install |
GNOME-2.2 dependencies
Required
XFree86-4.3.0.1, GTK+-2.2.4, libpng-1.2.5, libjpeg-6b, libtiff-3.5.7 and popt-1.7
Optional
libxml2-2.5.11, libxslt-1.0.33, DocBook XML DTD-4.2, DocBook XSL Stylesheets-1.62.4 and FAM-2.6.10
Set an Environment variable to resolve the prefix destination.
If GNOME is your desktop of choice:
export GNOME_PREFIX=/usr |
If you want to try-out GNOME:
export GNOME_PREFIX=/opt/gnome-2.2 |
The try-out group will also need to make all the following configuration changes:
Add to your system or personal profile:
export PATH=$PATH:/opt/gnome-2.2/bin export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/gnome-2.2/lib/pkgconfig export GNOME_LIBCONFIG_PATH=/usr/lib |
Add to your /etc/ld.so.conf:
cat >> /etc/ld.so.conf << "EOF" # Begin gnome addition to /etc/ld.so.conf /opt/gnome-2.2/lib # End gnome addition EOF |
Add to your /etc/man.conf:
cat >> /etc/man.conf << "EOF" # Begin gnome addition to man.conf MANPATH /opt/gnome-2.2/man # End gnome addition to man.conf EOF |
The GTK-Doc package contains a code documentor. This is useful for extracting specially formatted comments from the code to create API documentation. This package is optional, if it is not installed, packages will not build the documentation. This does not mean that you will not have any documentation, if GTK-Doc is not available, the install process will copy pre-built documentation to your system.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/1.0/gtk-doc-1.0.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gtk-doc/1.0/gtk-doc-1.0.tar.bz2
Download size: 120 KB
Estimated Disk space required: 956 KB
Estimated build time:
Install GTK-Doc by running the following commands:
./configure --prefix=/usr && make install |
The linc package contains a library that eases the task of writing networked servers and clients. This is used by ORBit to handle message transmissions and receptions.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/linc/1.0/linc-1.0.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/linc/1.0/linc-1.0.3.tar.bz2
Download size: 244 KB
Estimated Disk space required: 2.4 MB
Estimated build time: 0.28 SBU
Install linc by running the following commands:
./configure --prefix=$GNOME_PREFIX --with-openssl --disable-gtk-doc && make && make install |
The libIDL package contains libraries for Interface Definition Language files. This is a specification for defining portable interfaces.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-0.8.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-0.8.2.tar.bz2
Download size: 252 KB
Estimated Disk space required: 2.7 MB
Estimated build time: 0.12 SBU
The ORBit2 package contains a high-performance CORBA Object Request Broker. This allows programs to send requests and receive replies from other programs.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/ORBit2/2.6/ORBit2-2.6.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/ORBit2/2.6/ORBit2-2.6.2.tar.bz2
Download size: 432 KB
Estimated Disk space required: 49.0 MB
Estimated build time: 0.96 SBU
The intltool package contains an internationalization tool. This is useful for extracting translatable strings from source files, collecting the extracted strings with messages from traditional source files (<source directory>/<package>/po) and merging the translations into XML, .desktop and OAF files.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/intltool/0.26/intltool-0.26.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/intltool/0.26/intltool-0.26.tar.bz2
Download size: 104 KB
Estimated Disk space required: 968 KB
Estimated build time: 0.00 SBU
Install intltool by running the following commands:
./configure --prefix=/usr --mandir=/usr/share/man && make && make install |
The intltool package contains intltoolize, intltool-update, intltool-extract, intltool-merge, intltool-prepare and intltool-unicodify.
The Bonobo Activation package contains libbonobo-activation libraries. This is the new Object Activation Framework (OAF) for GNOME.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/bonobo-activation/2.2/bonobo-activation-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/bonobo-activation/2.2/bonobo-activation-2.2.2.tar.bz2
Download size: 480 KB
Estimated Disk space required: 15.4 MB
Estimated build time: 0.43 SBU
Install Bonobo Activation by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --sysconfdir=/etc/gnome --disable-gtk-doc && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--disable-gtk-doc: This switch will prevent the rebuilding of documentation during the make command.
The libbonobo package contains libbonobo libraries. This is a component and compound document system for GNOME.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libbonobo/2.2/libbonobo-2.2.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libbonobo/2.2/libbonobo-2.2.3.tar.bz2
Download size: 568 KB
Estimated Disk space required: 38.4 MB
Estimated build time: 1.01 SBU
The GConf package contains a configuration database system.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/GConf/2.2/GConf-2.2.1.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/GConf/2.2/GConf-2.2.1.tar.bz2
Download size: 1.1 MB
Estimated Disk space required: 25.4 MB
Estimated build time: 0.56 SBU
Install GConf by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --sysconfdir=/etc/gnome --disable-gtk-doc && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc. This installation controls all future installations of schemas, changes in location, including eliminating this command must be consistent.
--disable-gtk-doc: This switch will prevent the rebuilding of documentation during the make command.
The GNOME MIME Data package contains the base set of file types and applications for GNOME.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-mime-data/2.2/gnome-mime-data-2.2.1.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-mime-data/2.2/gnome-mime-data-2.2.1.tar.bz2
Download size: 1.1 MB
Estimated Disk space required: 6.0 MB
Estimated build time: 0.01 SBU
Install GNOME MIME Data by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome && make && make install |
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
The GNOME Virtual File System package contains virtual file system libraries. This is used as one of the foundations of the Nautilus file manager.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-vfs/2.2/gnome-vfs-2.2.5.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-vfs/2.2/gnome-vfs-2.2.5.tar.bz2
Download size: 956 KB
Estimated Disk space required: 36.0 MB
Estimated build time: 1.36 SBU
ORBit2-2.6.2, GConf-2.2.1, Bonobo Activation-2.2.2 and GNOME MIME Data-2.2.1
Install GNOME Virtual File System by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome --disable-gtk-doc && make && make install |
The libgnome package contains the libgnome library.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgnome/2.2/libgnome-2.2.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgnome/2.2/libgnome-2.2.3.tar.bz2
Download size: 924 KB
Estimated Disk space required: 16.2 MB
Estimated build time: 0.32 SBU
Install libgnome by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --sysconfdir=/etc/gnome --disable-gtk-doc && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--disable-gtk-doc: This switch prevents the rebuilding of documentation during the make command.
The libart_lgpl package contains the libart libraries. This is useful for high-performance 2D graphics.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/libart_lgpl-2.3.11.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/libart_lgpl-2.3.11.tar.bz2
Download size: 212 KB
Estimated Disk space required: 2.3 MB
Estimated build time: 0.15 SBU
The libglade package contains libglade libraries. This is useful for loading Glade interface files in a program at runtime.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libglade/2.0/libglade-2.0.1.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libglade/2.0/libglade-2.0.1.tar.bz2
Download size: 352 KB
Estimated Disk space required: 2.7 MB
Estimated build time: 0.16 SBU
The libgnomecanvas package contains libgnomecanvas libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgnomecanvas/2.2/libgnomecanvas-2.2.1.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgnomecanvas/2.2/libgnomecanvas-2.2.1.tar.bz2
Download size: 504 KB
Estimated Disk space required: 16 MB
Estimated build time: 0.36 SBU
Install libgnomecanvas by running the following commands:
./configure --prefix=$GNOME_PREFIX --disable-gtk-doc && make && make install |
The libbonoboui package contains libbonoboui libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libbonoboui/2.2/libbonoboui-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libbonoboui/2.2/libbonoboui-2.2.2.tar.bz2
Download size: 740 KB
Estimated Disk space required: 65.5 MB
Estimated build time: 1.71 SBU
The GNOME Icon Theme package contains an assortment of scalable and non-scalable icons of different sizes and themes.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme/1.0/gnome-icon-theme-1.0.6.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-icon-theme/1.0/gnome-icon-theme-1.0.6.tar.bz2
Download size: 1.9 MB
Estimated Disk space required: 11 MB
Estimated build time: 0.01 SBU
The libgnomeui package contains libgnomeui libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgnomeui/2.2/libgnomeui-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgnomeui/2.2/libgnomeui-2.2.2.tar.bz2
Download size: 1.2 MB
Estimated Disk space required: 54.7 MB
Estimated build time: 1.10 SBU
Install libgnomeui by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --disable-gtk-doc && make && make install |
The libwnck package contains a Window Navigator Construction Kit.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libwnck/2.2/libwnck-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libwnck/2.2/libwnck-2.2.2.tar.bz2
Download size: 300 KB
Estimated Disk space required: 19.4 MB
Estimated build time: 0.29 SBU
The GTK Engines package contains three themes for GTK2.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.2/gtk-engines-2.2.0.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.2/gtk-engines-2.2.0.tar.bz2
Download size: 400 KB
Estimated Disk space required: 5.1 MB
Estimated build time: 0.10 SBU
The GTK ThinIce Engine package contains theme sets.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gtk-thinice-engine/2.0/gtk-thinice-engine-2.0.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gtk-thinice-engine/2.0/gtk-thinice-engine-2.0.2.tar.bz2
Download size: 136 KB
Estimated Disk space required: 1.6 MB
Estimated build time: 0.00 SBU
The GNOME Themes package contains several more theme sets.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-themes/2.2/gnome-themes-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-themes/2.2/gnome-themes-2.2.2.tar.bz2
Download size: 2.4 MB
Estimated Disk space required: 28.6 MB
Estimated build time: 0.37 SBU
The ScrollKeeper package contains a cataloging system for documentation. This is useful for managing documentation metadata and providing an API to help browsers find, sort and search the document catalog.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/scrollkeeper/scrollkeeper-0.3.12.tar.gz
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/scrollkeeper/0.3/scrollkeeper-0.3.12.tar.bz2
Download size: 536 KB
Estimated Disk space required: 7.5 MB
Estimated build time: 0.15 SBU
libxml2-2.5.11, libxslt-1.0.33, intltool-0.26 and DocBook XML DTD-4.2
Install ScrollKeeper by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --disable-static \ --with-omfdirs=/usr/share/omf:/opt/gnome/share/omf:\ /opt/kde/share/omf:/opt/gnome-2.2/share/omf && make && make install |
--sysconfdir=/etc: This switch puts the configuration files in /etc/scrollkeeper.
--localstatedir=/var: This switch puts ScrollKeeper's database directory in /var/lib/scrollkeeper.
--disable-static: This switch prevents the static library from being built.
--omfdirs=/usr/share/omf:/opt/gnome/share/omf:/opt/kde/share/omf:/opt/gnome-2.2/share/omf: This switch sets all the locations for OMF files for scrollkeeper.
The VTE package contains a termcap file implementation for terminal emulators.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/vte/0.10/vte-0.10.29.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/vte/0.10/vte-0.10.29.tar.bz2
Download size: 744 KB
Estimated Disk space required: 23.5 MB
Estimated build time: 0.57 SBU
Install VTE by running the following commands:
./configure --prefix=/usr --libexecdir=/usr/sbin --disable-gtk-doc && make && make install |
The libgtop package contains the GNOME top libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgtop/2.0/libgtop-2.0.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgtop/2.0/libgtop-2.0.2.tar.bz2
Download size: 824 KB
Estimated Disk space required: 19.1 MB
Estimated build time: 0.45 SBU
The GAIL package contains the GNOME Accessibility Implementation Libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gail/1.2/gail-1.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gail/1.2/gail-1.2.2.tar.bz2
Download size: 320 KB
Estimated Disk space required: 36.6 MB
Estimated build time: 0.83 SBU
The AT SPI package contains Assistive Technology Service Provider Interface. This is useful for redirecting UI events to accessible applications and adaptive/assistive technologies.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/at-spi/1.1/at-spi-1.1.9.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/at-spi/1.1/at-spi-1.1.9.tar.bz2
Download size: 360 KB
Estimated Disk space required: 24 MB
Estimated build time: 0.68 SBU
Install AT SPI by running the following commands:
patch -Np1 -i ../at-spi-1.1.9-lspi.patch && ./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --disable-gtk-doc && make && make install |
The libgail-gnome package contains a binder between GAIL and GNOME.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgail-gnome/1.0/libgail-gnome-1.0.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgail-gnome/1.0/libgail-gnome-1.0.2.tar.bz2
Download size: 140 KB
Estimated Disk space required: 1.4 MB
Estimated build time: 0.15 SBU
The librsvg package contains librsvg libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.2/librsvg-2.2.5.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/librsvg/2.2/librsvg-2.2.5.tar.bz2
Download size: 228 KB
Estimated Disk space required: 9.5 MB
Estimated build time: 0.25 SBU
The EEL package contains the Eazel Extensions Library. This is a collection of widgets and extensions to the GNOME platform.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/eel/2.2/eel-2.2.4.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/eel/2.2/eel-2.2.4.tar.bz2
Download size: 484 KB
Estimated Disk space required: 23.6 MB
Estimated build time: 0.76 SBU
The libgtkhtml package contains libgtkhtml libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgtkhtml/2.2/libgtkhtml-2.2.4.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgtkhtml/2.2/libgtkhtml-2.2.4.tar.bz2
Download size: 336 KB
Estimated Disk space required: 129 MB
Estimated build time: 1.40 SBU
The libgsf package contains libgsf libraries. This is useful for providing an extensible input/output abstraction layer for structured file formats.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/libgsf/1.8/libgsf-1.8.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/libgsf/1.8/libgsf-1.8.2.tar.bz2
Download size: 328 KB
Estimated Disk space required: 11.6 MB
Estimated build time: 0.24 SBU
Install libgsf by running the following commands:
./configure --prefix=$GNOME_PREFIX --disable-gtk-doc && make && make install |
The GAL package contains library functions that came from Evolution. GAL is short for GNOME Application Libs.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/gal/1.99/gal-1.99.9.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/gal/1.99/gal-1.99.9.tar.bz2
Download size: 924 KB
Estimated Disk space required: 118 MB
Estimated build time: 1.70 SBU
The libgnomeprint package contains libgnomeprint libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgnomeprint/2.2/libgnomeprint-2.2.1.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgnomeprint/2.2/libgnomeprint-2.2.1.3.tar.bz2
Download size: 600 KB
Estimated Disk space required: 22 MB
Estimated build time: 0.64 SBU
Install libgnomeprint by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome && make && make install |
The libgnomeprintui package contains the libgnomeprintui libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libgnomeprintui/2.2/libgnomeprintui-2.2.1.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libgnomeprintui/2.2/libgnomeprintui-2.2.1.3.tar.bz2
Download size: 464 KB
Estimated Disk space required: 20.5 MB
Estimated build time: 0.29 SBU
Install libgnomeprintui by running the following commands:
./configure --prefix=$GNOME_PREFIX && make && make install |
The GtkHTML package contains a lightweight HTML rendering/printing/editing engine. This is an evolution specific application at this time.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/gtkhtml/3.0/gtkhtml-3.0.8.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/gtkhtml/3.0/gtkhtml-3.0.8.tar.bz2
Download size: 1.0 MB
Estimated Disk space required: 141.2 MB
Estimated build time: 1.84 SBU
This section contains required elements of the GNOME environment to display a functional desktop.
The GNOME Desktop package contains GNOME's .desktop files, the gnome-about program, man pages and GNOME's core graphics files and icons.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-desktop/2.2/gnome-desktop-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-desktop/2.2/gnome-desktop-2.2.2.tar.bz2
Download size: 1 MB
Estimated Disk space required: 11.5 MB
Estimated build time: 0.19 SBU
Install GNOME Desktop by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome && make && make install |
The GNOME Panel package contains the menu and applet systems.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-panel/2.2/gnome-panel-2.2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-panel/2.2/gnome-panel-2.2.2.2.tar.bz2
Download size: 2.6 MB
Estimated Disk space required: 67.3 MB
Estimated build time: 1.14 SBU
Install GNOME Panel by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --localstatedir=/var/lib --sysconfdir=/etc/gnome --disable-gtk-doc && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--disable-gtk-doc: This switch prevents the rebuilding of documentation during the make command.
The GNOME Session package contains the GNOME session manager.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-session/2.2/gnome-session-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-session/2.2/gnome-session-2.2.2.tar.bz2
Download size: 704 KB
Estimated Disk space required: 15 MB
Estimated build time: 0.22 SBU
Install GNOME Session by running the following commands:
export PATH=$PATH:$GNOME_PREFIX/sbin:/sbin && ./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome && make && make install |
The Control Center package contains the GNOME settings managers.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/control-center/2.2/control-center-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/control-center/2.2/control-center-2.2.2.tar.bz2
Download size: 1.5 MB
Estimated Disk space required: 62.0 MB
Estimated build time: 1.02 SBU
Install Control Center by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome && make && make install |
--localstatedir=/var/lib: This switch puts scrollkeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
The Control Center package contains gnome-control-center, gnome-settings-daemon, gnome-background-properties, gnome-default-applications-properties, gnome-file-types-properties, gnome-font-properties, gnome-keybinding-properties, gnome-keyboard-properties, gnome-mouse-properties, gnome-network-preferences, gnome-sound-properties, gnome-theme-properties and gnome-ui-properties.
These packages are modular and add desktop applications to the GNOME environment. Feel free to install them on an as needed or as wanted basis.
The GNOME Terminal package contains the console. This is useful for executing programs from a command prompt.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-terminal/2.2/gnome-terminal-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-terminal/2.2/gnome-terminal-2.2.2.tar.bz2
Download size: 1.3 MB
Estimated Disk space required: 18.1 MB
Estimated build time: 0.28 SBU
Install GNOME Terminal by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome && make && make install |
The GNOME System Monitor package contains procman, GNOME's replacement to gtop.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-system-monitor/2.0/gnome-system-monitor-2.0.5.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-system-monitor/2.0/gnome-system-monitor-2.0.5.tar.bz2
Download size: 520 KB
Estimated Disk space required: 8.5 MB
Estimated build time: 0.12 SBU
Install GNOME System Monitor by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome && make && make install |
Note: make install will need path access to $GNOME_PREFIX/bin. If your preinstallation changes were made only to the user account, you will need to adjust your path prior to running make install.
The GNOME Applets package contains small applications which generally run in the background and display their output to the gnome panel.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-applets/2.2/gnome-applets-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-applets/2.2/gnome-applets-2.2.2.tar.bz2
Download size: 2.4 MB
Estimated Disk space required: 62.6 MB
Estimated build time: 0.85 SBU
Install GNOME Applets by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --localstatedir=/var/lib --sysconfdir=/etc/gnome && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
The GNOME Utilities package contains a collection of small applications designed to make your life a little easier.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-utils/2.2/gnome-utils-2.2.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-utils/2.2/gnome-utils-2.2.3.tar.bz2
Download size: 2.2 MB
Estimated Disk space required: 39.0 MB
Estimated build time: 0.40 SBU
Install GNOME Utilities by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --localstatedir=/var/lib --sysconfdir=/etc/gnome && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--with-pam-prefix=/etc/pam.d: This switch puts PAM files in /etc/pam.d instead of /etc/gnome.
The GNOME Utilities package contains gnome-system-log, gnome-character-map, gnome-calculator, gnome-search-tool, gnome-dictionary, archive-generator, gfloppy and gdialog.
gnome-character-map allows you to select characters from a table and insert them into your applications.
gnome-calculator is a simple mathematical and scientific calculator that includes arithmetic, trigonometric and logarithmic functions.
gnome-search-tool allows you to search for files on your system using simple and advanced search options.
The GNOME Games package contains games.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-games/2.2/gnome-games-2.2.1.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-games/2.2/gnome-games-2.2.1.tar.bz2
Download size: 9.6 MB
Estimated Disk space required: 76.2 MB
Estimated build time: 0.99 SBU
Install GNOME Games by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome && make && make install |
The Nautilus package contains the GNOME shell and file manager.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/nautilus/2.2/nautilus-2.2.4.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/nautilus/2.2/nautilus-2.2.4.tar.bz2
Download size: 4.6 MB
Estimated Disk space required: 101.2 MB
Estimated build time: 1.33 SBU
Install Nautilus by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome \ --libexecdir=$GNOME_PREFIX/sbin && make && make install |
The Yelp package contains the help browser. This is useful for viewing help files.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/yelp/2.2/yelp-2.2.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/yelp/2.2/yelp-2.2.3.tar.bz2
Download size: 516 KB
Estimated Disk space required: 11.9 MB
Estimated build time: 0.16 SBU
Install Yelp by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin && make && make install |
The bug-buddy package contains a graphical bug reporting tool. This can extract debugging information from a core file or crashed application.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/bug-buddy/2.2/bug-buddy-2.2.106.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/bug-buddy/2.2/bug-buddy-2.2.106.tar.bz2
Download size: 460 KB
Estimated Disk space required: 7.8 MB
Estimated build time: 0.07 SBU
Install bug-buddy by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib && make && make install |
The gedit package contains a lightweight UTF-8 text editor for the GNOME desktop.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gedit/2.2/gedit-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gedit/2.2/gedit-2.2.2.tar.bz2
Download size: 1.7 MB
Estimated Disk space required: 49.4 MB
Estimated build time: 0.59 SBU
Install gedit by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome && make && make install |
The EOG package contains Eyes of GNOME. This is useful for viewing and cataloging image files.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/eog/2.2/eog-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/eog/2.2/eog-2.2.2.tar.bz2
Download size: 480 KB
Estimated Disk space required: 16.1 MB
Estimated build time: 0.19 SBU
Install EOG by running the following commands:
./configure --prefix=$GNOME_PREFIX --libexecdir=$GNOME_PREFIX/sbin \ --localstatedir=/var/lib --sysconfdir=/etc/gnome && make && make install |
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
The GStreamer package contains a framework for streaming media. This is useful for interfacing with binary CODECs.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gstreamer/0.6/gstreamer-0.6.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gstreamer/0.6/gstreamer-0.6.2.tar.bz2
Download size: 1.2 MB
Estimated Disk space required: 72.7 MB
Estimated build time: 1.31 SBU
Install GStreamer by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib && make && make install && gst-register |
The gst-plugins package contains CODEC interfaces.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gst-plugins/0.6/gst-plugins-0.6.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gst-plugins/0.6/gst-plugins-0.6.2.tar.bz2
Download size: 1.9 MB
Estimated Disk space required: 102 MB
Estimated build time: 2.16 SBU
video4linux2, AAlib-1.4rc5, ALSA-0.9.6, aRts-1.1.4, Avifile-0.7.38, libdvdread-0.9.4, FFmpeg-0.4.7, FLAC-1.1.0, LAME-3.93.1, libdv-0.99, libFAME-0.9.0, libmad-0.15.0b, OpenQuicktime-1.0 and SDL-1.2.6
The GNOME Media package contains GNOME's media applications.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-media/2.2/gnome-media-2.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-media/2.2/gnome-media-2.2.2.tar.bz2
Download size: 2.8 MB
Estimated Disk space required: 37.8 MB
Estimated build time: 0.49 SBU
Install GNOME Media by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome \ --localstatedir=/var/lib --libexecdir=$GNOME_PREFIX/sbin && make && make install |
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--libexecdir=$GNOME_PREFIX/sbin: This command puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
The Nautilus Media package contains GNOME's media applications used by nautilus.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/nautilus-media/0.2/nautilus-media-0.2.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/nautilus-media/0.2/nautilus-media-0.2.2.tar.bz2
Download size: 352 KB
Estimated Disk space required: 13.5 MB
Estimated build time: 0.22 SBU
Install Nautilus Media by running the following commands:
./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome \ --localstatedir=/var/lib --libexecdir=$GNOME_PREFIX/sbin && make && make install |
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--libexecdir=/opt/gnome2/sbin: This command puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
The GNOME2 User Docs package contains end user documents for GNOME.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome2-user-docs/2.0/gnome2-user-docs-2.0.6.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome2-user-docs/2.0/gnome2-user-docs-2.0.6.tar.bz2
Download size: 7.3 MB
Estimated Disk space required: 13.1 MB
Estimated build time: 0.01 SBU
Install GNOME2 User Docs by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib && make && make install |
This section will contain other GNOME packages.
The GConf Editor package contains a GUI editor for the GConf configuration database.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gconf-editor/0.4/gconf-editor-0.4.1.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gconf-editor/0.4/gconf-editor-0.4.1.tar.bz2
Download size: 328 KB
Estimated Disk space required: 5.6 MB
Estimated build time: 0.07 SBU
The GDM package contains GNOME's Display Manager daemon. This is useful for allowing configurable graphical logins.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gdm/2.4/gdm-2.4.1.4.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gdm/2.4/gdm-2.4.1.4.tar.bz2
Download size: 1.9 MB
Estimated Disk space required: 35.1 MB
Estimated build time: 0.47 SBU
Install GDM by running the following commands:
groupadd gdm && useradd -c gdm -d /dev/null -g gdm -s /bin/bash gdm && ./configure --prefix=$GNOME_PREFIX --sysconfdir=/etc/gnome \ --localstatedir=/var/lib --with-pam-prefix=/etc && make && make install |
--sysconfdir=/etc/gnome: This command puts configuration files in /etc/gnome instead of /opt/gnome2/etc.
--localstatedir=/var/lib: This command puts files in /var/lib instead of /opt/gnome2/var.
--with-pam-prefix=/etc: This command puts PAM configuration files in /etc/pam.d instead of /etc/gnome.
The GDM PAM config files contain modules not present in a BLFS installation. The following commands will replace those files:
cat > /etc/pam.d/gdm << "EOF" auth required pam_unix.so auth required pam_nologin.so account required pam_unix.so password required pam_unix.so session required pam_unix.so EOF cat > /etc/pam.d/gdm-autologin << "EOF" auth required pam_env.so auth required pam_nologin.so auth required pam_permit.so account required pam_unix.so password required pam_unix.so session required pam_unix.so EOF |
gdm can be tested by executing it from a root console.
To automate the running of gdm, use the following command to create the init.d script if your GNOME_PREFIX=/opt/gnome-2.2. The fully qualified paths can be removed for GNOME_PREFIX=/usr:
cat > /etc/rc.d/init.d/gdm << "EOF" #!/bin/bash # Begin $rc_base/init.d/gdm # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting GDM..." loadproc /opt/gnome-2.2/bin/gdm ;; stop) echo "Stopping GDM..." if [ -f /var/run/gdm.pid ]; then loadproc /opt/gnome-2.2/sbin/gdm-stop fi ;; reload) echo "Reloading GDM..." reloadproc /opt/gnome-2.2/sbin/gdm-safe-restart ;; restart) echo "Restarting GDM..." loadproc /opt/gnome-2.2/sbin/gdm-restart ;; *) echo "Usage: $0 {start|stop|reload|restart}" exit 1 ;; esac # End $rc_base/init.d/gdm EOF chmod 755 /etc/rc.d/init.d/gdm |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/gdm ../rc0.d/K05gdm && ln -sf ../init.d/gdm ../rc1.d/K05gdm && ln -sf ../init.d/gdm ../rc2.d/K05gdm && ln -sf ../init.d/gdm ../rc3.d/K05gdm && ln -sf ../init.d/gdm ../rc4.d/K05gdm && ln -sf ../init.d/gdm ../rc5.d/S95gdm && ln -sf ../init.d/gdm ../rc6.d/K05gdm |
To autostart with a graphical login, edit /etc/inittab so that the line reading
id:3:initdefault: |
is changed to
id:5:initdefault: |
The GDM package contains gdm, gdm-binary, gdmXnestchooser, gdmchooser, gdmflexiserver, gdmgreeter, gdmlogin, gdmmktemp, gdmphotosetup, gdmsetup, gdmthemetester, gdm-restart, gdm-safe-restart, gdm-stop, gdmaskpass, gdmconfig and gdmopen.
This section contains additional GNOME 1.4 libraries, needed by some applications that have not yet been ported to GNOME 2.x. None of these libraries are needed for a GNOME desktop install.
Add to your system or personal profile:
export PATH=$PATH:/opt/gnome/bin export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/gnome/lib/pkgconfig export GNOME_LIBCONFIG_PATH=/usr/lib |
Add to your /etc/ld.so.conf:
cat >> /etc/ld.so.conf << "EOF" # Begin gnome addition to /etc/ld.so.conf /opt/gnome/lib # End gnome addition EOF |
Add to your /etc/man.conf:
cat >> /etc/man.conf << "EOF" # Begin gnome addition to man.conf MANPATH /opt/gnome/man # END gnome addition to man.conf EOF |
The ORBit package contains a high-performance CORBA Object Request Broker. This allows programs to send requests and receive replies from other programs.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/ORBit/0.5/ORBit-0.5.17.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/ORBit/0.5/ORBit-0.5.17.tar.bz2
Download size: 1 MB
Estimated Disk space required: 51.4 MB
Estimated build time: 0.73 SBU
Install ORBit by running the following commands:
./configure --prefix=/opt/gnome && make && make install |
The ORBit package contains libIDL, libIIOP, libORBit, libORBitCosNaming and libORBitutil libraries.
The OAF package contains the Object Activation Framework for GNOME.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/oaf/0.6/oaf-0.6.10.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/oaf/0.6/oaf-0.6.10.tar.bz2
Download size: 432 KB
Estimated Disk space required: 10.3 MB
Estimated build time: 0.16
The GNOME Libraries package contains the GNOME libraries. This is useful as a foundation for the GNOME Desktop and applications.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-libs/1.4/gnome-libs-1.4.2.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-libs/1.4/gnome-libs-1.4.2.tar.bz2
Download size: 2.8 MB
Estimated Disk space required: 112.4 MB
Estimated build time: 1.95 SBU
ORBit-0.5.17, GTK+-1.2.10, Imlib-1.9.14 and Berkeley DB-3.3.11 or Berkeley DB-4.1.25
Install GNOME Libraries by running the following commands:
./configure --prefix=/opt/gnome --disable-gtk-doc && make && make install |
The GNOME Libraries package contains libgnome, libgnomeui, libgnomesupport, libart_lgpl, libgtk-xmhtml, libgnorbagtk and libzvt libraries.
The GDK Pixel Buffer package is the GTK+ pixel buffer library
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/0.22/gdk-pixbuf-0.22.0.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/0.22/gdk-pixbuf-0.22.0.tar.bz2
Download size: 396 KB
Estimated Disk space required: 13.3 MB
Estimated build time: 0.34 SBU
The GNOME Print package contains the GNOME Printing Architecture, for GNOME 1.4.
Download (HTTP): http://ibiblio.org/pub/Linux/X11/gnome/sources/gnome-print/0.37/gnome-print-0.37.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-print/0.37/gnome-print-0.37.tar.bz2
Download size: 756 KB
Estimated Disk space required: 33.3 MB
Estimated build time: 0.66
The configure script does not correctly interpret that libxml-1.8.17 is newer than libxml-1.8.8. This can be solved by building xmlConf.sh with this command:
cat > /opt/gnome/lib/xmlConf.sh << EOF XML_LIBDIR="-L/usr/lib" XML_LIBS="-lxml" XML_INCLUDEDIR="-I/usr/include/gnome-xml" MODULE_VERSION=xml-1.8.17 EOF |
Install GNOME Print by running the following commands:
./configure --prefix=/opt/gnome --with-zlib=/usr && make && make install |
The Bonobo package contains a set of language and system independent CORBA interfaces for creating reusable components, controls and creating compound documents.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/bonobo/1.0/bonobo-1.0.22.tar.bz2
Download (FTP): http://ftp.gnome.org/pub/GNOME/sources/bonobo/1.0/bonobo-1.0.22.tar.bz2
Download size: 1.2 MB
Estimated Disk space required: 110.2 MB
Estimated build time: 2.18 SBU
The GConf package contains a configuration database system.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/GConf/1.0/GConf-1.0.9.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/GConf/1.0/GConf-1.0.9.tar.bz2
Download size: 772 KB
Estimated Disk space required: 20.0 MB
Estimated build time: 0.44
The GNOME Virtual File System package contains file system libraries.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnome-vfs/1.0/gnome-vfs-1.0.5.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnome-vfs/1.0/gnome-vfs-1.0.5.tar.bz2
Download size: 768 KB
Estimated Disk space required: 32.9 MB
Estimated build time: 1.19 SBU
GNOME MIME Data-2.2.1, GConf-1.0.9 and GNOME Libraries-1.4.2
Install GNOME Virtual File System by running the following commands:
./configure --prefix=/opt/gnome --disable-gtk-doc && make && make install |
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The libglade package contains libraries which allow applications to load Glade interface files at runtime.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libglade/0.17/libglade-0.17.tar.gz
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libglade/0.17/libglade-0.17.tar.gz
Download size: 416 KB
Estimated Disk space required: 8.5 MB
Estimated build time: 0.22 SBU
The GAL package contains library functions that came from Gnumeric and Evolution . GAL is short for GNOME Application Libs.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gal/0.24/gal-0.24.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gal/0.24/gal-0.24.tar.bz2
Download size: 1.0 MB
Estimated Disk space required: 100.8 MB
Estimated build time: 1.51 SBU
The Guppi package contains a Guile scriptable plot program with integrated statistics capabilities.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/Guppi/0.40/Guppi-0.40.3.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/Guppi/0.40/Guppi-0.40.3.tar.bz2
Download size: 1.0 MB
Estimated Disk space required: 89.2 MB
Estimated build time: 1.83 SBU
The libcapplet package contains a control panel applet library.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libcapplet/1.5/libcapplet-1.5.11.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libcapplet/1.5/libcapplet-1.5.11.tar.bz2
Download size: 312 KB
Estimated Disk space required: 2.4 MB
Estimated build time: 0.01 SBU
The Soup package contains a SOAP (Simple Object Access Protocol) implementation in C.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/soup/0.7/soup-0.7.11.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/soup/0.7/soup-0.7.11.tar.bz2
Download size: 324 KB
Estimated Disk space required: 11.1 MB
Estimated build time: 0.33
Install Soup by running the following commands:
./configure --prefix=/opt/gnome && make && make install |
The GtkHTML package contains a lightweight HTML rendering/printing/editing engine.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gtkhtml/1.1/gtkhtml-1.1.7.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gtkhtml/1.1/gtkhtml-1.1.7.tar.bz2
Download size: 1.1 KB
Estimated Disk space required: 78.6 MB
Estimated build time: 1.83 SBU
The libghttp package contains a GNOME 1.4 HTTP client library.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/libghttp/1.0/libghttp-1.0.9.tar.gz
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/libghttp/1.0/libghttp-1.0.9.tar.gz
Download size: 148 KB
Estimated Disk space required: 1.6 MB
Estimated build time: 0.01 SBU
This chapter is a collection of independant projects that can be installed based on specific needs. Together, they create a respectible office suite. While they may be lacking in user interface consistency, they excel in doing one thing and doing it well.
The AbiWord package contains a word processing application. This is useful for writing reports, letters and other formatted documents.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/abiword/abiword-2.0.0.tar.bz2
Download size: 20.5 MB
Estimated Disk space required: 164.7 MB
Estimated build time: 1.82 SBU
The Gnumeric package contains a spreadsheet program. This is useful for financial analysis.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/gnumeric/1.2/gnumeric-1.2.0.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/gnumeric/1.2/gnumeric-1.2.0.tar.bz2
Download size: 10.5 MB
Estimated Disk space required: 247.6 MB
Estimated build time: 2.81 SBU
Install Gnumeric by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib \ --sysconfdir=/etc/gnome --libexecdir=$GNOME_PREFIX/sbin && make && make install |
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--libexecdir=$GNOME_PREFIX/sbin: This switch puts libexec files in $GNOME_PREFIX/sbin instead of $GNOME_PREFIX/libexec.
GnuCash is a personal finance manager.
Download (HTTP): http://www.gnucash.org/pub/gnucash/sources/stable/gnucash-1.8.7.tar.gz
Download size: 6.3 MB
Estimated Disk space required: 144 MB
Estimated build time: 3.18 SBU
Install GnuCash by running the following commands:
./configure --prefix=/opt/gnome && make && make install |
Note: GnuCash must be run as root once before use. Simply executing gnucash from an X terminal and clicking on the cancel button is sufficient. This must be done prior to setting up accounts as an unprivileged user, due to the fact that GnuCash must create scheme catalogs for itself before it is used.
The GIMP package contains the GNU Image Manipulation Program. This is useful for photo retouching, image composition and image authoring.
Download (HTTP): http://gd.tuwien.ac.at/graphics/gimp/gimp/v1.2/v1.2.5/gimp-1.2.5.tar.bz2
Download (FTP): ftp://ftp.gimp.org/pub/gimp/v1.2/v1.2.5/gimp-1.2.5.tar.bz2
Download size: 10.6 MB
Estimated Disk space required: 226 MB
Estimated build time: 3.62 SBU
Download (FTP): ftp://ftp.gimp.org/pub/gimp/fonts/freefonts-0.10.tar.gz
Download (FTP): ftp://ftp.gimp.org/pub/gimp/v1.2/v1.2.5/gimp-data-extras-1.2.0.tar.bz2
libtiff-3.5.7, libpng-1.2.5, libjpeg-6b, gimp-print, AAlib-1.4rc5, mpeg_lib-1.3.1, Python-2.3.2 and Perl modules:Gtk-Perl-0.7008, PDL-2.4.0 and Parse-RecDescent-1.94
Install GIMP by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc --disable-print && make && make install |
The Evolution package contains an integrated mail, calendar and address book suite.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/evolution/1.4/evolution-1.4.4.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/evolution/1.4/evolution-1.4.4.tar.bz2
Download size: 12 MB
Estimated Disk space required: 387 MB
Estimated build time: 10.84 SBU
Required application: http://ftp2.nchu.edu.tw/UNIX/Database/BerkeleyDB/db-3.1.17.tar.gz
Note: Evolution requires Berkeley DB-3.1.17. The details on "why" are in the README file distibuted with the Evolution source code. Evolution links to the library statically, hence this book installs the Berkeley DB-3.1.17 in /opt, which can be removed once Evolution is installed.
Install Berkeley DB-3.1.17 by running the following commands:
cd build_unix && ../dist/configure --prefix=/opt/db-3.1.17 --enable-compat185 && make && make install |
Install Evolution by running the following commands:
./configure --prefix=$GNOME_PREFIX --with-db3=/opt/db-3.1.17 --enable-openssl && make && make install |
Optionally, you may remove Berkeley DB-3.1.17 installed above with this command:
rm -rf /opt/db-3.1.17 |
--enable-compat185: Build support for older database files.
--prefix=/opt/db-3.1.17: This version of the Berkeley Database should not be installed in /usr, as it is only needed for the building of Evolution.
--with-db3=/opt/db-3.1.17: Specify the location where db-3.1.17 is installed.
--enable-openssl: This flag will compile SSL support into Evolution.
--enable-openldap: This flag will compile LDAP support into Evolution.
This chapter contains applications that bundle all the essential needs of everyday office workers into one neat 'little' package. The benefits are a consistent user interface and cooperation between applications.
KOffice is the integrated office suite for KDE.
Download (HTTP): http://download.at.kde.org/pub/kde/stable/koffice-1.2.1/src/koffice-1.2.1.tar.bz2
Download (FTP): ftp://ftp.kde.org/pub/kde/stable/koffice-1.2.1/src/koffice-1.2.1.tar.bz2
Download size: 8.8 MB
Estimated Disk space required: 150 MB
Estimated build time: 44.89 SBU
KOffice also has many internationalization packages in the form of:
koffice-i18n-xx-1.2.1.tar.bz2 |
Install KOffice with the following commands:
./configure --prefix=/opt/kde-3.1.4 --disable-debug && make && make install |
The OpenOffice is a office suite, the Open Source sibling of StarOffice.
Download (HTTP): http://www.openoffice.org/dev_docs/source/1.1.0/
Download size: 155 MB
Estimated Disk space required: 3.0 GB
Estimated build time:
XFree86-4.3.0.1, J2SDK-1.4.1, Zip-2.3, UnZip-5.50, Tcsh-6.12.00, which-2.14
General Polygon Clipper Library (Required): ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z
Required patch (Disable building of mozilla addressbook): http://www.linuxfromscratch.org/patches/blfs/5.0/openoffice-1.1.0-no-mozab.patch
Required patch (Executable test is in /bin, not in /usr/bin): http://www.linuxfromscratch.org/patches/blfs/5.0/openoffice-1.1.0-test-bin-loc.patch
Required patch if Linux-PAM-0.77 is not installed: http://www.linuxfromscratch.org/patches/blfs/5.0/openoffice-1.1.0-no-pam.patch
The source TAR ball only contains English language help. A localized help content file may be available at http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/helpcontent/.
Apply the downloaded patches and copy gpc files.
mv ../gpc231/* external/gpc && rm -rf ../gpc231 && for p in ../openoffice-1.1.0-*.patch do patch -Np1 -i $p done |
If you want to optimize the build, edit solenv/inc/unxlngi4.mk and add the desired optimization flags to CFLAGSOPT variable. Some users have reported problems with -fomit-frame-pointer. The best option is to not use any custom optimizations. The following command removes an incorrect -mcpu option in the above file.
cd solenv/inc && cp unxlngi4.mk unxlngi4.mk.orig && sed -e "s:\-mcpu=pentiumpro::" \ unxlngi4.mk.orig > unxlngi4.mk && cd ../.. |
Configure openoffice using the following commands. You may build install sets for only specific languages based on your preferences. If a particular component is not available in the language of your choice, the default will be English. The following option compiles all available languages.
cd config_office/ && ./configure --with-lang=ALL && cd .. |
Compile OpenOffice using the following commands.
./bootstrap && bash -c "source LinuxIntelEnv.Set.sh; dmake" |
If you have downloaded localized help content zip files, you will need to unzip them to the appropriate directory as mentioned below and then recreate the installation set.
cd solver/645/unxlngi4.pro/pck && for i in $(ls ../../../../../helpcontent_*_unix.tgz) do tar -xvzf $i done && cd ../../../../instsetoo && rm -rf unxlngi4.pro && cd .. && bash -c "source LinuxIntelEnv.Set.sh ; dmake" |
Install OpenOffice using the following commands. The following commands install the English language set. To install a localized version, replace the 01 by the international telephone country code for your country. Note that when installing, it needs a X Display, even though there is no visible X window. You can use Xvfb if you are compiling on a console.
cd instsetoo/unxlngi4.pro/01/normal && cp install install.orig && sed -e "s:^oo_home=.*:oo_home=openoffice:" install.orig > install && ./install --prefix=/opt && for appl in swriter scalc sdraw simpress smath soffice do ln -sf /opt/openoffice/program/$appl /usr/bin/$appl done |
mv ../gpc231/gpc.* external/gpc: Copy the gpc files to the appropriate location.
--with-lang=ALL: Make install sets for all available languages.
./bootstrap: Create packages required to bootstrap the build.
dmake: Compile the package.
sed -e "s:^oo_home=...: Remove version specific installation directory
for appl in swriter scalc sdraw simpress smath soffice; do ...: Create links so that the package can be started from the command-line without changes to the existing path.
This chapter contains a wonderful selection of browsers. We hope you can find one you enjoy using or give them each a trial run.
Mozilla is a browser suite, the Open Source sibling of Netscape. It includes the browser, composer, mail client and an IRC client. A calendar component is also being built but it is not yet integrated into the stable Mozilla releases.
In this section we also mention the building of Mozilla Firebird, (a stand-alone browser based on the Mozilla source code) and Mozilla Thunderbird, (a stand-alone mail client based on the Mozilla source code). Since the build instructions for Mozilla Firebird and Mozilla Thunderbird are similar to Mozilla, only the changes required with respect to the Mozilla instructions are mentioned.
Download (HTTP): http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4/src/mozilla-source-1.4.tar.bz2
Download (FTP): ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4/src/mozilla-source-1.4.tar.bz2
Download size: 39 MB
Estimated Disk space required: 550 MB
Estimated build time: 22.64 SBU
Install Mozilla by running the following commands:
export MOZILLA_OFFICIAL="1" && export BUILD_OFFICIAL="1" && for p in ../mozilla-1.4-*.patch do patch -Np1 -i $p done |
According to the financial institutions, the following hack makes your browser insecure. You have been warned. Many sites use an MS-IE specific tag (autocomplete=off) to prevent autocomplete from working in some forms. This tag is now supported in Mozilla to appease the financial institutions. As per the requirements of the financial institutions, they will not even accept a solution where this a preference option. However our opinion is that it should be in the hands of the user. To enable autocomplete to bypass this restriction, we need to make a slight modification in the code.
Open the file extensions/wallet/src/wallet.cpp in the Mozilla source tree and search for the line:
#define WALLET_DONT_CACHE_ALL_PASSWORDS |
./configure --prefix=/usr \ --enable-default-mozilla-five-home \ --enable-toolkit-gtk2 --enable-default-toolkit=gtk2 \ --with-x --with-system-zlib \ --with-system-jpeg --with-system-png --with-system-mng \ --enable-xft --enable-crypto \ --enable-java-supplement \ --disable-accessibility \ --disable-tests --disable-debug \ --disable-logging --enable-reorder \ --enable-strip \ --enable-cpp-rtti --enable-extensions=all && make && make install && install -d /usr/include/mozilla-1.4/nss && cp -Lf dist/private/nss/*.h dist/public/nss/*.h \ /usr/include/mozilla-1.4/nss && ln -nsf mozilla-1.4 /usr/include/mozilla && ln -nsf mozilla-1.4 /usr/lib/mozilla && cd /usr/lib/mozilla-1.4 && export LD_LIBRARY_PATH="/usr/lib/mozilla-1.4" && export MOZILLA_FIVE_HOME="/usr/lib/mozilla-1.4" && ./regxpcom && ./regchrome && touch `find /usr/lib/mozilla-1.4 -name *.rdf` |
Each of these switches can be added to the configure line in order to have the described effect on the Mozilla compile.
--enable-elf-dynstr-gc: Removes un-referenced strings from ELF shared objects generated during the build. Note that this option breaks build on alpha.
--disable-mailnews: Disable the mail and news clients.
--disable-ldap: Disable LDAP Support, recommended if mail is disabled.
--enable-calendar: Build the calendar client. You will need to download the calendar source via CVS since it is not included with the release source. (Warning, this option is not yet stable).
--enable-xterm-updates: This option is for enabling the xterm title with the current command when compiling.
--enable-plaintext-editor-only: Disable support for HTML editing. Do not use this switch if you are building the mail-news component.
Add the following env variable (The variable is named Phoenix since that was the original name for the Mozilla Firebird project):
export MOZILLA_PHOENIX="1" |
Make sure that the following switches are passed to ./configure: --disable-calendar and --disable-mailnews.
We recommend installing in a separate prefix such as --prefix=/opt/firebird-0.6.1 to prevent clashes with an installed Mozilla.
The Mozilla Firebird executable is MozillaFirebird.
Add the following env variable:
export MOZ_THUNDERBIRD="1" |
Make sure that the following switches is passed to ./configure: --disable-calendar.
We recommend installing in a separate prefix such as --prefix=/opt/thunderbird-0.2 to prevent clashes with an installed Mozilla.
The Mozilla Thunderbird executable is thunderbird.
export MOZILLA_OFFICIAL="1" && export BUILD_OFFICIAL="1" |
--prefix=/usr: Previously mozilla did not support the make install option. Hence the package was installed in /opt. The package now supports "make install" and follows the FHS guidelines for installation. Hence the book now recommends installation in a system wide prefix such as /usr .
--enable-toolkit-gtk2 |
--with-system-zlib --with-system-jpeg \ --with-system-png --with-system-mng |
--enable-xft: Enable the Xft support. You need fontconfig or the latest XFree86 version to enable xft.
--enable-crypto: Enable the Personal Security Manager to enable SSL connections.
--disable-jsd --disable-accessibility \ --disable-tests --disable-debug \ --disable-dtd-debug \ --disable-logging --enable-reorder \ --enable-strip \ --enable-cpp-rtti |
--enable-extensions=...: Enables extensions. If you want, you can disable all extensions other than the browser by changing this switch to --enable-extensions="default,-venkman,-inspector,-irc".
install -d /usr/include/mozilla-1.4/nss cp -Lf dist/private/nss/*.h dist/public/nss/*.h \ /usr/include/mozilla-1.4/nss |
ln -nsf mozilla-1.4 ...: Mozilla installs headers and libraries in version specific directories. This link makes symbolic links so that applications that depend on Mozilla (such as OpenOffice , Galeon, etc.) don't need to know which version of Mozilla is installed.
export LD_LIBRARY_PATH="/usr/lib/mozilla-1.4" && export MOZILLA_FIVE_HOME="/usr/lib/mozilla-1.4" && ./regxpcom && ./regchrome && touch `find /usr/lib/mozilla-${VERSION} -name *.rdf` |
No specific configuration is required as long as the mozilla binary is in the path for the user. If Mozilla is installed in a non-standard location, then make a sym-link to the mozilla binary from /usr/bin. Same thing applies for Mozilla Firebird and Mozilla Thunderbird.
Many applications look for netscape when they need to open a browser. You may make the following symlink for convenience.
ln -sf mozilla /usr/bin/netscape |
For installing various Mozilla plugins, refer to Mozdev's PluginDoc Project
The Galeon package contains a GNOME browser that utilizes the Mozilla gecko rendering engine and presents the simplest interface possible for a browser.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/galeon/galeon-1.3.7.tar.gz
Download (FTP): ftp://ftp.linux.org.uk/mirrors/ftp.gnome.org/sources/galeon/1.3/galeon-1.3.7.tar.gz
Download size: 2.9 MB
Estimated Disk space required: 122.3 MB
Estimated build time: 1.95 SBU
Konqueror is the default graphical web browser for the KDE desktop environment. It is packaged and installed with kdebase-3.1.4.
Dillo is a fast, small footprint graphical browser. Although version 0.7.3 is alpha code, it is stable. Dillo does not support java or javascript, and the current version does not support FTP, HTTPS or frames. It is, however, very fast and so is useful on older, slower machines. It supports downloads and can support cookies.
Download (HTTP): http://www.dillo.org/download/dillo-0.7.3.tar.bz2
Download size: 345 KB
Estimated Disk space required: 14.2 MB
Estimated build time: 0.23 SBU
Install Dillo by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
System configuration can be done using /etc/dillorc. This can be edited to define proxies and the default home page.
Dillo stores its configuration in by user in their ~/.dillo directory. These files are created automatically when dillo is run. By default Dillo has cookies turned off, to turn cookies on, edit the file ~/.dillo/cookiesrc. The ~/.dillo/bookmarks.html file is created and added to by Dillo. It can also be edited with any HTML or text editor.
The Internet isn't just about browsing. Here are more graphical applications that utilize other areas of the Internet.
The Pan package contains a graphical newsreader. This is useful for reading and writing news, threading articles and replying via email.
Download (HTTP): http://pan.rebelbase.com/download/releases/0.14.2/SOURCE/pan-0.14.2.tar.bz2
Download size: 1.8 MB
Estimated Disk space required: 67.8 MB
Estimated build time: 0.72 SBU
The Balsa package contains a GNOME 2 based mail reader.
Download (HTTP): http://balsa.gnome.org/balsa-2.0.14.tar.bz2
Download size: 2.7MB
Estimated Disk space required: 74MB
Estimated build time: 0.82
Install Balsa by running the following commands:
./configure --prefix=$GNOME_PREFIX --localstatedir=/var/lib --with-ssl \ --sysconfdir=/etc/gnome --with-ldap --with-gpgme && make && make install |
--localstatedir=/var/lib: This switch puts ScrollKeeper files in /var/lib/scrollkeeper instead of $GNOME_PREFIX/var/scrollkeeper.
--with-ssl: Change the default of no ssl support.
--sysconfdir=/etc/gnome: This switch puts configuration files in /etc/gnome instead of $GNOME_PREFIX/etc.
--with-ldap: Change the default to support LDAP if it is available.
--with-gpgme: Change the default to support GPG if 'GnuPG made easy' (GPGME) is installed.
Many multimedia programs require libraries and/or drivers in order to function properly. The packages in this section fall into this category. Generally you only need to install these if you are installing a program which has the library listed as either a requirement, or as an option to enable it to support certain functionality.
The first question which people tend to ask about ALSA is why they should use it over the sound drivers included in the kernel - there are several reasons. First, the ALSA drivers support more sound cards than those in the kernel. Second, the OSS emulation is in some cases faster and better than the original OSS driver itself. And finally, there are some programs which can use ALSA's enhanced features to better drive the soundcard.
ALSA is also likely to be the future of Linux Sound (hence the name Advanced Linux Sound Architecture), and the ALSA drivers will probably be included into the main linux kernel at some point during the 2.5 development series, leading eventually to ALSA being the "standard" sound drivers into the future 2.6 stable kernel.
The following five sections of the book deal with the five separate components of ALSA: the drivers, the libraries, the utilities, the tools and the OSS compatibility libraries.
The ALSA Driver package contains the ALSA sound drivers. These are the next generation of sound drivers for Linux.
Download (HTTP): http://www.alsa-project.org/alsa/ftp/driver/alsa-driver-0.9.6.tar.bz2
Download (FTP): ftp://ftp.alsa-project.org/pub/driver/alsa-driver-0.9.6.tar.bz2
Download size: 1.5 MB
Estimated Disk space required: 22 MB (for all drivers)
Estimated build time: 0.55 SBU
Before installing the ALSA drivers note that in your kernel configuration you should have Sound Card Support (CONFIG_SOUND) enabled but nothing else in the Sound menu (with the possible exception of TV Card Mixer support. In particular you should not have OSS Sound Modules enabled as this will cause problems when loading the ALSA driver modules.
Note: Because ALSA drivers are kernel modules, they must be compiled with the same compiler the kernel has used.
Install ALSA Driver using the following commands as a template:
CC=/opt/gcc-2.95.3/bin/gcc ./configure \ --with-moddir=/lib/modules/`uname -r`/kernel/drivers/sound \ --with-kernel=/lib/modules/`uname -r`/build \ --with-sequencer=yes \ --with-oss=yes \ --with-isapnp=no \ --with-cards=all && make && make install |
If this is the first time you have installed the ALSA drivers, you will need to create the /dev entries using the script provided in the ALSA Driver source tree:
./snddevices |
--with-sequencer=yes: This tells the ALSA Driver package to build the sequencer modules for whichever soundcards for which you are building. Most people want them so you will usually want to leave it set to yes.
--with-oss=yes: This tells the package to build the OSS/Free emulation modules. Again, most people want this so it's probably best to stick with yes.
--with-isapnp=no: Most sound cards these days are PCI and so ISA Plug and Play support isn't needed. If you are using an ISA soundcard, it's best to say yes here.
--with-cards=all: You can tell the script just to build the drivers for your particular sound card here. For full information on which drivers are available see ./configure --help. If you aren't sure which chipset your soundcard uses, have a look in CARDS-STATUS in the ALSA Driver source tree. The default specified here will build all drivers.
To configure the ALSA drivers, you need to add some lines to /etc/modules.conf:
cat >> /etc/modules.conf << "EOF" alias char-major-14 soundcore alias char-major-116 snd alias snd-card-0 snd-[soundcard-name] alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-midi EOF |
[soundcard-name] needs to be replaced with the driver relevant to your soundcard. If you have more than one soundcard, you can add additional sections by repeating the above but changing the first 0 to 1 and so on.
After editing /etc/modules.conf you need to run depmod. If the drivers you have compiled are for the version of the kernel you are currently running, simply run
depmod |
If you are compiling drivers for a different kernel version than those you are running, you will need to use a line along the lines of:
depmod -a 2.4.22 -F /boot/System.map-2.4.22 |
The ALSA Library package contains the ALSA library. This is used by programs (including ALSA Utilities) which wish to use the ALSA sound interface.
Download (HTTP): http://www.alsa-project.org/alsa/ftp/lib/alsa-lib-0.9.6.tar.bz2
Download (FTP): ftp://ftp.alsa-project.org/pub/lib/alsa-lib-0.9.6.tar.bz2
Download size: 501 KB
Estimated Disk space required: 19 MB
Estimated build time: 0.41 SBU
Install ALSA Library by running the following commands:
./configure && make && make install |
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The ALSA Utilities package contains various utilities which are useful for controlling your sound card.
Download (HTTP): http://www.alsa-project.org/alsa/ftp/utils/alsa-utils-0.9.6.tar.bz2
Download (FTP): ftp://ftp.alsa-project.org/pub/utils/alsa-utils-0.9.6.tar.bz2
Download size: 106 KB
Estimated Disk space required: 1.8 MB
Estimated build time: 0.06 SBU
Install ALSA Utilities by running the following commands:
./configure && make && make install |
Probably the easiest way to store mixer levels is to set and retrieve them using a bootscript. It is possible to do this with a post-install line in /etc/modules.conf but this is left as an exercise for those readers who wish to do this.
The ALSA Driver package installs a script as /etc/rc.d/init.d/alsasound. While it is possible to use this script, it contains a lot of extraneous detail which isn't needed on an LFS system and so we create our own script /etc/rc.d/init.d/alsa.
To create the ALSA script, do the following:
cat > /etc/rc.d/init.d/alsa << "EOF" #!/bin/sh # Begin $rc_base/init.d/alsa # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org # ALSA specific parts by Mark Hymers - markh@linuxfromscratch.org # Stores mixer settings in the default location: /etc/asound.state source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting ALSA... Restoring volumes..." loadproc /usr/sbin/alsactl restore #echo " Loading MIDI font..." #loadproc sfxload /path/to/soundfont ;; stop) echo "Stopping ALSA... Saving volumes......" loadproc /usr/sbin/alsactl store #echo " Removing MIDI font.........." #loadproc sfxload -i ;; restart) $0 stop /usr/bin/sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac # End $rc_base/init.d/alsa EOF chmod 755 /etc/rc.d/init.d/alsa |
You can then create the appropriate symlinks:
cd /etc/rc.d/init.d && ln -sf ../init.d/alsa ../rc0.d/K35alsa && ln -sf ../init.d/alsa ../rc1.d/K35alsa && ln -sf ../init.d/alsa ../rc2.d/S40alsa && ln -sf ../init.d/alsa ../rc3.d/S40alsa && ln -sf ../init.d/alsa ../rc4.d/S40alsa && ln -sf ../init.d/alsa ../rc5.d/S40alsa && ln -sf ../init.d/alsa ../rc6.d/K35alsa |
Note that all channels of your soundcard are muted by default. You can use the alsamixer program from ALSA Utilities (or any other OSS mixer) to change this.
Also, the first time the above script is run, it will complain that there is no state in /etc/asound.state. You can prevent this by running the following commands after installing ALSA Utilities:
touch /etc/asound.state && alsactl store |
A final note is that the lines loading sfxload are commented out. They are there as an example of other things you may wish to do in the startup script. sfxload is a separate package of interest to SoundBlaster AWE and Live! users. It is designed for loading "sound-fonts" (which are used for MIDI output). You may wish to delete these lines and add your own or, if you have the relevant soundcard, install sfxload and uncomment them.
The ALSA Utilities package contains aconnect, alsactl, alsamixer, amixer, aplay, arecord and aseqnet.
The ALSA Tools package contains advanced tools for certain soundcards.
Download (HTTP): http://www.alsa-project.org/alsa/ftp/tools/alsa-tools-0.9.6.tar.bz2
Download (FTP): ftp://ftp.alsa-project.org/pub/tools/alsa-tools-0.9.6.tar.bz2
Download size: 1.3 MB
Estimated Disk space required: 6.8 MB (to compile all tools)
Estimated build time:
The ALSA Tools package is only needed by those with advanced requirements for their sound card. The tools are not all built together, instead you need to cd into the directory of each tool you wish to compile and run the following commands:
./configure && make && make install |
The tools available in this package are ac3dec, as10k1, envy24control, sb16_csp and sbiload.
The ALSA OSS package contains the ALSA OSS compatibility library. This is used by programs which wish to use the ALSA OSS sound interface
Download (HTTP): http://www.alsa-project.org/alsa/ftp/oss-lib/alsa-oss-0.9.6.tar.bz2
Download (FTP): ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-0.9.6.tar.bz2
Download size: 131 KB
Estimated Disk space required: 1.3 MB
Estimated build time: 0.04 SBU
Install ALSA OSS by running the following commands:
./configure && make && make install |
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The Analog Real-time Synthesizer (aRts) provides software that can simulate a complete "modular analog synthesizer" on your computer. It creates sounds and music using small modules like oscillators for creating waveforms, various filters, modules for playing data on your speakers, mixers, and faders. You can build a complete setup with the GUI of the system, using the modules - generators, effects and output - connected to each other.
aRts provides necessary libraries for KDE, however it can be installed as a standalone package. The installation instructions for aRts can be found in the aRts-1.1.4 portion of the KDE installation instructions.
The Audio File package contains the audio file libraries and two sound file support programs. These are useful to support basic sound file formats.
Download (HTTP): http://www.zentek-international.com/mirrors/gnome/desktop/2.0/2.0.1/sources/audiofile-0.2.3.tar.gz
Download (FTP): ftp://oss.sgi.com/projects/audiofile/download/audiofile-0.2.3.tar.gz
Download size: 332 KB
Estimated Disk space required: 17 MB
Estimated build time: 0.47 SBU
Install Audio File by running the following commands:
./configure --prefix=/usr && make && make install |
The Audio File package contains libaudiofile libraries, audiofile-config, sfinfo and sfconvert.
The libaudiofile library is used by programs to support AIFF, AIFF -compressed, Sun/NeXT, WAV and BIC audio formats.
The audiofile-config script is used during the compile process by programs linking to this library.
The EsounD package contains Enlightened Sound Daemon. This is useful for mixing together several digitized audio streams for playback by a single device.
Download (HTTP): http://ftp.gnome.org/pub/GNOME/sources/esound/0.2/esound-0.2.30.tar.bz2
Download (FTP): ftp://ftp.gnome.org/pub/GNOME/sources/esound/0.2/esound-0.2.30.tar.bz2
Download size: 348 KB
Estimated Disk space required: 3.0 MB
Estimated build time: 0.17 SBU
Install EsounD by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc && make && make install |
--sysconfdir=/etc: This switch puts configuration files in /etc instead of /use/etc.
The EsounD package contains esd, esdcat, esdctl, esdloop, esdmon, esdrec, esdsample and libesd libraries.
The Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multimedia software, such as games and emulators.
Download (HTTP): http://www.libsdl.org/release/SDL-1.2.6.tar.gz
Download size: 1.9 MB
Estimated Disk space required: 50.3 MB
Estimated build time: 0.72 SBU
ALSA-0.9.6, EsounD-0.2.30, aRts-1.1.4, NAS-1.6, NASM-0.98.38, XFree86-4.3.0.1, AAlib-1.4rc5 and DirectFB-0.9.19
Install SDL by running the following commands:
./configure --prefix=/usr --disable-debug && make && make install |
--disable-debug: This switch configures SDL to build with aggressive optimizations.
--enable-video-aalib: This optional switch is required to build SDL with AAlib video support.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
The libao package contains a cross-platform audio library. This is useful to output audio on a wide variety of platforms. It currently supports WAV files, OSS (Open Sound System), ESD (Enlighten Sound Daemon) and ALSA (Advanced Linux Sound Architecture).
Download (HTTP): http://fatpipe.vorbis.com/files/1.0/unix/libao-0.8.3.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/sound/ogg/libao-0.8.3.tar.gz
Download size: 212 KB
Estimated Disk space required: 1.7 MB
Estimated build time: 0.05 SBU
The libogg package contains the Ogg file structure. This is useful for creating (encoding) or playing (decoding) a single physical bit stream.
Download (HTTP): http://fatpipe.vorbis.com/files/1.0/unix/libogg-1.0.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/sound/ogg/libogg-1.0.tar.gz
Download size: 224 KB
Estimated Disk space required: 1.6 MB
Estimated build time: 0.03 SBU
The libvorbis package contains a general purpose audio and music encoding format. This is useful for creating (encoding) and playing (decoding) sound in an open (patent free) format.
Download (HTTP): http://fatpipe.vorbis.com/files/1.0/unix/libvorbis-1.0.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/sound/ogg/libvorbis-1.0.tar.gz
Download size: 736 KB
Estimated Disk space required: 24 MB
Estimated build time: 0.57 SBU
Install libvorbis by running the following commands:
./configure --prefix=/usr && make && make install |
libvorbis is known to cause compiler errors on certain machines. If you get errors, try these commands to install libvorbis:
./configure --prefix=/usr && cd lib && cp Makefile Makefile.bak && sed s/-mno-ieee-fp// Makefile.bak > Makefile && cd .. && make && make install |
The Network Audio System is a network transparent, client/server audio transport system. It can be described as the audio equivalent of an X server.
Download (HTTP): http://radscan.com/nas/nas-1.6.src.tar.gz
Download (FTP): ftp://ftp.azc.uam.mx/mirrors/gnu/xemacs/aux/nas-1.6.src.tar.gz
Download size: 1.0 MB
Estimated Disk space required: 13 MB
Estimated build time: 0.30 SBU
Install NAS by running the following commands:
patch -Np1 -i ../nas-1.6-bison-fix.patch && xmkmf && make Makefiles && make includes && make depend && make && make INCROOT=/usr/include USRLIBDIR=/usr/lib \ MANPATH=/usr/share/man BINDIR=/usr/bin \ LIBDIR=/usr/lib CONFIGDIR=/usr/X11R6/lib/X11/config \ install install.man |
xmkmf...: These commands use the standard for compiling X based applications.
make INCROOT=...: These commands install with the /usr prefix instead of the default /usr/X11R6 prefix. They also install the man pages.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
Libmpeg3 supports advanced editing and manipulation of MPEG streams.
Download (HTTP): http://aleron.dl.sourceforge.net/sourceforge/heroines/libmpeg3-1.5.2-src.tar.bz2
Download size: 611 KB
Estimated Disk space required: 7.0 MB
Estimated build time: 0.13 SBU
Install libmpeg3 by running the following commands:
make && make install && cp i686/libmpeg3.a /usr/lib && cp libmpeg3.h mpeg3private.h /usr/include |
cp i686/libmpeg3.a /usr/lib && cp libmpeg3.h mpeg3private.h /usr/include: Since make install doesn't copy the library and header files to proper locations, we have to do it manually.
Libmad is a high-quality MPEG audio decoder capable of 24-bit output.
Download (HTTP): http://flow.dl.sourceforge.net/sourceforge/mad/libmad-0.15.0b.tar.gz
Download (FTP): ftp://ftp.mars.org/pub/mpeg/libmad-0.15.0b.tar.gz
Download size: 398 KB
Estimated Disk space required: 3.8 MB
Estimated build time: 0.09 SBU
OpenQuicktime is a small library that handles the Quicktime file format on most varieties of Unix. Audio and video decoding and encoding is provided using a plug-in mechanism.
Download (HTTP): http://flow.dl.sourceforge.net/sourceforge/openquicktime/openquicktime-1.0-src.tgz
Download size: 313 KB
Estimated Disk space required: 8.6 MB
Estimated build time: 0.11 SBU
Install OpenQuicktime by running the following commands:
./configure --prefix=/usr && make && make install |
This package provides libopenquicktime library and utilities that allow you to manipulate Quicktime files.
libFAME is a fast (real-time) MPEG-1 as well as MPEG-4 rectangular and arbitrary shaped video encoding library.
Download (HTTP): http://flow.dl.sourceforge.net/sourceforge/fame/libfame-0.9.0.tar.gz
Download (FTP): ftp://sunsite.ccu.edu.tw/pub14/sourceforge/f/fame/libfame-0.9.0.tar.gz
Download size: 233 KB
Estimated Disk space required: 6.0 MB
Estimated build time: 1.17 SBU
Speex is an audio compression format designed especially for speech. It is well-adapted to Internet applications and provides useful features that are not present in most other CODECs.
Download (HTTP): http://www.speex.org/download/speex-1.0.1.tar.gz
Download size: 381 KB
Estimated Disk space required: 4.0 MB
Estimated build time: 0.13 SBU
id3lib is a library for reading, writing and manipulating ID3v1 and ID3v2 tags.
Download (HTTP): http://flow.dl.sourceforge.net/sourceforge/id3lib/id3lib-3.8.3.tar.gz
Download (FTP): ftp://sunsite.ccu.edu.tw/pub13/sourceforge/i/id3lib/id3lib-3.8.3.tar.gz
Download size: 928 KB
Estimated Disk space required: 39 MB
Estimated build time: 1.01 SBU
Install id3lib by running the following commands:
./configure --prefix=/usr && make && make install |
FLAC is an audio CODEC similar to MP3, but lossless, meaning that audio is compressed without throwing away any information.
Download (HTTP): http://flow.dl.sourceforge.net/sourceforge/flac/flac-1.1.0.tar.gz
Download size: 1.2 MB
Estimated Disk space required: 33 MB
Estimated build time: 0.71 SBU
Install FLAC by running the following commands:
./configure --prefix=/usr make && make install |
The FLAC package contains flac, metaflac, libFLAC, libFLAC++, libOggFLAC, libOggFLAC++ and libxmms-flac.
libdvdread is a library which provides a simple foundation for reading DVDs.
Download (HTTP): http://www.dtek.chalmers.se/groups/dvd/dist/libdvdread-0.9.4.tar.gz
Download (FTP): ftp://www.videolan.org/pub/videolan/vls/0.5.3/contrib/libdvdread-0.9.4.tar.gz
Download size: 251 KB
Estimated Disk space required: 4.0 MB
Estimated build time: 0.12 SBU
Install libdvdread by running the following commands:
./configure --prefix=/usr && make && make install |
libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.
Download (HTTP): http://www.videolan.org/pub/libdvdcss/1.2.8/libdvdcss-1.2.8.tar.bz2
Download (FTP): ftp://ftp.us.sinuspl.net/pub/src/libdvdcss-1.2.8.tar.bz2
Download size: 205 KB
Estimated Disk space required: 2.6 MB
Estimated build time: 0.07 SBU
libdv (Quasar DV) is a software CODEC for DV video, the encoding format used by most digital camcorders.
Download (HTTP): http://flow.dl.sourceforge.net/sourceforge/libdv/libdv-0.99.tar.gz
Download size: 351 KB
Estimated Disk space required: 8.5 MB
Estimated build time: 0.21 SBU
Install libdv by running the following commands:
./configure --prefix=/usr && make && make install |
liba52 is a free library for decoding ATSC A/52 (also known as AC-3) streams. The A/52 standard is used in a variety of applications, including digital television and DVD.
Download (HTTP): http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
Download size: 236 KB
Estimated Disk space required: 2.8 MB
Estimated build time: 0.07 SBU
XviD is a MPEG-4 compliant video CODEC.
Download (HTTP): http://files.xvid.org/downloads/xvidcore-0.9.2.tar.bz2
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/lib/xvidcore-0.9.2.tar.bz2
Download size: 486 KB
Estimated Disk space required: 5.1 MB
Estimated build time: 0.23 SBU
Install XviD by running the following commands:
cd build/generic && ./configure --prefix=/usr && make && make install && cp ../../src/divx4.h /usr/include |
cp ../../src/divx4.h /usr/include: This command puts this header files in the header search path in order for Xine and MPlayer to locate this package.
The XviD core package contains the libxvidcore library and the appendant header files. The library itself provides functions to encode and decode most MPEG-4 video data.
Following features of MPEG-4 are supported:
I, P Frame encoding
I-Frames are image frames, while P-Frames are Pattern Frames. Image Frames contain full images. P-Frames contain patterns of what changes in the image, thusly saving a lot of space.
PMVFast and EPZS with diamond a sqare pattern motion estimation
Fast Motion detection that can refer a square or diamond shaped pattern to different directions.
inter4v mode
Fast interpolation ability.
fullpixel and halfpixel precision
Even halfpixel movements can be encoded. Better precision results in better compression at better quality.
both MPEG-4 and H263 quantizations
MPEG-4 is the standard DivX was derived from. H263 is a slightly changed subset of that standard made by Microsoft. Quantization means to map the quantity of color values to numbers.
custom quant matrices
The quantization can be done using custom matrices, possibly giving better results if the matrix is made to suit the video data. Every normal user should be fine with the default matrix that comes with XviD.
Adaptive quantization / Luminance masking
Qantization and Luminance masking are variant, depending on the input material, therefore providing better results on dark or very contrasting images.
The xine Libraries package contains xine libraries. These are useful for interfacing with external plug-ins that allow the flow of information from the source to the screen and speakers.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/xine/xine-lib-1-rc0a.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/X11/xine-lib-1-rc0a.tar.gz
Download size: 4.0 MB
Estimated Disk space required: 59 MB
Estimated build time: 3.31 SBU
XFree86-4.3.0.1 and EsounD-0.2.30 or OSS or ALSA-0.9.6 or aRts-1.1.4
This chapter contains programs involved with audio file manipulation; that is to say playing, recording, ripping and the other common things which people want to do. To use much of this software, you will require either the kernel sound drivers installed, or ALSA-0.9.6 installed. Note that in the 2.5 kernel development tree, the old drivers are being replaced with ALSA and so when the stable 2.6 series arrives; most people will be using it by default.
The mpg123 package contains a console-based MP3 player. It claims to be the fastest MP3 decoder for Unix.
Download (HTTP): http://www.mpg123.de/mpg123/mpg123-0.59r.tar.gz
Download (FTP): ftp://alge.anart.no/pub/audio/mpg123-0.59r.tar.gz
Download size: 155 KB
Estimated Disk space required: 1.3 MB
Estimated build time: 0.20 SBU
The Vorbis Tools package contains command-line tools for OGG audio files. This is useful for encoding, playing or editing files using the Ogg CODEC.
Download (HTTP): http://fatpipe.vorbis.com/files/1.0/unix/vorbis-tools-1.0.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/sound/ogg/vorbis-tools-1.0.tar.gz
Download size: 420 KB
Estimated Disk space required: 3 MB
Estimated build time: 0.12 SBU
Install Vorbis Tools by running the following commands:
./configure --prefix=/usr && make && make install |
XMMS is an audio player for the X Window System.
Download (HTTP): http://www.xmms.org/files/1.2.x/xmms-1.2.7.tar.bz2
Download (FTP): ftp://ftp.xmms.org/xmms/1.2.x/xmms-1.2.7.tar.bz2
Download size: 11 MB
Estimated Disk space required: 17 MB
Estimated build time: 1.0 SBU
a working soundcard, XFree86-4.3.0.1, GTK+-1.2.10 and GLib-1.2.10
EsounD-0.2.30, GNOME Libraries-1.4.2, gnome-applets, libmikmod, libogg-1.0, libvorbis-1.0 and libxml-1.8.17
Install XMMS by running the following commands:
./configure --prefix=/usr --enable-one-plugin-dir && make && make install |
./configure --prefix=/usr --enable-one-plugin-dir: This command ensures that all plugins are located under /usr/lib/xmms/Plugins.
When you start xmms for the first time, you can configure it with CTRL+P Note that you can extend XMMS' functionality with plugins and skins. You can find these at http://xmms.org.
XMMS, which stands for X MultiMedia System, is a program comparable in function with WinAMP. It's main function is playing audio files like WAV and MP3. It can be extended with plugins to play a number of other audio or video formats. It's look can be customized with WinAMP style skins.
This script is used by other programs which need to link with xmms to retrieve the library and include paths.
The LAME package contains a MP3 encoder. This is useful for creating compressed audio files.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/lame/lame-3.93.1.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/mpeg/lame-3.93.1.tar.gz
Download size: 1 MB
Estimated Disk space required: 7.1 MB
Estimated build time: 0.93 SBU
The CDParanoia package contains cdparanoia. This is useful for extracting wave files from audio CD's. A CDDA capable CDROM drive is needed. Practically all drives supported by Linux can be used.
Download (HTTP): http://www.xiph.org/paranoia/download/cdparanoia-III-alpha9.8.src.tgz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/util/cd/cdparanoia-III-alpha9.8.src.tgz
Download size: 114 KB
Estimated Disk space required: 1.3 MB
Estimated build time: 0.29 SBU
Install CDParanoia by running the following commands:
./configure --prefix=/usr && make && make install |
CDParanoia itself needs little configuration; information can be found from the man page.
As with most libraries, there is no configuration to do, save that the library directory i.e. /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
This chapter always seems to be the favorite chapter. It's probably because there is a lot of satisfaction in playing your first video when you have spent so much time getting to that point. All the libraries, all the configurations and your reward is that you get to watch a movie. Not to worry though, there is always one more CODEC to install.
FFmpeg is a solution to record, convert and stream audio and video. Due to heavy development, not all of this functions will work.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/ffmpeg/ffmpeg-0.4.7.tar.gz
Download (FTP): ftp://sunsite.ccu.edu.tw/pub14/sourceforge/f/ffmpeg/ffmpeg-0.4.7.tar.gz
Download size: 1.2 MB
Estimated Disk space required: 32 MB
Estimated build time: 1.01 SBU
Install FFmpeg by running the following commands:
Note: The package maintainers recommend compiling without any optimizations.
./configure --prefix=/usr --enable-shared && make && make install |
--enable-shared: This switch is needed to build libavcodec and libavformat shared libraries.
~/.ffmpeg/ffserver-config
You'll find a sample ffserver configuration file at http://ffmpeg.sourceforge.net/sample.html
ffmpeg is a command-line tool to convert video files, network streams and input from a TV card to several video formats.
ffserver is a streaming server for everything that ffmpeg could use as input (files, streams, TV card input, webcam, etc.).
The Avifile package contains an AVI video file player, tools and support libraries. This is useful for viewing and editing AVI files.
Download (HTTP): http://heanet.dl.sourceforge.net/sourceforge/avifile/avifile-0.7-0.7.38.tar.gz
Download size: 2.8 MB
Estimated Disk space required: 46.0 MB
Estimated build time: 4.28 SBU
Install Avifile by running the following commands:
install -d /usr/lib/avifile-0.7/win32 && tar xzvf ../binaries-011002.tgz -C /usr/lib/avifile-0.7 && ./autogen.sh && ./configure && make maintainer-clean && ./autogen.sh && ./configure --prefix=/usr --with-qt-prefix=/opt/qt \ --with-win32-path=/usr/lib/avifile-0.7/win32 && make && make install |
./autogen.sh && ./configure && make maintainer-clean && ./autogen.sh: The author of this package used the old autoconf which leads to problems like configure not being able to detect some libraries and compilation errors. We fix this by rebuilding the configuration scripts.
The Avifile package contains aviplay, avibench, avifile-config, mmxnow-config, avirecompress, avicap, avirec, kv4lsetup, avicat, avitype and avimake.
aviplay manages the input formats, the CODECs and the output formats to display AVI video files on your screen.
avifile-config is run by configure for programs wishing to link to the Avifile library.
avirecompress is a widget that takes an input file of one CODEC type and converts it into a video file of another CODEC.
The MPlayer package contains an audio/video player that is able to play almost every audio and video CODEC and can be controlled by command line or GUI.
Download (HTTP): http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre1.tar.bz2
Download (FTP): ftp://ftp1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre1.tar.bz2
Download size: 4.0 MB
Estimated Disk space required: 67.2 MB
Estimated build time: 3.16 SBU
Required CODECs: http://www1.mplayerhq.hu/MPlayer/releases/codecs/extralite.tar.bz2
Required skin: http://www1.mplayerhq.hu/MPlayer/Skin/default-1.7.tar.bz2
Optional fonts: http://www1.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
Note: These are the minimum to install working MPlayer. For more CODECs, skins and fonts visit MPlayer's homepage.
Note: The package maintainers recommend building without any optimization
Install MPlayer by running the following commands:
install -d /usr/lib/mplayer/extralite && tar xjvf ../extralite.tar.bz2 -C /usr/lib/mplayer && ./configure --prefix=/usr --confdir=/etc/mplayer --enable-largefiles \ --enable-gui --enable-menu --enable-shared-pp \ --with-codecsdir=/usr/lib/mplayer/extralite && make && make install && make -C libavcodec/libpostproc install && cp etc/codecs.conf /etc/mplayer && tar xjvf ../default-1.7.tar.bz2 -C /usr/share/mplayer/Skin |
If FreeType is in use, the only advantage of prerendered fonts is that they are faster. Install them like this:
tar xjvf ../font-arial-iso-8859-1.tar.bz2 -C /usr/share/mplayer/font |
If you want DVD playback with MPlayer, you need to make a link from your DVD drive to /dev/dvd:
ln -s /dev/[dvd drive] /dev/dvd |
Replace [dvd drive] with whatever device is appropriate, for example /dev/hdc. if you don't know which device to choose, type:
dmesg | grep DVD |
It should result in an output like:
hdc: Pioneer DVD-ROM ATAPIModel DVD-114 0110, ATAPI CD/DVD-ROM drive |
If you have SCSI-Emulation activated for the drives, you'll need to get the right SCSI-device. Every CD/DVD-ROM drive is mapped in the same order as in IDE to the devices named /dev/scd0, /dev/scd1 and so on.
--enable-gui: This switch tells MPlayer to compile the GUI code.
--enable-menu: These switches enable the new menu support. It's like an OSD, but you can also run a shell with it.
--enable-shared-pp: This enables the building of a shared libpostproc (library for post processing, featuring filters like sharpen).
cp etc/codecs.conf /etc/mplayer: This command copies the standard codecs.conf file to the system-wide configuration directory. MPlayer expects this file at startup.
If you wish to utilize a FreeType font, you need to link a TTF file to your ~/.mplayer directory. For example:
ln -sf /usr/X11R6/lib/X11/fonts/TTF/luxisri.ttf /etc/mplayer/subfont.ttf |
ln -sf /usr/share/mplayer/font/font-arial-*-iso-8859-1 /etc/mplayer/font |
Set up the GUI with the following commands executed from your source directory:
cat > /etc/mplayer/config << "EOF" gui = yes skin = default EOF |
The first line, gui = yes, will make MPlayer start in GUI mode automatically. If you want to decide whether to start in GUI mode or not, leave that line out and start mplayer with -gui or as gmplayer (e.g. when starting from a Window Manager menu or command prompt).
mplayer manages the input formats, the CODECs and the output formats to play video files, DVDs, (S)VCDs or network streams containing audio and/or video information on your system.
Examples:
mplayer -fs blfs.avi mplayer -vo fbdev -fb /dev/fb0 -dvd 1 -aid 128 -sub en -framedrop mplayer -fs vcd://1 # works both for VCDs and SVCDs mplayer http://www.students.uni-marburg.de/~Klossa/hapkidofight_lo.mpg |
For further information, have a look at the very good documentation included in the package in the subdirectory DOCS/.
mencoder is used to encode any MPlayer playable movie to DivX4, XviD or any CODEC in libavcodec with PCM/MP3/VBRMP3 audio.
Example:
rm frameno.avi mencoder -dvd 1 -aid 128 -ovc frameno -oac mp3lame \ -lameopts vbr=3 -o frameno.avi # mencoder should output bitrates for average encodings # now, choose one you like best! In the following lines, # replace <bitrate> and <name.avi> with statements of your # personal liking. mencoder -dvd 1 -aid 128 -oac copy -ovc lavc \ -lavcopts vcodec=mpeg4:vpass=1:vhq:vbitrate=<bitrate> -o <name.avi> mencoder -dvd 1 -aid 128 -oac copy -ovc lavc \ -lavcopts vcodec=mpeg4:vpass=2:vhq:vbitrate=<bitrate> -o <name.avi> mencoder -forceidx <name.avi> |
The xine User Interface package contains a user interface for xine. This is useful for controlling the operations of your movie.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/xine/xine-ui-0.9.22.tar.gz
Download (FTP): ftp://ftp.yars.free.net/pub/software/unix/X11/xine-ui-0.9.22.tar.gz
Download size: 2.6 MB
Estimated Disk space required: 15.2 MB
Estimated build time: 0.68 SBU
Install xine User Interface by running the following commands:
./configure --prefix=/usr && make && make install |
transcode is a fast versatile command-line based audio/video everything to everything converter.
Download (HTTP): http://zebra.fh-weingarten.de/~transcode/pre/transcode-0.6.10.tar.gz
Download size: 2.9 MB
Estimated Disk space required: 109 MB
Estimated build time: 3.87 SBU
XFree86-4.3.0.1, MPlayer-1.0pre1, ImageMagick, libdv-0.99, libdvdread-0.9.4 mjpeg tools, SDL-1.2.6, Qt-3.2.1, Avifile-0.7.38, libFAME-0.9.0, libmpeg3-1.5.2, XviD-0.9.2, LZO-1.08, libxml2-2.5.11, liba52-0.7.4, FFmpeg-0.4.7, libmad-0.15.0b, cURL-7.10.7, libogg-1.0, libvorbis-1.0, Theora, libjpeg-6b, GLib-1.2.10, GTK+-1.2.10, FreeType-2.1.5, libmpeg3-1.5.2 and OpenQuicktime-1.0
Install transcode by running the following commands:
./configure --prefix=/usr && make && make install |
The transcode package contains transcode, tccat, tcdecode, tcdemux, tcextract, tcframe, tcprobe, tcscan, avicodec, avidump, avimerge, avisplit, avisync and input/filter/output modules.
transcode is the encoder's user interface that handles the plugins and other programs, being the glue between the modules. There are several well documented usage examples on either the homepage or the documentation included in the package.
tcdemux demultiplexes (separates) audio/video input that contains multiple streams, e.g. VOB files..
tcframe processes single video frames for different color encodings (RGB >-< YUV or similar).
avidump dumps audio or video stream of an given AVI file to stdout (for AVI conversion or extraction of audio streams).
avimerge merges AVI files of the same format. Do not try to merge AVI files of different formats, it will most likely result in errors (and format means same bitrates, too!).
avisync can shift audio in AVI files for better synchronizing of audio and video data signal.
Depending on the external libraries that are used, there are a great number of plugins to convert audio and video input to RAW format, process RAW video and audio and convert RAW audio and video to other formats to be written into a file type of choice. Read the documentation.
This chapter contains information on CD-writing in Linux. You will first have to configure your kernel for CD-writing. We start by discussing how to do this, then discuss installing the actual utilities.
Additional sources of information on CD-writing include:
In the kernel configuration, check your settings with those listed below for your CD-ROM interface type:
SCSI CD-writer:
SCSI support menu SCSI support: Y or M SCSI CD-ROM support: Y or M SCSI generic support: Y or M Vendor-specific extensions: [1] Also include the low-level driver for your SCSI card if applicable. |
IDE CD-writer:
ATA/IDE/MFM/RLL support menu IDE/ATAPI CDROM support: N SCSI emulation support: Y or M SCSI support menu SCSI support: Y or M SCSI CD-ROM support: Y or M SCSI generic support: Y or M Vendor-specific extensions: [1] |
[1] Read the help to determine if this selection is applicable for your hardware.
If necessary, recompile the kernel with
make CC=/opt/gcc-2.95.3/bin/gcc dep && make CC=/opt/gcc-2.95.3/bin/gcc bzImage && make CC=/opt/gcc-2.95.3/bin/gcc modules && make CC=/opt/gcc-2.95.3/bin/gcc modules_install |
Copy /usr/src/linux/arch/i386/boot/bzImage and /usr/src/linux/System.map to /boot. If you utilize LILO, edit /etc/lilo.conf appropriately and run lilo.
For more information about these settings and the drivers they install, read The Linux 2.4 SCSI subsystem HOWTO.
The Cdrtools package contains CD recording utilities. These are useful for reading, creating or writing (burning) Compact Discs.
Download (HTTP): http://gd.tuwien.ac.at/utils/schilling/cdrtools/cdrtools-2.00.3.tar.gz
Download (FTP): ftp://ftp.berlios.de/pub/cdrecord/cdrtools-2.00.3.tar.gz
Download size: 1.6 MB
Estimated Disk space required: 19.1 MB
Estimated build time: 0.44 SBU
Install Cdrtools by running the following commands:
make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root && make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root install |
INS_BASE=/usr: This command moves the install directory from /opt/schily to /usr.
DEFINSUSR=root DEFINSGRP=root: These commands install all programs with root.root ownership instead of the default bin:bin.
The Cdrtools package contains cdrecord, cdda2wav, mkisofs, mkhybrid, readcd, scgcheck, isoinfo, isodump, isovfy, isodebug, devdump, rscsi and support libraries.
The Cdrdao package contains CD recording utilities. These are useful for burning a CD in disk-at-once mode.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/cdrdao/cdrdao-1.1.7.src.tar.bz2
Download (FTP): ftp://ftp.gtlib.cc.gatech.edu/pub/rocklinux/ROCK-1.5/ext-archive/cdrdao/cdrdao-1.1.7.src.tar.bz2
Download size: 1.1 MB
Estimated Disk space required: 15.9 MB
Estimated build time:
The UDFtools package contains utilities for creating and mounting CD-RW disks with udf file systems for both reading and writing. UDF files systems are used on both CD-RW media and on DVD. For more details of the UDF file system standard see: http://www.osta.org and http://www.ecma-international.org.
Download (HTTP): http://aleron.dl.sourceforge.net/sourceforge/linux-udf/udftools-1.0.0b2.tar.gz
Download size: 236 Kb
Estimated Disk space required: 2.7 MB
Estimated build time:
Install the kernel patch by running the following commands from the kernel source directory:
patch -Np1 -i ../linux-2.4.20-packet.patch |
In the kernel configuration, check your setting with those listed here:
Block devices Packet writing on CD/DVD media: Y or M File Systems UDF filesystems support (read only): Y UDF write support (DANGEROUS) Y |
If necessary, recompile the kernel with
make CC=/opt/gcc-2.95.3/bin/gcc dep && make CC=/opt/gcc-2.95.3/bin/gcc bzImage && make CC=/opt/gcc-2.95.3/bin/gcc modules && make CC=/opt/gcc-2.95.3/bin/gcc modules_install |
Copy /usr/src/linux/arch/i386/boot/bzImage and /usr/src/linux/System.map to /boot. If you utilize LILO edit /etc/lilo.conf appropriately and run lilo.
If you build packet writer as a module, add the following to /etc/modules.conf:
alias block-major-97 pktcdvd |
Finally, create the packet driver device nodes in /dev, add one node for every CD-RW drive you want to support:
mknod /dev/pktcdvd0 b97 0 mknod /dev/pktcdvd1 b 97 1 |
Install UDFtools by running the following commands:
./configure --prefix=/usr && make && make install |
pktsetup is used to establish and break down associations between the kernel packet driver and a physical drive.
Example:
pktsetup /dev/pktcdvd0 /dev/scd0 mount /dev/pktcdvd0 /mnt/cdrom -t udf -o rw,noatime |
This chapter contains spooling printer management systems and ghostscript applications to render PostScript for display on terminals or paper.
The Common Unix Printing System (CUPS) is a print spooler and associated utilities. It is based on the "Internet Printing Protocol" and provides printing services to most PostScript and raster printers.
Download (HTTP): http://kitty.dnsalias.org/PKGS/SOURCES/cups-1.1.19-source.tar.bz2
Download (FTP): ftp://ftp.easysw.com/pub/cups/1.1.19/cups-1.1.19-source.tar.bz2
Download size: 3.5 MB
Estimated Disk space required: 32 MB
Estimated build time: 0.67 SBU
libjpeg-6b, libpng-1.2.5, libtiff-3.5.7, OpenSSL-0.9.7c, Linux-PAM-0.77, and Python-2.3.2
Install CUPS by running the following commands:
./configure && make && make install |
The basic default behavior of the installation is appropriate for LFS systems. CUPS files are placed in /usr/bin, /usr/sbin, /var and /etc/cups.
Configuration of CUPS is dependent on the type of printer and can be complex. Generally, PostScript printers are easier. For detailed instructions on configuration and use of CUPS, see http://www.cups.org/documentation.php. The Software Administrators Manual and Software Users Manual are particularly useful.
During the install, CUPS created the startup file /etc/rc.d/init.d/cups. The file works, but you may want to change it to a more conventional LFS startup file:
cat > /etc/rc.d/init.d/cups << "EOF" #!/bin/sh # Begin $rc_base/init.d/cups # Start or stop the CUPS server based upon the first argument to the script. source /etc/sysconfig/rc source $rc_functions case $1 in start) echo "Starting CUPS Printserver..." loadproc /usr/sbin/cupsd ;; stop) echo "Stopping CUPS Printserver..." killproc cupsd ;; reload) echo "Reloading CUPS Printserver..." reloadproc /usr/sbin/cupsd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc cupsd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/cups startup script. EOF |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/cups ../rc0.d/K00cups && ln -sf ../init.d/cups ../rc2.d/S99cups && ln -sf ../init.d/cups ../rc3.d/S99cups && ln -sf ../init.d/cups ../rc5.d/S99cups |
CUPS provides accept, cupsaddsmb, cupsd, cupstestppd, lpadmin, lpc, lpinfo, lpmove, reject, cancel, cups-config, disable, enable, lp, lpoptions, lppasswd, lpq, lpr, lprm, lpstat, libcups, libcupsimage and various scripts and filters.
The LPRng package contains an enhanced, extended and portable implementation of the Berkeley Line PRinter (LPR) print spooler. This is useful for queuing print jobs.
Download (HTTP): http://www.lprng.com/DISTRIB/LPRng/LPRng-3.8.22.tgz
Download (FTP): ftp://ftp.lprng.com/pub/LPRng/LPRng/LPRng-3.8.22.tgz
Download size: 15.4 MB
Estimated Disk space required: 59.5 MB
Estimated build time: 0.29 SBU
Install LPRng by running the following commands:
./configure --prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc && make && make install |
--libexecdir=/usr/sbin --sysconfdir=/etc: These switches prevent the default use of /usr/libexec and /usr/etc.
There is no generic printcap for all printers. A sample printcap is loaded into the etc directory which can be some help. Information is also available at http://www.lprng.org and http://www.linuxprinting.org.
The init script installed by LPRng is not consistent with BLFS scripts; therefore, we will create a new one with the following commands:
mv /etc/rc.d/init.d/lpd /etc/rc.d/init.d/lpd.orig && cat > /etc/rc.d/init.d/lpd << "EOF" #!/bin/sh # Begin $rc_base/init.d/lpd # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting lpd..." loadproc /usr/sbin/lpd ;; stop) echo "Stopping lpd..." killproc /usr/sbin/lpd ;; reload) echo "Reloading lpd..." reloadproc /usr/sbin/lpd ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc /usr/sbin/lpd ;; *) echo "Usage: $0 {start|stop|reload|restart|status}" exit 1 ;; esac # End $rc_base/init.d/lpd EOF chmod 755 /etc/rc.d/init.d/lpd |
Create the symbolic links to the lprng init script in the relevant rc.d directories with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/lpd ../rc0.d/K00lprng && ln -sf ../init.d/lpd ../rc1.d/K00lprng && ln -sf ../init.d/lpd ../rc2.d/S99lprng && ln -sf ../init.d/lpd ../rc3.d/S99lprng && ln -sf ../init.d/lpd ../rc4.d/S99lprng && ln -sf ../init.d/lpd ../rc5.d/S99lprng && ln -sf ../init.d/lpd ../rc6.d/K00lprng |
Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to different targets.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/ghostscript/ghostscript-8.11.tar.bz2
Download (FTP): ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs811/ghostscript-8.11.tar.bz2
Download size: 5.1 MB
Estimated Disk space required: 50-61 MB (depends on if libgs.so is installed)
Estimated build time: 1.31-2.48 SBU
Install Ghostscript by running the following commands:
./configure --prefix=/usr --libexecdir=/usr/lib/gs \ --sysconfdir=/etc/gs --enable-shared --enable-static && make && make install |
To install the shared library libgs.so, run the following commands additionally:
make so && make soinstall |
Note: The shared library depends on GTK+-1.2.10. It is only used in external programs like GSview-4.4.
To finish the installation, unpack all fonts you've loaded to /usr/share/ghostscript.
Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to different targets. ESP Ghostscript is a customized version of GNU Ghostscript that includes an enhanced configuration script, the CUPS raster driver to support CUPS raster printer drivers, and additional patches and drivers from various Linux distributors.
Download (HTTP): http://heanet.dl.sourceforge.net/sourceforge/espgs/espgs-7.07.1rc2-source.tar.bz2
Download size: 5.1 MB
Estimated Disk space required: 116-140 MB (depends on if libgs.so is installed)
Estimated build time: 1.65-3.20 SBU
Standard fonts: http://ftp.gnu.org/pub/gnu/ghostscript/gnu-gs-fonts-std-6.0.tar.gz
Other fonts: http://ftp.gnu.org/pub/gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz
Cyrillic fonts: ftp://ftp.gnome.ru/fonts/urw/release/urw-fonts-1.0.7pre22.tar.bz2
OMNI drivers: http://keihanna.dl.sourceforge.net/sourceforge/omniprint/Omni-0.9.0.tar.gz
Optional patch: http://www.linuxfromscratch.org/patches/blfs/5.0/espgs-7.07.1rc2-gdevpng.patch
CUPS-1.1.19, libjpeg-6b, libpng-1.2.5, XFree86-4.3.0.1, GLib-1.2.10, GTK+-1.2.10 and gimp-print
If you want to use OMNI drivers extract the source archive in Ghostscript directory:
tar xzvf ../Omni-0.9.0.tar.gz |
Otherwise you must add --without-omni switch to the configure script if you intend to install the shared library.
Install Ghostscript by running the following commands:
./configure --prefix=/usr && make && make install |
To install the shared library libgs.so you will need GTK+-1.2.10. Additionally, if you unpacked the OMNI drivers then you have to install GLib-1.2.10 and create these symlinks:
ln -s glib-1.2/glib.h /usr/include/glib.h && ln -s glib-1.2/gmodule.h /usr/include/gmodule.h && ln -s ../lib/glib/include/glibconfig.h /usr/include/glibconfig.h |
Proceed with the following commands:
patch -Np1 -i ../espgs-7.07.1rc2-gdevpng.patch && make so && make soinstall |
Remove the previously created symlinks since they are not needed any longer:
rm /usr/include/g{lib,module,libconfig}.h |
Note: The shared library is only used in external programs like GSview-4.4.
To finish the installation, unpack all fonts you've loaded to /usr/share/ghostscript.
--without-gimp-print: This switch disables the building of the GIMP print driver.
--without-ijs: This switch disables the IJS driver support.
Ghostscript comes with a lot of filters to render PostScript/PDF files back and forth. Please refer to the HTML documentation or try man gs. ESP Ghostscript provides pstoraster too.
pstoraster allows CUPS to filter output to non-PostScript printers. It is built and installed only if CUPS-1.1.19 is found.
This chapter contains scanning applications which allow us to convert printed documents into formatted documents readable by other applications.
SANE is short for Scanner Access Now Easy. Scanner access, however, is far from easy, since every vendor has their own protocols. The only known protocol that should bring some unity into this chaos is the TWAIN interface, but this is too imprecise to allow a stable scanning framework. Therefore, SANE comes with its own protocol, so the vendor drivers can't be used.
SANE is split into back ends and front ends. The back ends are drivers for the supported scanners. The front ends are user interfaces to access the backends.
Download (HTTP): http://www.mostang.com/sane
Download (FTP): ftp://ftp.mostang.com/pub/sane/sane-backends-1.0.12.tar.gz
Download (FTP): ftp://ftp.mostang.com/pub/sane/sane-frontends-1.0.11.tar.gz
Download size: 2.2 MB (Back ends), 174 kb (Front ends)
Estimated Disk space required: 31 MB (Back ends), 3.1 MB (Front ends)
Estimated build time:
To access your scanner, you will probably need the related kernel drivers. A SCSI scanner will need SCSI drivers, a parallel port scanner needs parallel port support (you should use enhanced EPP modes) and an USB scanner will need the USB scanner module and a SCSI system for emulation. Be sure that you have got the necessary devices to access the drivers.
--prefix=/usr: This switch installs all software in directories relative to /usr.
See http://www.mostang.com/sane/sane-supported-devices.html for a list of available backends.
XSane is another front end for SANE-1.0.12. It has additional features to improve the image quality compared to xscanimage.
Download (HTTP): http://gd.tuwien.ac.at/hci/sane/xsane/xsane-0.91.tar.gz
Download (FTP): ftp://ftp.mostang.com/pub/sane/xsane/xsane-0.91.tar.gz
Download size: 2.5 MB
Estimated Disk space required: 16 MB
Estimated build time:
Install XSane by running the following commands:
./configure --prefix=/usr && make && make install |
--prefix=/usr: This switch installs all software in directories relative to /usr.
XSane comes with a graphical user interface, and (if GIMP-1.2.5 is available) a GIMP plugin with advanced features. Please refer to the documentation for further support.
The GOCR contains a small OCR (Object Character Recognition) program. It is useful for reading text from a graphical input file. It works without training, but you'll need a high quality scan to get a good results.
GOCR can used as a console utility, but there is an GTK front end in the source package, also.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/jocr/gocr-0.37.tar.gz
Download (FTP): ftp://ftp.sourceforge.net/pub/sourceforge/jocr/gocr-0.37.tar.gz
Download size: 657 KB
Estimated Disk space required: 5.7 MB
Estimated build time:
TeX-2.0.2 or fig2dev (for examples), XFree86-4.3.0.1 and GTK+-1.2.10 (for front end only)
Install GOCR by running the following commands:
./configure --prefix=/usr && make && make install |
To install the GTK front end, use the following commands:
cd frontend/gnome && ./configure --prefix=/usr && make && make install |
To install the help:
make help |
To install the documentation:
make doc |
To run tests on GOCR:
make examples |
This chapter contains DocBook SGML document type definitions (DTDs), DocBook DSSSL Stylesheets and DocBook tools to validate, transform, format and publish DocBook documents.
The SGML Common package contains install-catalog. This is useful for creating and maintaining centralized SGML catalogs.
Download (HTTP): http://gd.tuwien.ac.at/hci/kde/devel/docbook/SOURCES/sgml-common-0.6.3.tgz
Download (FTP): ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/sgml-common-0.6.3.tgz
Download size: 75 KB
Estimated Disk space required: 648 KB
Estimated build time: 0.00 SBU
Install SGML Common by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man && make && make install && install-catalog --add /etc/sgml/sgml-ent.cat \ /usr/share/sgml/sgml-iso-entities-8879.1986/catalog && install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/sgml-ent.cat |
Update hint: Remove the above catalog items prior to upgrading with:
install-catalog --remove /etc/sgml/sgml-ent.cat \ /usr/share/sgml/sgml-iso-entities-8879.1986/catalog && install-catalog --remove /etc/sgml/sgml-docbook.cat \ /etc/sgml/sgml-ent.cat
The SGML Common package contains install-catalog, sgmlwhich, SGML entities files and XML entities files.
The DocBook SGML DTD package contains document type definitions for verification of SGML data files against the DocBook rule set. These are useful for structuring books and software documentation to a standard allowing you to utilize transformations already written for that standard.
Download (HTTP): http://www.docbook.org/sgml/3.1/docbk31.zip
Download (FTP): ftp://ftp.rutgers.edu/pub/kde/devel/docbook/SOURCES/docbk31.zip
Download size: 60 KB
Estimated Disk space required: 336 KB
Estimated build time: 0.01 SBU
Install DocBook SGML DTD by running the following commands:
cp docbook.cat docbook.cat.orig && sed -e '/ISO 8879/d' docbook.cat.orig > docbook.cat && cp docbook.cat docbook.cat.orig && sed -e '/gml/d' docbook.cat.orig > docbook.cat && cp docbook.cat docbook.cat.orig && sed -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \ docbook.cat.orig > docbook.cat && install -d /usr/share/sgml/docbook/sgml-dtd-3.1 && chown -R root:root . && chmod -R 755 . && install docbook.cat /usr/share/sgml/docbook/sgml-dtd-3.1/catalog && cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-3.1 && install-catalog --add /etc/sgml/sgml-docbook-dtd-3.1.cat \ /usr/share/sgml/docbook/sgml-dtd-3.1/catalog && install-catalog --add /etc/sgml/sgml-docbook-dtd-3.1.cat \ /etc/sgml/sgml-docbook.cat |
cp docbook.cat docbook.cat.orig sed -e '/ISO 8879/d' docbook.cat.orig > docbook.cat cp docbook.cat docbook.cat.orig sed -e '/gml/d' docbook.cat.orig > docbook.cat |
cp docbook.cat docbook.cat.orig sed -e 's|DTDDECL "-//OASIS//DTD Docbook V3.1//EN"|SGMLDECL|g' \ docbook.cat.orig > docbook.cat |
The above installation script updates the catalog.
Using only the most current 3.x version of DocBook SGML DTD requires the following:
cat >> /usr/share/sgml/docbook/sgml-dtd-3.1/catalog << "EOF" -- Begin Single Major Version catalog changes -- PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF |
The DocBook SGML DTD package contains document type definitions for verification of SGML data files against the DocBook rule set. These are useful for structuring books and software documentation to a standard allowing you to utilize transformations already written for that standard.
Download (HTTP): http://www.docbook.org/sgml/4.2/docbook-4.2.zip
Download (FTP): ftp://ftp.gtlib.cc.gatech.edu/pub/rocklinux/ROCK-1.5/ext-archive/docbook/docbook-4.2.zip
Download size: 68 KB
Estimated Disk space required: 376 KB
Estimated build time: 0.01 SBU
Install DocBook SGML DTD by running the following commands:
cp docbook.cat docbook.cat.orig && sed -e '/ISO 8879/d' docbook.cat.orig > docbook.cat && cp docbook.cat docbook.cat.orig && sed -e '/gml/d' docbook.cat.orig > docbook.cat && install -d /usr/share/sgml/docbook/sgml-dtd-4.2 && chown -R root:root . && chmod -R 755 . && install docbook.cat /usr/share/sgml/docbook/sgml-dtd-4.2/catalog && cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-4.2 && install-catalog --add /etc/sgml/sgml-docbook-dtd-4.2.cat \ /usr/share/sgml/docbook/sgml-dtd-4.2/catalog && install-catalog --add /etc/sgml/sgml-docbook-dtd-4.2.cat \ /etc/sgml/sgml-docbook.cat |
cp docbook.cat docbook.cat.orig sed -e '/ISO 8879/d' docbook.cat.orig > docbook.cat cp docbook.cat docbook.cat.orig sed -e '/gml/d' docbook.cat.orig > docbook.cat |
The above installation script updates the catalog.
Using only the most current 4.x version of DocBook SGML DTD requires the following:
cat >> /usr/share/sgml/docbook/sgml-dtd-4.2/catalog << "EOF" -- Begin Single Major Version catalog changes -- PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "docbook.dtd" PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF |
The OpenSP package contains a C++ Library for using SGML/XML files. This is useful for validating, parsing and manipulating SGML and XML documents.
Download (HTTP): http://download.sourceforge.net/openjade/OpenSP-1.5.tar.gz
Download (FTP): ftp://ftp.freestandards.org/pub/lsb/app-battery/packages/OpenSP-1.5.tar.gz
Download size: 1.3 MB
Estimated Disk space required: 16.1 MB
Estimated build time: 1.76 SBU
This patch removes some annoying messages that can appear while running openjade.
patch -Np1 -i ../OpenSP-1.5-LITLEN.patch patch -Np1 -i ../OpenSP-1.5-gcc33-1.patch |
Install OpenSP by running the following commands:
./configure --prefix=/usr --disable-static --enable-http \ --enable-default-catalog=/etc/sgml/catalog \ --enable-default-search-path=/usr/share/sgml && make pkgdatadir=/usr/share/sgml/OpenSP-1.5 && make pkgdatadir=/usr/share/sgml/OpenSP-1.5 install && ln -sf onsgmls /usr/bin/nsgmls && ln -sf osgmlnorm /usr/bin/sgmlnorm && ln -sf ospam /usr/bin/spam && ln -sf ospcat /usr/bin/spcat && ln -sf ospent /usr/bin/spent && ln -sf osx /usr/bin/sx && ln -sf osx /usr/bin/sgml2xml && ln -sf libosp.so /usr/lib/libsp.so && install-catalog --add /etc/sgml/OpenSP-1.5.cat \ /usr/share/sgml/OpenSP-1.5/catalog && install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/OpenSP-1.5.cat |
Update hint: Remove the above catalog items prior to upgrading with:
install-catalog --remove /etc/sgml/OpenSP-[version].cat \ /usr/share/sgml/OpenSP-[version]/catalog && install-catalog --remove /etc/sgml/sgml-docbook.cat \ /etc/sgml/OpenSP-[version].cat
--disable-static: This switch prevents the building of the static library.
--enable-http: This switch adds support for HTTP.
--enable-default-catalog=/etc/sgml/catalog: This switch sets the path to our centralized catalog.
--enable-default-search-path: This switch sets the default value of SGML_SEARCH_PATH.
--enable-xml-messages: This switch adds support for XML Formatted Messages.
make pkgdatadir=/usr/share/sgml/OpenSP-1.5: This sets the pkgdatadir variable in the Makefile from /usr/share/OpenSP to /usr/share/sgml/OpenSP-1.5.
ln -sf onsgmls /usr/bin/nsgmls ln -sf osgmlnorm /usr/bin/sgmlnorm ln -sf ospam /usr/bin/spam ln -sf ospcat /usr/bin/spcat ln -sf ospent /usr/bin/spent ln -sf osx /usr/bin/sx ln -sf osx /usr/bin/sgml2xml ln -sf libosp.so /usr/lib/libsp.so |
The OpenJade package contains a DSSSL engine. This is useful for SGML and XML transformations into RTF, TeX, SGML and XML.
Download (HTTP): http://telia.dl.sourceforge.net/openjade/openjade-1.3.2.tar.gz
Download (FTP): ftp://ftp.freestandards.org/pub/lsb/app-battery/packages/openjade-1.3.2.tar.gz
Download size: 880 KB
Estimated Disk space required: 14.5 MB
Estimated build time: 1.51 SBU
Install OpenJade by running the following commands:
./configure --prefix=/usr --enable-http --disable-static \ --enable-default-catalog=/etc/sgml/catalog \ --enable-default-search-path=/usr/share/sgml \ --datadir=/usr/share/sgml/openjade-1.3.2 && make && make install && ln -sf openjade /usr/bin/jade && ln -sf libogrove.so /usr/lib/libgrove.so && ln -sf libospgrove.so /usr/lib/libspgrove.so && ln -sf libostyle.so /usr/lib/libstyle.so && install -m644 dsssl/catalog /usr/share/sgml/openjade-1.3.2/ && install -m644 dsssl/*.dtd dsssl/*.dsl dsssl/*.sgm \ /usr/share/sgml/openjade-1.3.2 && install-catalog --add /etc/sgml/openjade-1.3.2.cat \ /usr/share/sgml/openjade-1.3.2/catalog && install-catalog --add /etc/sgml/sgml-docbook.cat /etc/sgml/openjade-1.3.2.cat |
--disable-static: This switch prevents the building of the static library.
--enable-http: This switch adds support for HTTP.
--enable-default-catalog=/etc/sgml/catalog: This switch sets the path to our centralized catalog.
--enable-default-search-path: This switch sets the default value of SGML_SEARCH_PATH.
--datadir=/usr/share/sgml/openjade-1.3.2: This switch puts data files in /usr/share/sgml/openjade-1.3.2 instead of /usr/share.
ln -sf openjade /usr/bin/jade ln -sf libogrove.so /usr/lib/libgrove.so ln -sf libospgrove.so /usr/lib/libspgrove.so ln -sf libostyle.so /usr/lib/libstyle.so |
The DocBook DSSSL Stylesheets package contains DSSSL stylesheets. These are used by OpenJade or other tools to transform SGML and XML DocBook files.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/docbook/docbook-dsssl-1.78.tar.gz
Download size: 384 KB
Estimated Disk space required: 4 MB
Estimated build time: 0.01 SBU
Install DocBook DSSSL Stylesheets by running the following commands:
mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/dtds/decls && mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/lib && mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/common && mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/html && mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/print && mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/test && mkdir -p /usr/share/sgml/docbook/dsssl-stylesheets-1.78/images && install bin/collateindex.pl /usr/bin && cp catalog VERSION /usr/share/sgml/docbook/dsssl-stylesheets-1.78 && cp dtds/decls/*.dcl \ /usr/share/sgml/docbook/dsssl-stylesheets-1.78/dtds/decls && cp lib/dblib.dsl /usr/share/sgml/docbook/dsssl-stylesheets-1.78/lib && cp common/*.dsl /usr/share/sgml/docbook/dsssl-stylesheets-1.78/common && cp common/*.ent /usr/share/sgml/docbook/dsssl-stylesheets-1.78/common && cp html/*.dsl /usr/share/sgml/docbook/dsssl-stylesheets-1.78/html && cp lib/*.dsl /usr/share/sgml/docbook/dsssl-stylesheets-1.78/lib && cp print/*.dsl /usr/share/sgml/docbook/dsssl-stylesheets-1.78/print && cp images/*.gif /usr/share/sgml/docbook/dsssl-stylesheets-1.78/images && install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ /usr/share/sgml/docbook/dsssl-stylesheets-1.78/catalog && install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/dsssl-docbook-stylesheets.cat |
The following configuration is necessary in order to utilize OpenJade to convert the BLFS Book from XML to HTML:
ln -sf {your home directory}/BLFS/BOOK/blfs.dsl \ /usr/share/sgml/docbook/dsssl-stylesheets-1.78/html/ |
If you would like to test Docbook XML DTD, DocBook DSSSL Stylesheets and OpenJade against the BLFS book, use the following command. The commands are written for a CVS checkout to your home directory with output going to the present working directory, so make any necessary modifications for your setup.
mkdir introduction postlfs general connect basicnet server \ content x kde gnome xsoft multimedia pst preface appendices other && openjade -t sgml \ -d /usr/share/sgml/docbook/dsssl-stylesheets-1.78/html/blfs.dsl \ /usr/share/sgml/docbook/dsssl-stylesheets-1.78/dtds/decls/xml.dcl \ ~/BLFS/BOOK/index.xml |
This chapter contains the DocBook XML document type definition (DTD) and DocBook Stylesheets which are used to validate, transform, format and publish DocBook documents.
The DocBook XML DTD-4.2 package contains document type definitions for verification of XML data files against the DocBook rule set. These are useful for structuring books and software documentation to a standard allowing you to utilize transformations already written for that standard.
Download (HTTP): http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip
Download (FTP): ftp://ftp.us.sinuspl.net/pub/src/docbook-xml-4.2.zip
Download size: 84 KB
Estimated Disk space required: 468 KB
Estimated build time: 0.01 SBU
Install DocBook XML DTD by running the following commands:
install -d /usr/share/xml/docbook/xml-dtd-4.2 && cp -af docbook.cat *.dtd ent/ *.mod /usr/share/xml/docbook/xml-dtd-4.2 && if [ ! -e /etc/xml/catalog ]; then mkdir -p /etc/xml; xmlcatalog --noout \ --create /etc/xml/catalog; fi && if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create \ /etc/xml/docbook; fi && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V4.2//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/dbpoolx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.2//EN" \ "http://oasis-open.org/docbook/xml/4.2/docbookx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V4.2//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/dbcentx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V4.2//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/dbnotnx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.2//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/dbgenent.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.2//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/dbhierx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/soextblx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V4.2//EN" \ "file:///usr/share/xml/docbook/xml-dtd-4.2/calstblx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/4.2" \ "file:///usr/share/xml/docbook/xml-dtd-4.2" \ /etc/xml/docbook && xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/4.2" \ "file:///usr/share/xml/docbook/xml-dtd-4.2" \ /etc/xml/docbook && xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//ENTITIES DocBook XML" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//DTD DocBook XML" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" /etc/xml/catalog |
The above installation script creates the files and updates the catalog. We need to make additional entries in order to process the BLFS book:
xmlcatalog --noout --add "delegateSystem" \ "/usr/share/docbook/" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "delegateURI" \ "/usr/share/docbook/" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "rewriteSystem" \ "/usr/share/docbook" \ "file:///usr/share/xml/docbook/xml-dtd-4.2" \ /etc/xml/docbook && xmlcatalog --noout --add "rewriteURI" \ "/usr/share/docbook" \ "file:///usr/share/xml/docbook/xml-dtd-4.2" \ /etc/xml/docbook |
In order to install ScrollKeeper or to utilize DocBook XML DTD V4.2 when V4.1.2 is requested in the System Identifier, make the following entry:
xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V4.1.2//EN" \ "http://oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "delegateSystem" \ "http://oasis-open.org/docbook/xml/4.1.2/" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "delegateURI" \ "http://oasis-open.org/docbook/xml/4.1.2/" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "rewriteSystem" \ "http://oasis-open.org/docbook/xml/4.1.2" \ "file:///usr/share/xml/docbook/xml-dtd-4.2" \ /etc/xml/docbook && xmlcatalog --noout --add "rewriteURI" \ "http://oasis-open.org/docbook/xml/4.1.2" \ "file:///usr/share/xml/docbook/xml-dtd-4.2" \ /etc/xml/docbook |
The DocBook XSL Stylesheets package contains XSL stylesheets. These are useful for performing transformations on XML DocBook files.
Download (HTTP): http://telia.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-1.62.4.tar.gz
Download (FTP): ftp://ftp.us.sinuspl.net/pub/src/docbook-xsl-1.62.4.tar.gz
Download size: 1.3 MB
Estimated Disk space required: 12.2 MB
Estimated build time: 0.01 SBU
Install DocBook XSL Stylesheets by running the following commands:
install -d /usr/share/xml/docbook/xsl-stylesheets-1.62.4 && cp -af VERSION common extensions fo html htmlhelp images javahelp lib \ manpages params profiling template tools xhtml \ /usr/share/xml/docbook/xsl-stylesheets-1.62.4 && install -d /usr/share/doc/xml && cp -af doc/* /usr/share/doc/xml && if [ ! -f /etc/xml/catalog ]; then mkdir -p /etc/xml; xmlcatalog --noout \ --create /etc/xml/catalog; fi && if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create \ /etc/xml/docbook; fi && xmlcatalog --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/1.45" \ "/usr/share/xml/docbook/xsl-stylesheets-1.62.4" /etc/xml/catalog && xmlcatalog --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/1.45" \ "/usr/share/xml/docbook/xsl-stylesheets-1.62.4" /etc/xml/catalog && xmlcatalog --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ "/usr/share/xml/docbook/xsl-stylesheets-1.62.4" /etc/xml/catalog && xmlcatalog --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ "/usr/share/xml/docbook/xsl-stylesheets-1.62.4" /etc/xml/catalog && xmlcatalog --noout --add "delegateSystem" \ "http://docbook.sourceforge.net/release/xsl/" \ "file:///etc/xml/docbook" /etc/xml/catalog && xmlcatalog --noout --add "delegateURI" \ "http://docbook.sourceforge.net/release/xsl/" \ "file:///etc/xml/docbook" /etc/xml/catalog |
The above installation script creates the files and updates the catalog.
If you would like to test DocBook XML DTD and DocBook XSL Stylesheets against the BLFS book, use the following command. The command is written for a CVS checkout to your home directory with output going to the present working directory, so make any necessary modifications for your setup.
xsltproc --nonet -o index.html \ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \ ~/BLFS/BOOK/index.xml |
This chapter includes applications that create, manipulate or view PostScript files and view Portable Document Format PDF files.
a2ps is a filter utilitized mainly in the background and primarily by printing scripts to convert almost every input format into PostScript output. The application's name expands appropriately to "all to PostScript".
Download (HTTP): http://ftp.gnu.org/gnu/a2ps/a2ps-4.13b.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/a2ps/a2ps-4.13b.tar.gz
Download size: 1.9 MB
Estimated Disk space required: 19.2 MB
Estimated build time: 0.26 SBU
Install a2ps by running the following commands:
cd contrib && cp Makefile.in Makefile.in.orig && sed -e "s:emacs::" Makefile.in.orig > Makefile.in && cd .. && cp configure{,.orig} && sed -e 's|/usr/local/share/ghostscript|/usr/share/ghostscript|g' \ configure.orig > configure ./configure --prefix=/usr \ --sysconfdir=/etc/a2ps --localstatedir=/var \ --with-medium=letter && make && make install |
cd contrib && cp Makefile.in Makefile.in.orig && sed -e "s:emacs::" Makefile.in.orig > Makefile.in && cd .. && |
cp configure{,.orig} && sed -e 's|/usr/local/share/ghostscript|/usr/share/ghostscript|g' \ configure.orig > configure |
--sysconfdir=/etc/a2ps: Configuration data goes to /etc/a2ps instead of /usr/etc.
--with-medium=letter: This switch changes the default paper format of A4 to letter. Installations that utilize A4 would eliminate this switch.
Enscript converts ASCII files to PostScript.
Download (HTTP): http://ftp.gnu.org/gnu/enscript/enscript-1.6.1.tar.gz
Download (FTP): ftp://ftp.gnu.org/gnu/enscript/enscript-1.6.1.tar.gz
Download size: 636 kb
Estimated Disk space required: 6.8 MB
Estimated build time: 0.10 SBU
Install enscript by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc/enscript \ --localstatedir=/var --with-media=letter && make && make install |
Note: Remove --with-media=letter to the configure options if your medium format is A4.
PSUtils is a set of utilities to manipulate PostScript files.
Download (HTTP): http://gd.tuwien.ac.at/publishing/tex/tex-utils/psutils/psutils-p17.tar.gz
Download (FTP): ftp://ftp.knackered.org/pub/psutils/psutils-p17.tar.gz
Download size: 68 KB
Estimated Disk space required: 740 KB
Estimated build time: 0.01 SBU
Install PSUtils by running the following commands:
cat Makefile.unix | sed -e 's/\/usr\/local/\/usr/g' > Makefile && make && make install |
cat ... | sed ...: This command creates a Makefile that installs the program to the /usr prefix instead of the /usr/local prefix.
The PSUtils package contains psbook, psselect, pstops psnup, psresize, epsffit, getafm, showchar, fixdlsrps, fixfmps, fixmacps, fixpsditps , fixpspps, fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, extractres , includeres, psmerge.
GSview is a viewer for PostScript and PDF using X.
Download (HTTP): http://gd.tuwien.ac.at/publishing/ghostscript/ghostgum/gsview-4.4.tar.gz
Download (FTP): ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/gsview-4.4.tar.gz
Download size: 875 KB
Estimated Disk space required: 24 MB
Estimated build time: 0.26 SBU
GTK+-1.2.10 and AFPL Ghostscript-8.11 or ESP Ghostscript-7.07.1rc2 (with libgs.so installed)
GSview uses netscape to browse through the online help. BLFS does not install Netscape, but has other browsers from which to choose. Simply edit srcunx/gvxreg.c using the following sed script with your browsers executable file name substituting for [browser]:
mv srcunx/gvxreg.c srcunx/gvxreg.old && cat srcunx/gvxreg.old | sed s/netscape/[browser]/ > srcunx/gvxreg.c |
Install GSview by running the following commands:
patch -Np1 -i ../gsview-4.4-gvx.patch && sed 's|GSVIEW_ROOT=/usr/local|GSVIEW_ROOT=/usr|' \ srcunx/unx.mak > Makefile && make && make install |
Xpdf is a viewer for Adobe's free Portable Document Format (PDF) which is both fast and small and comes with some useful command-line utilities.
Download (HTTP): http://gd.tuwien.ac.at/publishing/xpdf/xpdf-2.02pl1.tar.gz
Download (FTP): ftp://ftp.foolabs.com/pub/xpdf/xpdf-2.02pl1.tar.gz
Download size: 472 KB
Estimated Disk space required: 20.4 MB
Estimated build time: 0.35 SBU
Install Xpdf by running the following commands:
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ --with-freetype2-includes=/usr/include/freetype2 \ --with-freetype2-library=/usr/lib \ --with-appdef-dir=/usr/X11R6/lib/X11/app-defaults/ && make && make install |
--enable-a4-paper: This switch must be added to set DIN A4 as the standard paper format.
In the etc directory you will find a sample xpdfrc that can be either copied to ~/.xpdfrc or taken as example to write your own configuration file.
# Example .xpdfrc displayFontT1 Times-Roman /usr/share/ghostscript/fonts/n021003l.pfb displayFontT1 Times-Italic /usr/share/ghostscript/fonts/n021023l.pfb displayFontT1 Times-Bold /usr/share/ghostscript/fonts/n021004l.pfb displayFontT1 Times-BoldItalic /usr/share/ghostscript/fonts/n021024l.pfb displayFontT1 Helvetica /usr/share/ghostscript/fonts/n019003l.pfb displayFontT1 Helvetica-Oblique /usr/share/ghostscript/fonts/n019023l.pfb displayFontT1 Helvetica-Bold /usr/share/ghostscript/fonts/n019004l.pfb displayFontT1 Helvetica-BoldOblique /usr/share/ghostscript/fonts/n019024l.pfb displayFontT1 Courier /usr/share/ghostscript/fonts/n022003l.pfb displayFontT1 Courier-Oblique /usr/share/ghostscript/fonts/n022023l.pfb displayFontT1 Courier-Bold /usr/share/ghostscript/fonts/n022004l.pfb displayFontT1 Courier-BoldOblique /usr/share/ghostscript/fonts/n022024l.pfb displayFontT1 Symbol /usr/share/ghostscript/fonts/s050000l.pfb displayFontT1 ZapfDingbats /usr/share/ghostscript/fonts/d050000l.pfb fontDir /usr/X11R6/lib/X11/fonts/truetype psFile "|lpr" psPaperSize letter textEOL unix t1libControl low freetypeControl low urlCommand "links -g %s" |
This chapter includes applications that create output equivalent to typesetting.
TeX is a typesetting package, able to create documents in a variety of formats. The optional texmfsrc TAR ball contains source code for packages that are contained in the texmf TAR ball, including the docstrip sources.
Download (FTP): ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/2.0/distrib/tetex-src-2.0.2.tar.gz
Download (FTP): ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/2.0/distrib/tetex-texmf-2.0.2.tar.gz
Optional Download (FTP): ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/2.0/distrib/tetex-texmfsrc-2.0.2.tar.gz
Download size: 52 MB
Estimated Disk space required: 175 MB
Estimated build time: 2.97 SBU
TeX is installed from the source directory (usually /usr/src) and untarring instructions are included below instead of the usual assumption that you have already untarred the package. The source directory should contain the two required packages and the optional package, if desired.
Install TeX by running the following commands:
mkdir -p /usr/share/texmf && tar zxvf tetex-src-2.0.2.tar.gz && cd tetex-src-2.0.2 && gzip -dc ../tetex-texmf-2.0.2.tar.gz \ | (umask 0; cd /usr/share/texmf; tar xvf -) |
If the optional texmf source code TAR ball was downloaded, untar it now:
gzip -dc ../tetex-texmfsrc-2.0.2.tar.gz \ | (umask 0; cd /usr/share/texmf; tar xvf -) |
./configure --with-x=no --prefix=/usr \ --without-texinfo --with-system-ncurses --with-system-zlib \ --exec-prefix=/usr --bindir=/usr/bin && make world && texconfig dvips paper letter && texconfig font rw |
gzip -dc ../teTeX-texmf-2.0.2.tar.gz \ | (umask 0; cd /usr/share/texmf; tar xvf -) |
--with-x=no: This switch will avoid any XFree86 dependencies. TeX can be compiled with XFree86 support, notably for xdvi. If this is desired, remove this configure option.
--exec-prefix=/usr --bindir=/usr/bin: This switch will insure that TeX binaries will be installed in /usr/bin.
--without-texinfo: A default LFS installation already has the texinfo package installed; we will avoid overwriting it with the included texinfo package.
--with-system-ncurses: This switch specifies using the already installed libncurses library.
--with-system-zlib: LFS Systems starting with version 4.0 have zlib installed as part of the base operating system; we can avoid building it here.
texconfig dvips paper letter: This command sets the default paper size for TeX.
texconfig font rw: This command specifies writable fonts.
The TeX package contains 125 separate binaries. Please refer to file:///usr/share/texmf/doc/index.html for details, as well as a tour of the expansive TeX documentation.
This section lists all of the symlinks used by the lfs-bootscripts package (correct as of version 1.9) and all of the scripts in the BLFS book. This is for two reasons: first, so that you can see at a glance which number we have used for each package, and second so that we can see which number we have used for each package! Without this, it would make our lives more difficult (as we'd probably end up with conflicts).
It should go without saying that this is not the only (or some would argue even optimal) setup for the symlinks. In the LFS tradition, you should find what suits you and use that; our recommendations are only a template.
Table A-1. rc0.d symlinks
Number | Title | Link | Explanation |
K00 | cups | ../init.d/cups | Shut down Common Unix printing system: CUPS-1.1.19 |
K00 | lprng | ../init.d/lprng | Shut down LPR print spooler: LPRng-3.8.22 |
K05 | gdm | ../init.d/gdm | Shut down GNOME display manager Daemon: GDM-2.4.1.4 |
K08 | fcron | ../init.d/fcron | Shut down Cron Daemon: Fcron-2.9.3 |
K10 | gpm | ../init.d/gpm | Shut down General Purpose Mouse Daemon: GPM-1.20.1 |
K25 | postfix | ../init.d/postfix | Shut down Postfix MTA: Postfix-2.0.16 |
K26 | mysql | ../init.d/mysql | Shut down MySQL Daemon: MySQL-4.0.15 |
K26 | postgresql | ../init.d/postgresql | Shut down PostgreSQL Daemon: PostgreSQL-7.3.4 |
K28 | apache | ../init.d/apache | Shut down Apache Daemon: Apache-2.0.47 |
K30 | sshd | ../init.d/sshd | Shut down Secure Shell Daemon: OpenSSH-3.7.1p2 |
K35 | alsa | ../init.d/alsa | Save volume settings: ALSA-0.9.6 |
K40 | sysklogd | ../init.d/sysklogd | Stop system and kernel logging: Part of LFS base. |
K45 | random | ../init.d/random | Save random seed: random |
K48 | samba | ../init.d/samba | Stop network file system: Samba-2.2.8a |
K48 | NFS | ../init.d/nfs | Stop network file system: |
K49 | adsl | ../init.d/adsl | Stops the ADSL client: RP-PPPoE-3.5 |
K49 | portmap | ../init.d/portmap | Stop Forwarding RPC requests: portmap-5 |
K49 | xinetd | ../init.d/xinetd | Stop Internet services daemon: xinetd-2.3.12 |
K49 | bind | ../init.d/bind | Stop named services daemon (DNS): BIND-9.2.2 |
K50 | sendsignals | ../init.d/sendsignals | Kill processes: Part of LFS base. |
K59 | firewall | ../init.d/firewall | Unset firewall settings: Firewalling |
K60 | mountfs | ../init.d/mountfs | Unmount all file systems: Part of LFS base. |
K70 | swap | ../init.d/swap | Turn off swap: Part of LFS base. |
K80 | network | ../init.d/network | Shut down networking: Part of LFS base. |
K90 | localnet | ../init.d/localnet | Remove loopback interface: Part of LFS base. |
K99 | halt | ../init.d/halt | Shut down system: Part of LFS base. |
Table A-2. rc1.d symlinks
Number | Title | Link | Explanation |
K00 | lprng | ../init.d/lprng | Shut down LPR print spooler: LPRng-3.8.22 |
K05 | gdm | ../init.d/gdm | Shut down GNOME display manager Daemon: GDM-2.4.1.4 |
K10 | gpm | ../init.d/gpm | Shut down General Purpose Mouse Daemon: GPM-1.20.1 |
K25 | postfix | ../init.d/postfix | Shut down Postfix MTA: Postfix-2.0.16 |
K26 | mysql | ../init.d/mysql | Shut down MySQL Daemon: MySQL-4.0.15 |
K26 | postgresql | ../init.d/postgresql | Shut down PostgreSQL Daemon: PostgreSQL-7.3.4 |
K28 | apache | ../init.d/apache | Shut down Apache Daemon: Apache-2.0.47 |
K30 | sshd | ../init.d/sshd | Shut down Secure Shell Daemon: OpenSSH-3.7.1p2 |
K35 | alsa | ../init.d/alsa | Save volume settings: ALSA-0.9.6 |
K48 | samba | ../init.d/samba | Stop network file system: Samba-2.2.8a |
K48 | NFS | ../init.d/nfs | Stop network file system: |
K49 | adsl | ../init.d/adsl | Stops the ADSL client: RP-PPPoE-3.5 |
K49 | portmap | ../init.d/portmap | Stop Forwarding RPC requests: portmap-5 |
K49 | xinetd | ../init.d/xinetd | Stop Internet services daemon: xinetd-2.3.12 |
K49 | bind | ../init.d/bind | Stop named services daemon (DNS): BIND-9.2.2 |
K59 | firewall | ../init.d/firewall | Unset firewall settings: Firewalling |
K80 | sysklogd | ../init.d/sysklogd | Shut down networking: Part of LFS base. |
K90 | network | ../init.d/network | Shut down networking: Part of LFS base. |
Table A-3. rc2.d symlinks
Number | Title | Link | Explanation |
K05 | gdm | ../init.d/gdm | Shut down GNOME display manager Daemon: GDM-2.4.1.4 |
K10 | gpm | ../init.d/gpm | Shut down General Purpose Mouse Daemon: GPM-1.20.1 |
K25 | postfix | ../init.d/postfix | Shut down Postfix MTA: Postfix-2.0.16 |
K26 | mysql | ../init.d/mysql | Shut down MySQL Daemon: MySQL-4.0.15 |
K26 | postgresql | ../init.d/postgresql | Shut down PostgreSQL Daemon: PostgreSQL-7.3.4 |
K28 | apache | ../init.d/apache | Shut down Apache Daemon: Apache-2.0.47 |
K30 | sshd | ../init.d/sshd | Shut down Secure Shell Daemon: OpenSSH-3.7.1p2 |
K48 | samba | ../init.d/samba | Stop network file system: Samba-2.2.8a |
K48 | NFS | ../init.d/nfs | Stop network file system: |
K49 | adsl | ../init.d/adsl | Stops the ADSL client: RP-PPPoE-3.5 |
K49 | portmap | ../init.d/portmap | Stop Forwarding RPC requests: portmap-5 |
K49 | xinetd | ../init.d/xinetd | Stop Internet services daemon: xinetd-2.3.12 |
K49 | bind | ../init.d/bind | Stop named services daemon (DNS): BIND-9.2.2 |
K59 | firewall | ../init.d/firewall | Unset firewall settings: Firewalling |
K90 | network | ../init.d/network | Shut down networking: Part of LFS base. |
S10 | sysklogd | ../init.d/sysklogd | Start system and kernel logging: Part of LFS base. |
S25 | random | ../init.d/random | Restore random seed: random |
S40 | alsa | ../init.d/alsa | Start up sound system: ALSA-0.9.6 |
S40 | fcron | ../init.d/fcron | Start Cron Daemon: Fcron-2.9.3 |
S99 | cups | ../init.d/cups | Start the Common Unix printing system: CUPS-1.1.19 |
S99 | lprng | ../init.d/lprng | Start the LPR print spooler: LPRng-3.8.22 |
Table A-4. rc3.d symlinks
Number | Title | Link | Explanation |
K05 | gdm | ../init.d/gdm | Shut down GNOME display manager Daemon: GDM-2.4.1.4 |
S10 | sysklogd | ../init.d/sysklogd | Start system and kernel logging: Part of LFS base. |
S20 | network | ../init.d/network | Start networking: Part of LFS base. |
S21 | firewall | ../init.d/firewall | Load firewall settings: Firewalling |
S22 | bind | ../init.d/bind | Start named services daemon (DNS): BIND-9.2.2 |
S22 | portmap | ../init.d/portmap | Forwards RPC requests: portmap-5 |
S23 | xinetd | ../init.d/xinetd | Load Internet services daemon: xinetd-2.3.12 |
S24 | adsl | ../init.d/adsl | Starts the ADSL client: RP-PPPoE-3.5 |
S24 | NFS | ../init.d/nfs | Start network file system: |
S24 | samba | ../init.d/samba | Start network file system: Samba-2.2.8a |
S25 | random | ../init.d/random | Restore random seed: random |
S30 | sshd | ../init.d/sshd | Start Secure Shell Daemon: OpenSSH-3.7.1p2 |
S32 | apache | ../init.d/apache | Start Apache Daemon: Apache-2.0.47 |
S34 | mysql | ../init.d/mysql | Start MySQL Daemon: MySQL-4.0.15 |
S34 | postgresql | ../init.d/postgresql | Start PostgreSQL Daemon: PostgreSQL-7.3.4 |
S35 | postfix | ../init.d/postfix | Start Postfix MTA: Postfix-2.0.16 |
S40 | alsa | ../init.d/alsa | Start up sound system: ALSA-0.9.6 |
S40 | fcron | ../init.d/fcron | Start Cron Daemon: Fcron-2.9.3 |
S70 | gpm | ../init.d/gpm | Start the General Purpose Mouse Daemon: GPM-1.20.1 |
S99 | cups | ../init.d/cups | Start the Common Unix printing system: CUPS-1.1.19 |
S99 | lprng | ../init.d/lprng | Start the LPR print spooler: LPRng-3.8.22 |
Table A-5. rc4.d symlinks
Number | Title | Link | Explanation |
K05 | gdm | ../init.d/gdm | Shut down GNOME display manager Daemon: GDM-2.4.1.4 |
S10 | sysklogd | ../init.d/sysklogd | Start system and kernel logging: Part of LFS base. |
S20 | network | ../init.d/network | Start networking: Part of LFS base. |
S21 | firewall | ../init.d/firewall | Load firewall settings: Firewalling |
S22 | bind | ../init.d/bind | Start named services daemon (DNS): BIND-9.2.2 |
S22 | portmap | ../init.d/portmap | Forwards RPC request: portmap-5 |
S23 | xinetd | ../init.d/xinetd | Load Internet services daemon: xinetd-2.3.12 |
S24 | adsl | ../init.d/adsl | Starts the ADSL client: RP-PPPoE-3.5 |
S24 | NFS | ../init.d/nfs | Start network file system: |
S24 | samba | ../init.d/samba | Start network file system: Samba-2.2.8a |
S25 | random | ../init.d/random | Restore random seed: random |
S30 | sshd | ../init.d/sshd | Start Secure Shell Daemon: OpenSSH-3.7.1p2 |
S32 | apache | ../init.d/apache | Start Apache Daemon: Apache-2.0.47 |
S34 | mysql | ../init.d/mysql | Start MySQL Daemon: MySQL-4.0.15 |
S34 | postgresql | ../init.d/postgresql | Start PostgreSQL Daemon: PostgreSQL-7.3.4 |
S35 | postfix | ../init.d/postfix | Start Postfix MTA: Postfix-2.0.16 |
S40 | alsa | ../init.d/alsa | Start up sound system: ALSA-0.9.6 |
S40 | fcron | ../init.d/fcron | Start Cron Daemon: Fcron-2.9.3 |
S70 | gpm | ../init.d/gpm | Start the General Purpose Mouse Daemon: GPM-1.20.1 |
S99 | lprng | ../init.d/lprng | Start the LPR print spooler: LPRng-3.8.22 |
Table A-6. rc5.d symlinks
Number | Title | Link | Explanation |
S10 | sysklogd | ../init.d/sysklogd | Start system and kernel logging: Part of LFS base. |
S20 | network | ../init.d/network | Start networking: Part of LFS base. |
S21 | firewall | ../init.d/firewall | Load firewall settings: Firewalling |
S22 | bind | ../init.d/bind | Start named services daemon (DNS): BIND-9.2.2 |
S22 | portmap | ../init.d/portmap | Forwards RPC requests: portmap-5 |
S23 | xinetd | ../init.d/xinetd | Load Internet services daemon: xinetd-2.3.12 |
S24 | adsl | ../init.d/adsl | Starts the ADSL client: RP-PPPoE-3.5 |
S24 | NFS | ../init.d/nfs | Start network file system: |
S24 | samba | ../init.d/samba | Start network file system: Samba-2.2.8a |
S25 | random | ../init.d/random | Restore random seed: random |
S30 | sshd | ../init.d/sshd | Start Secure Shell Daemon: OpenSSH-3.7.1p2 |
S32 | apache | ../init.d/apache | Start Apache Daemon: Apache-2.0.47 |
S34 | mysql | ../init.d/mysql | Start MySQL Daemon: MySQL-4.0.15 |
S34 | postgresql | ../init.d/postgresql | Start PostgreSQL Daemon: PostgreSQL-7.3.4 |
S35 | postfix | ../init.d/postfix | Start Postfix MTA: Postfix-2.0.16 |
S40 | alsa | ../init.d/alsa | Start up sound system: ALSA-0.9.6 |
S40 | fcron | ../init.d/fcron | Start Cron Daemon: Fcron-2.9.3 |
S70 | gpm | ../init.d/gpm | Start the General Purpose Mouse Daemon: GPM-1.20.1 |
S95 | gdm | ../init.d/gdm | Start the GNOME display manager Daemon: GDM-2.4.1.4 |
S99 | cups | ../init.d/cups | Start the Common Unix printing system: CUPS-1.1.19 |
S99 | lprng | ../init.d/lprng | Start the LPR print spooler: LPRng-3.8.22 |
Table A-7. rc6.d symlinks
Number | Title | Link | Explanation |
K00 | lprng | ../init.d/lprng | Shut down LPR print spooler: LPRng-3.8.22 |
K05 | gdm | ../init.d/gdm | Shut down GNOME display manager Daemon: GDM-2.4.1.4 |
K08 | fcron | ../init.d/fcron | Shut down Cron Daemon: Fcron-2.9.3 |
K10 | gpm | ../init.d/gpm | Shut down General Purpose Mouse Daemon: GPM-1.20.1 |
K25 | postfix | ../init.d/postfix | Shut down Postfix MTA: Postfix-2.0.16 |
K26 | mysql | ../init.d/mysql | Shut down MySQL Daemon: MySQL-4.0.15 |
K26 | postgresql | ../init.d/postgresql | Shut down PostgreSQL Daemon: PostgreSQL-7.3.4 |
K28 | apache | ../init.d/apache | Shut down Apache Daemon: Apache-2.0.47 |
K30 | sshd | ../init.d/sshd | Shut down Secure Shell Daemon: OpenSSH-3.7.1p2 |
K35 | alsa | ../init.d/alsa | Save volume settings: ALSA-0.9.6 |
K40 | sysklogd | ../init.d/sysklogd | Stop system and kernel logging: Part of LFS base. |
K45 | random | ../init.d/random | Save random seed: random |
K48 | samba | ../init.d/samba | Stop network file system: Samba-2.2.8a |
K48 | NFS | ../init.d/samba | Stop network file system: |
K49 | adsl | ../init.d/adsl | Stops the ADSL client: RP-PPPoE-3.5 |
K49 | portmap | ../init.d/portmap | Stop Forwarding RPC requests: portmap-5 |
K49 | xinetd | ../init.d/xinetd | Stop Internet services daemon: xinetd-2.3.12 |
K49 | bind | ../init.d/bind | Stop named services daemon (DNS): BIND-9.2.2 |
K50 | sendsignals | ../init.d/sendsignals | Kill processes: Part of LFS base. |
K59 | firewall | ../init.d/firewall | Unset firewall settings: Firewalling |
K60 | mountfs | ../init.d/mountfs | Unmount all file systems: Part of LFS base. |
K70 | swap | ../init.d/swap | Turn off swap: Part of LFS base. |
K80 | network | ../init.d/network | Shut down networking: Part of LFS base. |
K90 | localnet | ../init.d/localnet | Remove loopback interface: Part of LFS base. |
K99 | reboot | ../init.d/halt | Reboot system: Part of LFS base. |
When you want to install a package to a location other than /, or /usr, you are installing outside the default environment settings on most machines. The following examples should assist you in determining how to correct this situation. The examples cover the complete range of settings that may need updating, but they are not all needed in every situation.
Expand the PATH to include $PREFIX/bin.
Expand the PATH for root to include $PREFIX/sbin.
Add $PREFIX/lib to /etc/ld.so.conf or expand LD_LIBRARY_PATH to include it. Before using the latter option, check out http://www.visi.com/~barr/ldpath.html.
Add $PREFIX/man to /etc/man.conf or expand MANPATH.
Add $PREFIX/info to INFOPATH.
Add $PREFIX/lib/pkgconfig to PKG_CONFIG_PATH.
Add $PREFIX/include to CPPFLAGS when compiling packages that depend on the package you installed.
Asymmetric Digital Subscriber Line
Audio Interchange File Format
Advanced Linux Sound Architecture
Application Programming Interface
American Standard Code for Information Interchange
AT-Attached
Advanced Television Systems Committee
Accessibility ToolKit
Berkeley/IRCAM/CARL
Berkeley Internet Name Domain
Basic Input/Output System
Beyond Linux From Scratch
Bit MaP
Compact Disk
Compact Disc Digital Audio
Common Internet File System
See Also: SMB.
COmpression/DECompression module
Common Object Request Broker Architecture
Color Rendering Dictionary
Color Space Array
Contents Scrambling System
Cascading Style Sheets
Common Unix Printing System
Concurrent Versions System
Data Encryption Standard
Dynamic Host Configuration Protocol
German Industrial Norm
Domain Name Service
Disk Operating System
Dynamic Shared Objects
Document Style Semantics and Specification Language
DeVice Independent
Enhanced Parallel Port
Encapsulated PostScript
Enlighten Sound Daemon
File Alteration Monitor
Fast Assembly Mpeg Encoder
Frequently Asked Questions
Facsimile
Frame Buffer
File Hierarchy Standard
Free Lossless Audio CODEC
Formatted Objects
FOUR Character Code
File Transfer Protocol
GNU Compiler Collection
GNU DataBase Manager
GTK+ Drawing Kit
Group IDentity
Graphics Interchange Format
GNU Multiple Precision Arithmetic
GNU NYU Ada 9x Translator
GNU Network Object Model Environment
GNU's Not Unix
General Public License
General Purpose Mouse
GIMP ToolKit
Graphical User Interface
Hierarchical File System
HyperText Markup Language
HyperText Transfer Protocol
Hang UP
International Color Consortium
Internet Control Message Protocol
Integrated Drive Electronics
Interface Definition Language
Ink Jet Systems
Internet Message Access Protocol
Inode MONitor
Internet Protocol
See Also: TCP.
Internetwork Packet eXchange
Internet Relay Chat
Infrared Data Association
Integrated Services Digital Network
Internet Service Provider
Java ARchive
Java Development Kit
JPEG File Interchange Format>
Joint Photographic Experts Group
K Desktop Environment
Lame Ain't an MP3 Encoder
Local Area Network
Lightweight Directory Access Protocol
Lightweight Data Interchange Format
Linux From Scratch
Library General Public License
Line PRinter
Lemple-Ziv-Oberhumer
Message-Digest
Mail Delivery Agent
Musical Instrument Digital Interface
Multipurpose Internet Mail Extensions
Multiple-image Network Graphics
Moving Picture Experts Group
Mail Transport Agent
Mail User Agent
Netwide ASseMbler
Network News Transfer Protocol
Network File System
Object Activation Framework
OMNIdirectional
Object Request Broker
See Also: CORBA.
Object Relational Database Management System
Open Sound System
Pluggable authentication Modules
Peripheral Component Interconnect
Primary Domain Controller
Portable Document Format
Personal Information Manager
Portable Grey Map
PHP Hypertext Preprocessor
Pretty Good Privacy
Portable Network Graphics
Post Office Protocol
PostScript Printer Description
Portable Pixel Map
Point to Point Protocol
Point to Point Protocol over Ethernet
Random Access Memory
Revision Control System
Request For Comments
Red Green Blue
Read-Only Memory
Roaring Penguin
Remote Procedure Call
Secure/MIME
Scanner Access Now Easy
Static Binutils Units
Source Code Control System
Small Computer System Interface
Software Development Kit
Standard Generalized Markup Language
Server Message Block
Simple Mail Transfer Protocol
Simple Object Access Protocol
Structured Query Language
Secure SHell
Secure Sockets Layer
Set User IDentity
Scalable Vector Graphics
Super Video Graphics Array
Tool Command Language
Transmission Control Protocol
Tag(ged) Image File Format
Transport Layer Security
Universal Disk Format
User IDentity
User Datagram Protocol
User Interface
Uniform Resource Locator
Universal Serial Bus
Upstream Ready
Unix-to-Unix Copy Protocol
Video Electronics Standards Association
Video Graphics Array
Video OBject
World Wide Web
X Display Manager Control Protocol
eXtensible Markup Language
eXtensible Style Language
eXtensible Style Language Transformation
X/Open System Management
X MultiMedia System
Luminance-Bandwidth-Chrominance