Sample Proposal
![]()
Linux for Webmasters
by Paul Dunne
Back to main Adler & Robin Books page
(Linux for Webmasters was published by Digital Press)
ABOUT THE AUTHOR
Paul Dunne is a freelance writer, specialising in Linux, Unix and the
Internet. He ran a computer consultancy firm before taking up writing
full-time. This company was active in: installing and configuring Linux
for a variety of roles, including Web server, general Internet server,
and development machine; installing TCP/IP networks; and database
programming. He writes regularly for specialist computing titles in the
UK, including EXE, PC Support Advisor and Linux World; and will shortly
be writing several new documents for the Linux "HOWTO" series. He has
retained an interest in computer consulting, in the form of a joint
project with another consulting firm to develop an Electronic Point of
Sale system running under Linux.
OVERVIEW
"Linux, A Personal View" attempts to differentiate itself from the other
Linux books now on the market, by providing practical examples of how
the author has used Linux to solve many day to day computing problems,
as well as covering the more common topic of how things work. This
"dual theme" will make the book a more interesting read, more useful,
and more noticeable in the market. The book takes the reader through all
the steps of getting, installing, configuring and using Linux. Chapters
on basic linux commands and basic system administration give the user an
easy introduction to what can be a intimidating and complex system.
Other topics include: connecting to the Internet; programming;
configuring the popular Unix GUI, the X-Window system; and what to do
when things go wrong. The more essential applications are covered in
some depth, and pointers are given which enable the reader to acquire
much more information on any subject. A useful bibliography is
provided.
THE MARKET
The audience can be divided into a number of segments. The first
segment is computer professionals who may be interested in using Linux
at work - as a Web server, for example - and who need reliable
documentation on how to install and configure Linux and the associated
software to do what they want. The second is those for whom computing
is a hobby. They will be installing Linux at home, perhaps as a cheap
way of learning Unix; and they will need a book that tells them what's
what. Finally, I would hope that existing Linux users might find
something to interest them in the book, as I will concentrate on
providing both a useful reference and a guide to practical uses for
Linux.
This audience is now served by one magazine in the States, "Linux
Journal", and a new magazine, "Linux World", published in Britain.
There are several others in Italian, Spanish, and probably other
languages. Interest in Linux has grown in the more mainstream computing
press over the last eighteen months: I have written several introductory
articles myself, and have seen many more. There is an annual "Linux
Kongress" in Berlin, and a strong Linux presence at the various Unix
conferences in the US throughout the year. There is a very active
presence on the Internet: in the USENET comp.os.linux.* hierarchy
(hundreds of messages per day); in many dedicated Web sites across the
world; and in the extensive Linux section that many archive sites now
have.
Numbers of Linux users are very hard to quantify accurately, as it is
not a commercial product - there is no Linux marketing department out
there chalking up the numbers. There is the "Linux Counter" project
(http://domen.uninett.no/~hta/linux/counter.html), a voluntary
registration scheme; according to extrapolations from the figures
collected there, Linux users now run to hundreds of thousands worldwide.
As an example of real world use, some 9% of Web sites in a recent survey were running Linux. (http://www.caldera.com).
THE COMPETITION
OK, first, a select list of similar books that I know something about:
o Running Linux, by Matt Welsh, O'Reilly, 1995
This is a much-expanded version of the first book on Linux, "Linux
Installation and Getting Started", which appeared as an electronic
text sometime in 1993. (The original e-text is published
by SSC now). It has some claim to being the definitive Linux book.
Its big problem is that it is not readable cover to cover; whereas
its ancestor most definitely was. It has suffered from "bloat", as
some software is said to. This is a problem that afflicts most
Linux books. Having said all that, this is the one book on Linux
that I have paid money for!
o Using Linux, Que, 1995
I thought this one was poor. Very big and heavy, but too much of
that bulk is due to padding, large fonts, lots of space; and not
enough to useful information. Comes with
a companion CD-ROM with an old Linux distribution on. This,
unfortunately, is the pattern for several other Linux books whose
names I cannot recall, that I have noticed making their appearance
in book shops over the past year.
o Inside Linux, SSC, 1996
A very good book, but not aimed at the same market. It concentrates
on the internals of the OS, and it's general place among other OSs.
o From PC to Workstation, Springer-Verlag, 1995 (I think)
This is a German title, available in translation. It comes with a
(rather out of date) Linux distribution on CD-ROM. I am not
familiar with the contents; I do recall that the installation
instructions for the accompanying CD were criticised in review as
sometimes vague and misleading and in one instance wrong.
Now, why is mine better than these?
Firstly, there is a tendency for most books on Linux to be rather
over-inclusive; often, a lot of their content is information that is
applicable to any Unix, and indeed to other topics such as the Internet,
and is therefore strictly speaking superfluous. Of course, some of this
is essential, for Linux is a Unix clone; but what I want to concentrate
on is what makes Linux useful for me and hopefully the reader; and not
in providing potted tutorials in writing html, etc.
Secondly, there is very little in any of these books, with the partial
exception of "Running Linux", about the practical uses a Linux system
can be put to. Even in the O'Reilly book, most of the examples are
contrived. I have done a lot of work with Linux, indeed I use it for
all my computing needs; so I have a wealth of experience to pass on in
the book. (This is not to say that the authors of the other books have
not; I know that Matt Welsh, for instance, has long been heavily
involved with Linux; but this doesn't come across much in his book; and
yet his is by far the best in this respect).
Of course, it would be if anything easier to grind out another big, fat
Linux book - and it may be that this is all that publishers are
interested in - but I feel that that market is a little crowded, and
that there is an opening for a less encyclopaediac, more instructive and
reflective, work.
Since my wish is to avoid the "encyclopaedia effect", I aim to have a
book that can be read at a sitting, as well as used as a reference. My
model here is the classic "The Unix Programming Environment", which
suits both uses admirably. None of the above have succeeded in this.
Lastly, there is the, admittedly subjective, question of style. Here, I
think I can offer something that none of the other books can. My style
is elegant, yet clear and concise; due to the fact, I suppose, that I am
a professional writer (and to literary pretensions when younger!) The
other books tend to err either on the side of excessive verbosity
("Running Linux") or overdone terseness ("Inside Linux"). Making a book
readable is not the least important part of writing it!
By the by, the question of bundling a CD-ROM with the book is a moot
one. Certainly, it makes for perceived added value; and it is not
expensive to stick an old version of Slackware on the back and charge an
extra tenner for the privilege. The actual worth of such an extra to
the reader is doubtful. It is worth noting that O'Reilly introduced
their companion CD-ROM for "Running Linux" some time after the release
of the book; and the two are not sold as one unit.
OUTLINE
Preface
Chaper 1: An Introduction to Linux
What Is Linux?
Basic Features
Free
Robust
Multi-tasking
Multi-user
Virtual Memory
POSIX compliance
Development Tools
Scalability
Cross Platform Availability
Hardware Details
Background
Unix?
A Short History of Linux
Birth of Linux
Development
Today
Chapter 2: Getting and Installing Linux
the "traditional" way
distributions
SLS
Slackware
MCC Interim
Debian
RedHat
Caldera
Getting and Installing A Distribution
sources
on-line
CDs
diskettes
installation routines
Doing It Yourself
making a bootable floppy
preparing the hard disk
fdisk
creating partitions
bootable partition
setting up the base system
Essential binaries and libraries
LILO
building on the foundations
Chapter 3: Linux Basics
Introduction
Remember: Linux is a Unix Clone
Basic commands; finding your way around.
loging in on a new system
directories: pwd, ls, cd
files: ls, cat
editing files: vi
loging out, re-booting, shuting down
More About the Shell
Introduction To Shells
The Shell I Use
The File System
Basic System Administration
The Concept of System Administrator
Users
The importance of not being root
Creating a User
Passwords
Grouping Users
More About Permissions
Devices
Filesystems
mount & umount
care and maintenance
Advanced Sysadm Tasks
Backups
Rebuilding The Kernel
Chapter 5: An Opinionated Overview of Linux Applications
Text Editing
"The Standard Text Editor"
Wars of Religion: vi v. emacs
Tools For Writing
The Joy of Sed
Printing
"Your printer's on fire!"
Let Loose the Dogs of Typsetting: roff, nroff, troff, ...
TeX
Ghostscript
DIY Databases: awk and grep
Grep
Awk
Spreadsheets
Networking Apps
News
Games
Colossal Cave / Adventure
Tetris for Terminals
XDoom
GNU Chess
Chapter 6: Programming Linux
Introduction: Writing Programs under Linux
The Shell
Some Examples
Interactive programming with the shell
Awk
Basic Introduction
Practical: A Simple Address Database (411 revisited)
Perl
sed awk and sh in one
C
Unix & C: hand in glove?
libc
Practical: a simple change to 'pr'
the task
implementation
other tools used: grep again, diff
Other Languages
Pascal
Ada
Fortran
Smalltalk
Eiffel
LISP
Programming Tools
make
debugger: gdb
lex
yacc
revison control: RCS
patch
Summary
Chapter 7: Connectivity
Getting onto the Internet
Options
Configuring a dial-up link
Net applications
Sendmail
news
ftp
telnet
WWW
Troubleshooting
Networking
Hardware Basics
Protocols
NFS
Chapter 8: X Window System
Installation
Configuration
Troubleshooting
Chapter 9: What To Do When Things Go Wrong
The Boot/Root diskette
fixing filesystems
Chapter 10: Linux in the Real World
Internet Server
Terminal Server
Web Server
Firewall
Application Platform
Ease of programming
Runs on PCs
Cheap
Wide skills base
Business Productivity
Word-processing
Spreadsheet
Database
Chapter 11: The Low-Down on the Linux Kernel
Basic Concepts
Process Control
Memory Management
Devices
Disks: file systems
Peripherals
System Calls
Structure of the source
Appendix 1: How to get Linux, and Help on Linux
Appendix 2: A Select Bibliography
Appendix 3: The GNU General Public Licence
Back to main Adler & Robin Books page
SAMPLE CHAPTER
* Chapter 1: An Introduction to Linux
** What Is Linux?
Linux is a multi-tasking, multi-user operating system that runs on
several hardware platforms. It is a clone of the famous Unix operating
system. It is a "Unix look-a-like", insofar as it supports all the
standard Unix system calls as defined in the POSIX specification. It
improves on Unix in many areas, since it is written from scratch and is
headless of the vast inheritence of legacy code which malforms many a
commercial Unix system. On the other hand, like any version of Unix,
any given Linux system will deviate in little ways from the behaviour
predicted in some of the classic books about Unix (see the appendix for
a list of some of these).
Linux is a Unix clone, true; but in another sense, it is a new kind of
operating system. Linux is free software, free in that it is available
for anyone to access on many internet sites and bulletin boards
worldwide; and free in that the source code for the whole operating
system is made available on the same terms as the "object code", the
programs themselves. Furthermore, Linux is protected by a special
copyright (a "copyleft") that protects it against anyone who might try
to restrict peoples free access to the programs and / or the source
code. There have been non-commerical operating systems before, but
always hedged about with caveats and restrictions - the early versions
of Unix, for example, which were available free and with full source
code, but only to universities. Linux is really the first of its kind,
being a real, full-size operating system. capable of comparison with
anything else available on the hardware on which it runs, which comes
not from an expensive development effort funded by a big company such as
Microsoft or IBM, but from the unpaid voluntary effort of hundreds of
programmers, testers and documenters world-wide. It is perhaps the
greatest testimony to the usefulness of the Internet to date.
I wrote this book using the standard Unix text editor, vi, running under
version 1.2.8 of the Linux kernel. It is as stable a platform as I have
ever used - and far more so than some. Among other things, I have
programmed Microsoft Windows for a living, when scarcely a day goes by
without recourse to the grim "three-finger salute", even though I am
programming at a high level and am an experienced user. With Linux,
the machine stays up. At the time of writing this chapter, the "uptime"
command told me the following:
3:05pm up 16 days, 23:39, 3 users, load average: 1.22, 0.73, 0.60
And the reboot sixteen days ago was merely to install a new piece of
hardware. I used several computers in the writing of this book, from an
ancient laptop with a 16Mhz 386SX, 4Mb of RAM and a 140 Mb hard drive to
a 486DX 50Mhz with 16Mb of memory and over 1 gigabyte of hard disk
space. Although of course Linux ran slower on the older machine, it is
a tribute to its versatility that it was still usable for editing, and
functioned well on a dial-up line to an ISP. On neither machine has
Linux ever crashed; the only time a reboot occurs is when the machinne
has been switched off to be moved or for a hardware upgrade.
** Basic Features
*** Free
Linux is free. What does this mean? If you have free access to the
Internet, then you can indeed acquire a complete Linux distribution for
no cost on your part. For most of us, though, we will have to pay at
least the cost of a local 'phone call, plus whatever charges our
Internet provider levies, either as a flat fee or a per usage charge.
This fact has led to the provision of Linux distributions on CD-ROM, for
which the manufacturer charges a fee, and this is usually a far more
convenient and cost-effective way of installing a complete Linux system.
So the free does not really mean FOC. It is a more fundamental thing.
Linux is free of the irksome restrictions of commercial software: it
comes with complete source code, and you are not prevented in any way
from distributing it in any way you see fit, save that you do not
restrict anyone else's right to do the same. It is protected by the GNU
General Public Licence, or GPL (reproduced in Appendix III), a legal
instrument that prevents exploitation of the thousands and thousands of
man-hours of work that has gone into making Linux, while interfering not
at all with its use and further developemnt for both commercial and
non-commercial ends.
*** Robust
Linux is a robust system. This is despite the fact that the of the many
techniques used in the production of commercial software that are
designed to promote software quality (and which seem not to work as
well as they should), the only one in use in the development of Linux is
a modified form of code review. The development of Linux proceeds
completely in the open, with every contributor's additions and
modifications available as source code on the Net, and open to their
peers' comments, criticisms and improvements. What might sound in
theory like a chaotic, unworkable way to produce choherent software has
proven in practice to lead to work of the highest quality.
*** Multi-tasking
The Linux kernel implements pre-emptive multi-tasking, in which the
operating system divides available CPU time up among all executing tasks
in a controlled way, so that no one program can hog system resources.
This makes the OS more complicated and more difficult to write, as well
as slightly slower, than the alternative, "cooperative multi-tasking"
would be, but has the great advantage of making it much more difficult
for one process to hog or even crash the system.
*** Multi-user
Following from its ability to run many tasks at once, Linux has no
problem in allowing more than one user to login at the same time. This
is what used to be known as "time-sharing", in which all logged in users
share the machine via "dumb terminals", "X terminals" or a terminal
program running on a PC, rather than the more common multi-user systems
in the PC world, such as Novell Netware or Windows NT, where users use
thier own PCs and access a limited set of shared resources on the "file
server".
*** Virtual Memory
All available RAM is used. Should this not be enough, virtual memory
can be used. This involves using part of the hard disk as an extension
of the memory space. Either a dedicated partition on the hard disk can
be set aside, or a permanent swap file can be created in an existing
file system. 4,096 byte pages of memory are "paged out" to the swap
partition in accordance with a highly-tuned algorithm.
*** POSIX compliance
The POSIX specification defines in some detail what an operating system
must do in order to hold the name "Unix". Linux is close to full POSIX
compliance, closer indeed than some commerical ventures. The goal is to
make Linux 100% POSIX compliant. A point worth making here is that
POSIX compliance can be assessed in two ways: firstly, accordance with
the POSIX spec.; secondly, and nore sublty, avoidance of proprietary
extensions which must be used if the system is to be programmed
properply. Many ostensibly POSIX compliant systems have this trap
baited for the unwary; their POSIX compliance is no more than a formula,
obeying the letter of the law while violating it spirit, rendering it in
practise useless.
*** Development Tools
In common with other Unix systems, a wide range of quality development
tools are available for Linux, from all the common Unix shells to the
GNU C/C++ compiler, as well as compilers and interpreters for all
common, and many uncommon languages.
*** Scalability
Linux scales well accross a range of hardware resources, from the
mininum spec of a 386SX with 2Mb of RAM and a 20Mb hard drive, to the
latest Pentium with 64Mb or more of RAM and gigabytes of hard disk
space.
*** Cross Platform Availability
Linux is available now, albeit at serveral different stages of
development, for many different hardware platforms, including IBM PC
with 386 or better, DEC Alpha, Power PC, Atari and Amiga with 68040, and
Apple Mac (under development). A version is under development for use
with the older members of the x86 (8088, 8086, 80286) family.
** Hardware Details
Linux was orginally developed for a PC with a 386 chip. Though the PC
clone with a 386/486/Pentium remains its primary hardware platform,
Linux now runs on a number of other types of computer. The models of
the Atari ST and Commodore Amiga based on the 68040 chip can run what is
known as 68k Linux, the DEC Alpha is the second "official" LInux
platform, and work on ports to the Power PC is progressing.
The mininum specification PC on which Linux will boot is a basic ISA
motherboard with a 386SX chip, 2Mb of RAM and high-density (1.2Mb or
1.44Mb) one floppy drive. Add a hard drive and another couple of
megabytes of memory, and you have a machine capable of serious work (a
lot of this book was written on such a machine). A list of the PC
hardware that Linux can support would take a short book in itself. PCI,
EISA, (but not MCA), most ethernet cards, most video adaptors, many SCSI
chipsets - the list goes on; the chances are that, if you have got it,
Linux will support it. This is not the place for a list detailing
particular hardware devices that are supported; such information changes
too quickly to be of any use in a book such as this; and it is freely
available and kept up to date in certain of the HOWTO documents
regularly posted to the USENET newsgroup comp.os.linux.answers.
** Background
*** In The Beginning Was Unix
It is impossible to explain Linux without examining the operating system
that was Linus Torvald's inspiration in developing it. The story begins
at Bell Labs in the late 1960s. There, Unix was created by people with
time on their hands and their ambitions roused, after the Bell had
pulled out of the Multics project. The legend goes that Ken Thompson
started Unix as a bare-bones OS for a spare PDP-7 which he wanted to use
to play Space Travel. As these things do, the project quickly took on a
momentum of its own, and soon additional funding was being sought for
what they then described as "a text preperation system" (and not an OS
as such at all!). Unix "just growed"; and in parallel, Denis Ritchie
was developing the C programming language, which soon became the
language of choice on the early Unix ,replacing Fortran which demanded
more OS resources than were available [short note here about 64k etc].
In the early seventies, a revolutionary step was taken when Unix was
rewritten almost completely in C, the first OS to be implemented in a
high-level language. Development proceeded apace throughout the
Seventies, as Unix expanded from Bell Labs and grew in popularity in
academic circles, due in no small measure to the generous licence terms
under which the source code was available for academic use. With the
famoust "Lions Book", a set of lecture notes on the Version 6 kernel,
was, as the author said, just about the only OS for which a complete set
of source code and commentary could fit inside a briefcase. As the
commercial possibilities of Unix became clearer, the academic licence
terms were tightened, with access to the source code much more
controlled; and Ma Bell began to look on Unix as a commercial product.
The advent of DEC's new generation of machines, the VAXen, was decisive;
their advanced hardware [MMU etc] was much more suited to Unix than the
relatively primitive PDP series. By the eighties, Unix was an
established commerical opertaing system that had been ported to a
variety of hardware platforms, and was being touted as THE OS of the
future.
*** Minix
With the effective removal of the Unix source code from public view,
there was a clear need for a modern, "real-world" type OS that could be
studied by students using the system and reading the source code. Andy
Tannenbaum, a Computer Science Lecturer at the Vries [sp?] University in
Holland, manned the breach with a Unix-like operating system he called,
continuing the pun, Minix. He managed to fit a reasonable approximation
to Unix Version 7 into the severely cramped confines of the IBM PC XT
series. Minix was steadily upgraded to take advantage of the increase
in hardware power of the PC.
*** A Short History of Linux; or, How a Finnish computer science
undergraduate created an operating system.
**** Beginnings
The roots of Linux are in Minix. Linus Torvalds encountered Minix at
university, and was hooked. An enthusiatic programmer who had learned
his craft at home on a sucession of home computers, Linus soon felt
limited by Minix, and decided to attempt a kernel of his own. Minix
remained an academic system designed to teach students, and although
usable, it whetted appetites which it was incapable of satiating. What
people wanted was "a better Minix", without the irksome licensing
restrictions that made it difficult for people to contribute to
improving the system. Linus Torvalds was one such Minix user. Early in
1991, he acquired a 386 PC, and decided to learn more about the memeory
management capabilities of this chip by writing a very basic OS for it.
As had Unix in the 60's, the project mushroomed; soon Linus was
attempting to improve on Minix by writing a Unix-compatible operating
system that would abandon backwards compatibility in favour of using the
advanced features of the 386. The first version was announced as
available in comp.os.minix on 5th October, 1991. At first, it lacked a
proper name; "Linux" - short for Linus's Minix, or a weak pun on Unix,
(opinions differ) - was not coined until later. Early development of
Linux was done using Minix; but by December, the GNU C compiler was
running on Linux - the system had become self-hosting.
**** The Pace Accelerates
With the beginning of a new year, the pace of progress now increased,
with the first major outside contribution coming in January 1992, when
Ted Ts'o added BSD-style job control. In April of the same year, Linux
was popular enough to justify creation of its own newsgroup, and
comp.os.linux was formed. TCP/IP networking was added by Ross Biro in
August. Work on Linux proceeded apace throughout 1992 and 1993, with
more and more programmers getting involved over the 'Net. The goal was
to get a stable release, a version 1. This grail was approached
gradually, with patchlevel after patchlevel being added to version
0.99. The final beta before 1.0 was 0.99, patch level 14. On the 14th
March, 1994, Linus released version 1.0 of his namesake to the world.
Linux had come of age; but development continued apace. Version 1.2 of
Linux was released in March 1995. Development then proceeded in two
strands, a "bleeding edge" series numbered 1.3.x, and a stable series
intended for general use, 1.2.x. A amusing spoof Internet posting by
Linus announced a new licensing strategy for the new version (Linux 95)
modeled on Microsoft's - a joke he may have regreted, since a number of
humourless 'Net denizens appear to have taken the joke seriously.
**** Today
On 9th June 1996, Linus Torvalds announced the release of Linux v2.0.
This release sees the integration into the production kernel for the
great development effort that has gone into the 1.3.xx series over the
past year. Some of the major new features are:
o Support for multiple architectures in the standard kernel. This
support is presently limited to the Intel x86 (and clones) and the
Digital Alpha; but quite a few other architectures are expected to gain
"official" support soon.
o Support for SMP (symmetrical multiprocessing). Linux can now use more
than one CPU installed in the same computer. (Using distributed
computing resources accross the network in a analagous manner is still
some way off).
o Significant enhancements to the file system, including better caching
o better performance in many areas, including process handling and
networking.
o Better support for more devices
o "writable shared memory mapping support, and support for file
descriptor passing with UNIX socket domains." This adds the last two
major "standard Unix" features that Linux lacked.
** Conclusion
Linux today is a proven, stable, modern operating system, as capable as
any other Unix of running a wide variety of applications on a number of
hardware platforms. It may prove to be the most important operating
system since Unix, in terms not of installed base or number of units
sold, but in the long-term impact a free operating system of such
quality may have on the commercial OS market.
Back to main Adler & Robin Books page
![]()