readenglishbook.com » Study Aids » Debian GNU/Linux: Guide to Installation and Usage, John Goerzen and Ossama Othman [read e book TXT] 📗

Book online «Debian GNU/Linux: Guide to Installation and Usage, John Goerzen and Ossama Othman [read e book TXT] 📗». Author John Goerzen and Ossama Othman



1 ... 13 14 15 16 17 18 19 20 21 ... 28
Go to page:
auto noauto,sync 0 0

 

The first column lists the device the filesystem resides on. The second lists the mount point, the third indicates the filesystem type. The line beginning by proc is a special filesystem. Notice that the swap partition (devhda3 in the example) has no mount point, so the mount point column contains none.

 

The last three columns may require some explanation.

 

The fifth column is used by the dump utility to decide when to back up the filesystem. In most cases, you can put 0 here.

 

The sixth column is used by fsck to decide in what order to check filesystems when you boot the system. The root filesystem should have a 1

in this field, filesystems that don’t need to be checked (such as the swap partition) should have a 0, and all other filesystems should have a 2.

It’s worth noting that the swap partition isn’t exactly a filesystem in the sense that it does not contain files and directories but is just used by the Linux kernel as secondary memory. However, for historical reasons, the swap partitions are still listed in the same file as the filesystems.

 

Column four contains one or more options to use when mounting the filesystem. You can check the mount manpage for a summary; see section 5.1

on page [*].

 

Removable Disks (Floppies, Zip Disks, Etc.)

 

Add the following lines to your etcfstab file: devsda1 mntzip ext2 noauto,user 0 0

 

devsda4 mntdos msdos noauto,user 0 0

 

From now on, you’ll be able to mount the DOS-formatted Zip disks with the command mount mntdos, and you be able to mount Linux-formatted Zip disks with the command mount mntzip.

 

If you have SCSI hard disks in your system, you’ll have to change sda to sdb or sdc in the example above.

 

Backup Tools Backups are important under any operating system. Debian GNU/Linux provides several different utilities that you might want to use.

Additionally, while many of these utilities were aimed at tape backups originally, you’ll find that they are now being used for other things. For instance, tar is being used for distributing programs over the Internet.

Some of the utilities that you’ll find include the following: * Taper is a menu-driven, easy-to-learn backup program that can back up to a variety of media. Its limitation is that it doesn’t handle large (4GB or larger) backups.

* dump is designed specifically for tapes; its main strengths are its interface for file restores, low-level filesystem backups, and incremental backup scheduling. Its limitations include the inability to back up NFS or other non-ext2 filesystems and some rather arcane defaults.

* GNU tar (short for Tape ARchiver) is an implementation of what is probably the most widely used backup or archiving utility in Linux today. It makes a good general purpose tool and can deal with the widest variety of target media. Additionally, many different systems can read tar files, making them highly portable. tar’s weaknesses include a weaker incremental backup system than dump and no interactive restore selection screen.

 

tar

 

Because tar is used so much, and for quite a bit in addition to backups, it is being described here. For more details, see the tar manual page; instructions for viewing manual pages can be found in section 5.1 on page [*].

 

tar is an archiver. This means that tar can take many files and combine them all into one large file or write them out to a backup device such as a tape drive. Once you have this one large file, you will often want to compress it; the -z option is great for this. Hence, tar offers a great way to distribute programs and data on the Internet, and you’ll find that it is used extensively for this purpose.

 

Here’s a sample tar command line:

 

tar -zcvf myfiles.tar.gz usrlocal/bin Let’s take a look at how this command can be broken down: tar

Name of the command.

-

Tells tar that options will follow.

 

z

Tells tar to use gzip compression automatically; if you use this, it’s good to add a .gz extension as well.

 

c

Tells tar to create a new archive.

 

v

This says to be verbose; that is, it tells tar to let you know what it’s doing while it creates the archive.

 

f

This indicates that the next thing on the command line is the name of the file to be created or the device to be used. If I used devst0 here, for instance, it would write the backup to the tape drive.

 

myfiles.tar.gz

This is the name of the file to be created.

 

usrlocal/bin

This is the name of the file or directory to store in the archive.

It’s also possible to specify several items here.

 

You may often find tar.gz files (or simply tgz files) on the Internet. You can unpack these with a command like:

 

tar -zxvf filename.tar.gz

 

Networking One of the key benefits of GNU/Linux over other systems lies in its networking support. Few systems can rival the networking features present in GNU/Linux. In this chapter, we tell you how to configure your network devices.

 

PPP

 

This section is a quick-start guide to setting up PPP on Debian. If it turns out that you need more details, see the excellent |PPP HOWTO| from the Linux Documentation Project. The HOWTO goes into much more detail if you’re interested or have unique needs.

Introduction

If you connect to the Internet over a phone line, you’ll want to use PPP

(Point-to-Point Protocol). This is the standard connection method offered by ISPs (Internet service providers). In addition to using PPP to dial your ISP, you can have your computer listen for incoming connections -

this lets you dial your computer from a remote location.

 

Preparation

 

Configuring PPP on Debian GNU/Linux is straightforward once you have all the information you’ll need. Debian makes things even easier with its simple configuration tools.

 

Before you start, be sure you have all the information provided by your ISP. This might include:

 

* Username or login

* Password

* Your static IP (Internet Protocol) address, if any (these look like 209.81.8.242). This information isn’t needed for most ISPs.

* Bitmask (this will look something like 255.255.255.248). This information isn’t needed for most ISPs.

* The IP addresses of your ISP’s name servers (or DNS).

* Any special login procedure required by the ISP.

Next, you’ll want to investigate your hardware setup: whether your modem works with GNU/Linux and which serial port it’s connected to.

 

A simple rule determines whether your modem will work. If it’s a “winmodem” or “host-based modem,” it won’t work. These modems are cheap because they have very little functionality, and they require the computer to make up for their shortcomings. Unfortunately, this means they are complex to program, and manufacturers generally do not make the specifications available for developers.

 

If you have a modem with its own on-board circuitry or an external modem, you should have no trouble at all.

 

On GNU/Linux systems, the serial ports are referred to as devttyS0, devttyS1, and so on. Your modem is almost certainly connected to either port 0 or port 1, equivalent to COM1: and COM2: under Windows. If you don’t know which your modem is connected to, run the program wvdialconf to try to detect it (see below); otherwise, just try both and see which works.

 

If you want to talk to your modem or dial your ISP without using PPP, you can use the minicom program. You may need to install the minicom package to make the program available.

 

The Easy Way: wvdial

 

The simplest way to get PPP running is with the wvdial program. It makes some reasonable guesses and tries to set things up for you. If it works, you’re in luck. If it guesses wrong, you’ll have to do things manually.

 

Be sure you have the following packages installed: * ppp

* ppp-pam

* wvdial

When you install the wvdial package, you may be given the opportunity to configure it. Otherwise, to set up wvdial, follow these simple steps: Log in as root, using su (as described in an earlier chapter).

 

touch etcwvdial.conf

touch will create the following file if the file doesn’t exist; the configuration program requires an existing file.

 

wvdialconf etcwvdial.conf

This means you’re creating a configuration file, etcwvdial.conf.

 

Answer any questions that appear on the screen. wvdialconf will also scan for your modem and tell you which serial port it’s on; you may want to make a note of this for future reference.

 

Ethernet

 

Another popular way to connect to the Internet is via a LAN that uses Ethernet. This gives you a high-speed local network in addition to Internet access. Fortunately, though, you should have already configured Ethernet networking during installation so there isn’t much you need to do now. If you ever need to modify your configuration, here are the files that you will be interested in:

 

* etcinit.d/network has things such as your IP address, netmask, and default route.

* etchostname records your hostname.

* etchosts also records your hostname and IP address.

 

Removing and Installing Software This chapter describes ways of installing and removing software packages.

There are several ways of doing both. Here we discuss installation and removal of pre-built software, such as Debian packages, and installation of source that must be built by you.

 

What a Package Maintenance Utility Does An application or utility program usually involves quite a few files. It might include libraries, data files like game scenarios or icons, configuration files, manual pages, and documentation. When you install the program, you want to make sure you have all the files you need in the right places.

 

You’d also like to be able to uninstall the program. When you uninstall, you want to be sure all the associated files are deleted. However, if a program you still have on the system needs those files, you want to be sure you keep them.

 

Finally, you’d like to be able to upgrade a program. When you upgrade, you want to delete obsolete files and add new ones, without breaking any part of the system.

 

The Debian package system solves these problems. It allows you to install, remove, and upgrade software packages, which are neat little bundles containing the program files and information that helps the computer manage them properly. Debian packages have filenames ending in the extension .deb, and they’re available on the FTP site or on your official Debian CD-ROM.

 

dpkg

 

The simplest way to install a single package you’ve downloaded is with the command dpkg -i (short for dpkg -install). Say you’ve downloaded the package icewm_0.8.12-1.deb and you’d like to install it. First log on as root, and then type dpkg -i icewm_0.8.12-1.deb, and icewm version 0.8.12

will be installed. If you already had an older version, dpkg will upgrade it rather than installing both versions at once.

 

If you want to remove a package, you have two options. The first is most intuitive: dpkg -r icewm. This will remove the icewm package (-r is short for -remove). Note that you give only the icewm for -remove, whereas -install requires the entire .deb filename.

 

-remove will leave configuration files for the package on your system. A configuration file is defined as any file you might have edited in order to customize the program for your system or your preferences. This way, if you later reinstall the package, you won’t have to set everything up a second time.

 

However, you might want to erase the configuration files too, so dpkg also provides a

1 ... 13 14 15 16 17 18 19 20 21 ... 28
Go to page:

Free e-book «Debian GNU/Linux: Guide to Installation and Usage, John Goerzen and Ossama Othman [read e book TXT] 📗» - read online now

Comments (0)

There are no comments yet. You can be the first!
Add a comment