Running Linuxby Matthias Kalle Dalheimer, Lar Kaufman, Matt Welsh, Matthias Kalle Dalheimer
Once a little-known productivity boost for personal computers, Linux is now becoming a central part of computing environments everywhere. This operating system now serves as corporate hubs, web servers, academic research platforms, and program development systems. All along it's also managed to keep its original role as an enjoyable environment for personal… See more details below
Once a little-known productivity boost for personal computers, Linux is now becoming a central part of computing environments everywhere. This operating system now serves as corporate hubs, web servers, academic research platforms, and program development systems. All along it's also managed to keep its original role as an enjoyable environment for personal computing, learning system administration and programming skills, and all-around hacking.
This book, now in its third edition, has been widely recognized for years in the Linux community as the getting-started book people need. It goes into depth about configuration issues that often trip up users but are glossed over by other books.
A complete, UNIX-compatible operating system developed by volunteers on the Internet, Linux is distributed freely in electronic form and at a low cost from many vendors. Developed first on the PC, it has been ported to many other architectures and can now support such heavy-duty features as multiprocessing, RAID, and clustering.
Software packages on Linux include the Samba file server and Apache Web server; the X Window System (X11R6); TCP/IP networking (including PPP, SSH, and NFS support); popular software tools such as Emacs and TeX; a complete software development environment including C, C++, Java, Perl, Tcl/Tk, and Python; libraries, debuggers, multimedia support, scientific and database applications, and much more. Commercial applications that run on Linux range from end-user tools like word processors and spreadsheets to mission-critical software like the Oracle, Sybase, Informix, and IBM DB/2 database management systems.
Running Linux explains everything you need to understand, install, and start using the Linux operating system. This includes a comprehensive installation tutorial, complete information on system maintenance, tools for document development and programming, and guidelines for network, file, printer, and Web site administration.
New topics in the third edition include:
- KDE, a desktop that brings the friendliness and ease-of-use of Windows or the Macintosh to Linux
- Samba, which turns Linux into a office hub that serves files and printers to Microsoft systems
- PPP, the most popular software for logging into remote systems over phone lines
- Revised instructions for installation and configuration, particularly covering the Red Hat and SuSE distributions
Meet the Author
Lar Kaufman is a documentation consultant living in Concord, Massachusetts. He began writing about UNIX in 1983 and since then has written on System V, BSD, Mach, OSF/1, and now Linux. His hobbies include interactive media as art/literature, homebuilt and antique aircraft (he's a licensed aircraft mechanic), and natural history. Formerly a BBS operator, in 1987 Lar founded the Fidonet echoes (newsgroups) Biosphere and BioNews. He is currently leading a project to establish a global biological conservation network, using a Linux host as the mail, news, and file server.
is a computer scientist with research interests spanning many aspects of complex systems, including operating systems design, distributed systems, networking, and parallel computing. Matt is a long-time Linux advocate and developer, a role in which he has fielded questions from thousands of Linux users over the years. He was the original coordinator of the Linux Documentation Project and author of the original Linux Installation and Getting Started guide. He completed his Ph.D. at UC Berkeley and is currently a researcher at Intel Research Labs in Berkeley, and will be joining the faculty of the Computer Science department at Harvard University in July 2003.
More from this Author
Read an Excerpt
Chapter 8: Other Administrative TasksAfter reading the previous three chapters, you now have all the skills you need to start using your system. But don't ignore this chapter for long. me of the activities, such as making backup tapes, are important habits to develop. You may also find it useful to have access to files and programs on MSDOS and Windows. Finally, we'll help you handle events that you hope will never happen, but sometimes do-system panics and corruption.
Making BackupsMaking backups of your system is an important way to protect yourself from data corruption or loss in case you have problems with your hardware, or make a mistake such as deleting important files inadvertently. During your experiences with Linux, you're likely to make quite a few customizations to the system that can't be restored by simply reinstalling from your original installation media. However, if you happen to have your original Linux floppies or CD-Rom handy, it may not be necessary to back up your entire system. Your original installation media already serves as an excellent backup.
Under Linux, as with any UNIX-like system, you can make mistakes while logged in as root that would make it impossible to boot the system or log in. Many newcomers approach such a problem by reinstalling the system entirely from backup, or worse, from scratch. This is seldom, if ever, necessary. in the section "What to Do in an Emergency" we'll talk about what to do in these cases.
If you do experience data loss, it is sometimes possible to recover that data using the filesystem maintenance tools described in the section "Checking and Repairing Filesystems" in Chapter 6, Managing Filesystems, Swap, and Devices." Unlike some other operating systems, however, it's generally not possible to "undelete" a file that has been removed by rm, or overwritten by a careless cp or mv command (for example, copying one file over another destroys the file copied over). In these extreme cases, backups are key to recovering from problems.
Backups are usually made to tape or floppy. Neither medium is 100% reliable, although tape is more dependable than floppy in the long term. There are many tools available that help you to make backups. in the simplest case, you can use a combination of gzip and tar to back up files from your hard drive to floppy or tape. This is the best method to use when you make only occasional backups, no more often than, say, once a month.
If you have numerous users on your system, or make frequent changes to the system configuration, it makes more sense to employ an incremental backup scheme. Under such a scheme, you would take a "full backup" of the system only about once a month. Then, every week, you would back up only those files that changed in the last week. Likewise, each night, you could back up just those files that changed over the previous 24 hours. There are several tools to aid you in this type of backup.
The idea behind an incremental backup is that it is more efficient to take backups in small steps; you use fewer floppies or tapes, and the weekly and nightly backups are shorter and easier to run. This makes it easier to back up more often; you have a backup that is at most a day old. if you were to, say, accidentally delete your entire system, you would restore it from backup in the following manner:
1. Restore from the most recent monthly backup. Say, if you wiped the system on July 17th, you would restore the July 1 full backup. Your system now reflects the state of files when the July I backup was made.
2. Restore from each of the weekly backups made so far this month. In our case, we could restore from the two weekly backups from July 7th and 14th. Restoring each weekly backup updates all of the files that changed during that week.
3. Restore from each of the daily backups during the last week, that is, since the last weekly backup. In this case, we would restore the daily backups from July 15th and 16th. The system now looks as it did when the daily backup was taken on July 16th; no more than a day's worth of files have been lost.
Depending on the size of your system, the full monthly backup might require 2 GB or more of backup storage- often not more than one tape using today's tape media, but quite a few ZIP disks. However, the weekly and daily backups would generally require much less storage space. Depending on how your system is used, you might decide to take the weekly backup on Sunday night and not bother with daily backups for the weekend.
One important characteristic that backups should (usually) have is the ability to select individual files from the backup for restoration. This way, if you accidentally delete a single file or group of files, you can simply restore those files without having to do a full system restoration. Depending on how you take backups, however, this task will be either very easy or painfully difficult.
In this section, we're going to talk about the use of tar, gzip, and a few related tools for taking backups to floppy and tape. We'll even cover the use of floppy and tape drives in the bargain. These tools allow you to take backups more or less "by hand"; you can automate the process by writing shell scripts and even schedule your backups to run automatically during the night using cron. All you have to do is flip tapes. There are other software packages that provide a nice menudriven interface for creating backups, restoring specific files from backup, and so forth. Many of these packages are, in fact, nice frontends to tar and gzip. You can decide for yourself what kind of backup system suits you best.
Simple BackupsThe simplest means of taking a backup is to use tar to archive all the files on the system, or only those files in a set of specific directories. Before you do this, however, you need to decide what files to back up. Do you need to back up every file on the system? This is rarely necessary, especially if you have your original installation disks or CD-ROM. If you have made important changes to the system, but everything else is as just the way it was found on your installation media, you could get by only archiving those files you have made changes to. Over time, however, it is difficult to keep track of such changes.
In general, you will be making changes to the system configuration files in /etc. There are other configuration files as well, and it can't hurt to archive directories such as /usr/lib, /usr/X1 1R6/lib/X11 (which contains the XFree86 configuration files, as we'll see in the section "Installing XFree86" of Chapter 10, The X Window System), and so forth.
You should also back up your kernel sources (if you have upgraded or built your own kernel); these are found in /usr/src/linux.
During your Linux adventures it's a good idea to keep notes on what features of the system you've made changes to so you can make intelligent choices when taking backups. If you're truly paranoid, go ahead and backup the whole system: that can't hurt, but the cost of backup media might.
Of course, you should also back up the home directories for each user on the system; these are generally found in /home. if you have your system configured to receive electronic mail (see the section "The smail Mail Transport Agent" in Chapter 16, The World Wide Web and Mail), you might want to back up the incoming mail files for each user. Many people tend to keep old and "important" electronic mail in their incoming mail spool, and it's not difficult to accidentally corrupt one of these files through a mailer error or other mistake. These files are usually found in /var/spool/mail. . . .
and post it to your social network
Most Helpful Customer Reviews
See all customer reviews >