1. Trang chủ
  2. » Ngoại Ngữ

Mastering linux, second edition

100 344 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 100
Dung lượng 4,01 MB

Nội dung

Mastering™ Linux, Second Edition Arman Danesh Michael Jang SYBEX® 2915FM.qxd 05/09/01 12:16 PM Page i mdeltree rm mdeltree msdosdirectory [msdosdirectory ] rm The mdeltree command deletes one or more MS-DOS directories It is similar to the DOS DELTREE command ➥ file | directory mkdir rmdir mkdir [-p] [-m mode] [ parents] [ mode=mode] ➥ [ help] [ version] directory rmdir [-p] [ parents] directory The mkdir command creates one or more directories more [-firR] [ force] [ interactive] [ recursive] The rm command deletes one or more files or directories The rmdir command deletes empty directories rsh rsh [-Knx] [-l username] host [command] more [-dlfs] [ number] [+number] [file ] The more command displays one or more files, screen-byscreen, and allows for searching and jumping to an arbitrary location in the file mount mount -a [-rvw] [-t vfstype] mount [-rvw] [-o options [, ]] device | dir mount [-rvw] [-t vfstype] [-o options] device dir The mount command mounts a file system to a specified directory nslookup nslookup [host | - [server]] The rsh command opens a shell on a remote system If a command is provided, the command is executed on the remote host, the results are returned, and the connection is terminated su su [-flmp] [-c command] [-s shell] [ login] [ fast] ➥ [ preserve-environment] [ command=command] ➥ [ shell=shell] [-] [user] The su command runs a new shell under different user and group IDs If no user is specified, the new shell will run as the root user tar The nslookup command queries a DNS name server It can be run in interactive mode If no host name is provided, then the program enters interactive mode By default, the DNS server, as specified in /etc/resolv.conf, is used unless otherwise specified If you want to specify a server but not look up a specified host, you must provide a - in place of the host The tar command creates an archive file of one or more files or directories passwd top passwd [-S] [-d delim-list] [file ] tar [-crtuxz] [-f file] [ file file] [ create] ➥ [ delete] [ preserve] [ append] [ same-owner] ➥ [ list] [ update] [ extract] [ get] [ gzip] ➥ [ ungzip] [file | directory ] top [d delay] [q] [c] [S] [s] The passwd command changes a user’s password When run by the root user, it can be used to change a specific user’s password by providing the username as an argument The top command displays a regularly updated report of processes running on the system ping unzip [-cflptuz] file[.zip] ping [-fR] [-c number] [-i seconds] ➥ [-s packetsize] host The unzip command manipulates and extracts ZIP archives The ping command sends echo request packets to a network host to see if it is accessible on the network ps ps [lumaxwr] [txx] [pid ] The ps command displays status reports for currently running processes Given a specific process ID as an argument, ps displays information about that particular process Without options or arguments, ps displays the current user’s processes pwd pwd The pwd command displays the name of the current directory unzip zcat zcat [-f] [file ] The zcat command uncompresses one or more compressed files and displays the results to the standard output If no files are specified, then the standard input is uncompressed and displayed zip zip [-efFgmrSu@] [ zipfile [ file1 file2 ]] The zip command creates a ZIP archive from one or more files and directories zmore zmore [file ] The zmore command displays the contents of compressed text files, one screen at a time, allowing searching in much the same way as the more command If no files are specified, the standard input will be used 2915FM.qxd 05/09/01 12:16 PM Page ii This page intentionally left blank 2915FM.qxd 05/09/01 12:16 PM Page iii Mastering Linux Second Edition 2915FM.qxd 2915FM.qxd 05/09/01 05/09/01 12:16 12:16 PM PM Page Page ii iv This page intentionally left blank 2915FM.qxd 05/09/01 12:16 PM Page v Mastering™ Linux Second Edition Arman Danesh and Michael Jang San Francisco • Paris • Düsseldorf • Soest • London 2915FM.qxd 05/09/01 12:16 PM Page vi Associate Publisher: Dick Staron Contracts and Licensing Manager: Kristine O’Callaghan Acquisitions and Developmental Editor: Ellen L Dendy Editor: Linda Recktenwald Production Editor: Leslie E.H Light Technical Editor: Baruch A Mettler Book Designer: Kris Warrenburg Graphic Illustrator: Tony Jonick Electronic Publishing Specialist: Judy Fung Proofreaders: Nanette Duffy, Emily Hsuan, Laurie O’Connell, Yariv Rabinovich, Nancy Riddiough Indexer: Ted Laux Cover Designer: Design Site Cover Photographer: Jack D Myers, Design Site Copyright ©2001 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501 World rights reserved No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic or other record, without the prior agreement and written permission of the publisher Library of Congress Card Number: 2001088247 ISBN: 0-7821-2915-3 Screen reproductions produced with either The GIMP (a graphics package included with Red Hat Linux 7) or Capture Express 2000 Capture Express 2000 is a trademark of Insight Software Solutions Inc SYBEX is a registered trademark of SYBEX Inc Mastering is a trademark of SYBEX Inc Netscape Communications, the Netscape Communications logo, Netscape, and Netscape Navigator are trademarks of Netscape Communications Corporation Netscape Communications Corporation has not authorized, sponsored, endorsed, or approved this publication and is not responsible for its content Netscape and the Netscape Communications Corporate Logos are trademarks and trade names of Netscape Communications Corporation All other product names and/or logos are trademarks of their respective owners TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer The author and publisher have made their best efforts to prepare this book, and the content is based upon final-release software whenever possible Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s) The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book Photographs and illustrations used in this book have been downloaded from publicly accessible file archives and are used in this book for news reportage purposes only to demonstrate the variety of graphics resources available via electronic access Text and images available over the Internet may be subject to copyright and other rights owned by third parties Online availability of text and images does not imply that they may be reused without the permission of rights holders, although the Copyright Act does permit certain unauthorized reuse as fair use under 17 U.S.C Section 107 Manufactured in the United States of America 10 2915FM.qxd 05/09/01 12:16 PM Page vii Software License Agreement: Terms and Conditions The media and/or any online materials accompanying this book that are available now or in the future contain programs and/or text files (the “Software”) to be used in connection with the book SYBEX hereby grants to you a license to use the Software, subject to the terms that follow Your purchase, acceptance, or use of the Software will constitute your acceptance of such terms The Software compilation is the property of SYBEX unless otherwise indicated and is protected by copyright to SYBEX or other copyright owner(s) as indicated in the media files (the “Owner(s)”) You are hereby granted a single-user license to use the Software for your personal, noncommercial use only You may not reproduce, sell, distribute, publish, circulate, or commercially exploit the Software, or any portion thereof, without the written consent of SYBEX and the specific copyright owner(s) of any component software included on this media In the event that the Software or components include specific license requirements or end-user agreements, statements of condition, disclaimers, limitations, or warranties (“End-User License”), those End-User Licenses supersede the terms and conditions herein as to that particular Software component Your purchase, acceptance, or use of the Software will constitute your acceptance of such End-User Licenses By purchase, use, or acceptance of the Software you further agree to comply with all export laws and regulations of the United States as such laws and regulations may exist from time to time Software Support Components of the supplemental Software and any offers associated with them may be supported by the specific Owner(s) of that material but they are not supported by SYBEX Information regarding any available support may be obtained from the Owner(s) using the information provided in the appropriate read.me files or listed elsewhere on the media Should the manufacturer(s) or other Owner(s) cease to offer support or decline to honor any offer, SYBEX bears no responsibility This notice concerning support for the Software is provided for your information only SYBEX is not the agent or principal of the Owner(s), and SYBEX is in no way responsible for providing any support for the Software, nor is it liable or responsible for any support provided, or not provided, by the Owner(s) Warranty SYBEX warrants the enclosed media to be free of physical defects for a period of ninety (90) days after purchase The Software is not available from SYBEX in any other form or media than that enclosed herein or posted to www.sybex.com If you discover a defect in the media during this warranty period, you may obtain a replacement of identical format at no charge by sending the defective media, postage prepaid, with proof of purchase to: SYBEX Inc Customer Service Department 1151 Marina Village Parkway Alameda, CA 94501 (510) 523-8233 Fax: (510) 523-2373 E-mail: info@sybex.com Web: HTTP://WWW.SYBEX.COM After the 90-day period, you can obtain replacement media of identical format by sending us the defective disk, proof of purchase, and a check or money order for $10, payable to SYBEX Disclaimer SYBEX makes no warranty or representation, either expressed or implied, with respect to the Software or its contents, quality, performance, merchantability, or fitness for a particular purpose In no event will SYBEX, its distributors, or dealers be liable to you or any other party for direct, indirect, special, incidental, consequential, or other damages arising out of the use of or inability to use the Software or its contents even if advised of the possibility of such damage In the event that the Software includes an online update feature, SYBEX further disclaims any obligation to provide this feature for any specific duration other than the initial posting The exclusion of implied warranties is not permitted by some states Therefore, the above exclusion may not apply to you This warranty provides you with specific legal rights; there may be other rights that you may have that vary from state to state The pricing of the book with the Software by SYBEX reflects the allocation of risk and limitations on liability contained in this agreement of Terms and Conditions Shareware Distribution This Software may contain various programs that are distributed as shareware Copyright laws apply to both shareware and ordinary commercial software, and the copyright Owner(s) retains all rights If you try a shareware program and continue using it, you are expected to register it Individual programs differ on details of trial periods, registration, and payment Please observe the requirements stated in appropriate files Copy Protection The Software in whole or in part may or may not be copy-protected or encrypted However, in all cases, reselling or redistributing these files without authorization is expressly forbidden except as specifically provided for by the Owner(s) therein 2915FM.qxd 2915FM.qxd 05/09/01 12:16 PM Page ii viii This page intentionally left blank 2915FM.qxd 05/09/01 12:16 PM Page ix Many thanks to the GNU and Linux community of developers, who are constantly proving that a group of volunteers can compete with the biggest software companies 2915ch04.qxd 04/19/01 1:05 PM Page 49 Configuring Your System for Installation 49 To toggle the state of a check box, move to the check box and press the spacebar To press a button, move the cursor to the button using the Tab or arrow keys and then press the spacebar or the Enter key With a Next button, the F12 key generally works the same as pressing Enter or the spacebar Of course, if the installation program detects your mouse, you can left-click your selections as well Just in case, the remaining descriptions in this chapter assume that your mouse doesn’t work in the Linux installation program Choosing a Language After you start the installation program at the boot screen as described earlier in this chapter, a welcome screen appears, followed by the first screen of the installation process: Language Selection As you can see in Figure 4.3, the Language Selection screen has a selection list field and a Next button When the cursor is in the selection list field, you can use the arrow keys or the Page Up and Page Down keys to move through the available languages until the desired one is selected This selection determines the language that will be used during the installation process (This is distinct from the language of the actual operating system, which is English, and the keyboard layout, which is chosen later.) FIGURE 4.3: Choosing a language 2915ch04.qxd 50 04/19/01 1:05 PM Page 50 Chapter • Installing Linux Choosing a Keyboard Type The next screen presents selection list fields for choosing a keyboard model and layout If you don’t see your keyboard in the model list, the default is Generic 101-key PC The layout generally corresponds to different languages or dialects (e.g., French or Swiss French) In the United States, the correct layout will almost always be US English Other common models and layouts include those listed in Tables 4.1 and 4.2 T A B L E : Typical Keyboard Models Model Description Dell 101-key PC For certain Dell PC keyboards Japanese 106-key With Japanese characters Microsoft Natural Microsoft Natural (split) keyboard Winbook Model XP5 Winbook Special Model XP5 keyboard T A B L E : Typical Keyboard Layouts Layout Description Brazilian Brazilian Portuguese keyboard Canadian Canadian English keyboard German German keyboard Swiss German Swiss German keyboard You can test your selection at the bottom of the screen, in the Test Your Selection Here: text box You should test your selection especially if you have doubts about your choice of keyboard 2915ch04.qxd 04/19/01 1:05 PM Page 51 Configuring Your System for Installation NOTE 51 If you have a special keyboard and don’t see it in the standard mode of the Red Hat Linux Installation program, start the installation program again in text mode Red Hat Linux includes nearly 80 different keyboard types in this mode Configuring Your Mouse After you configure your keyboard, the next step is to configure your mouse First, the installation software attempts to detect your mouse Then, you are presented with a list of possible mouse types from which to select (if automatic detection was successful, then the appropriate mouse type is preselected) If you cannot find your specific brand of mouse on the list, choose a generic mouse most similar to yours Consult your mouse’s documentation to determine the type of mouse you have If yours is a two-button mouse, make sure that you check the box for threebutton mouse emulation Linux expects a three-button mouse, as all Unix operating systems This emulation allows you to click the left and right mouse buttons together to simulate clicking the middle mouse button This feature, while not absolutely necessary, will enhance X Windows functionality You also need to set up the mouse port, which is typically PS/2 (with a round connector), serial (trapezoidal connector with nine holes), or USB (small rectangular connector) If you have a serial mouse, you also need to set up or confirm the mouse port, usually COM1: or COM2: Installing or Upgrading? Once you have selected and configured your mouse, the next menu allows you to install Red Hat Linux in three different ways Alternatively, if you already have Linux on your computer, you can just select the Upgrade option If you want to upgrade without overwriting your configuration files, you generally need to upgrade with the same branded distribution Most Linux distributions allow you the same options, but the organization of the install screens can differ If you are installing Red Hat Linux for the first time on your computer, there are three possible ways to install it: Workstation Performs a default installation for a Linux workstation This option automatically erases all existing Linux partitions on your system 2915ch04.qxd 52 04/19/01 1:05 PM Page 52 Chapter • Installing Linux Server Performs a default installation for a Linux server This option automatically erases all existing partitions on your system, including any other non-Linux operating systems and data on your computer Custom process Provides complete control over all aspects of the installation In order to learn the details of Linux installation, you will work with the third option, Custom, throughout this chapter and in Chapter 5, “Special Installations,” and in Chapter 27, “Installing Linux for the SOHO.” Setting Up Your Disk Partitions After you select an installation class, you face a decision about how to allocate disk space for your Linux installation This is a crucial step in the process because a mistake can erase existing data on your system that you want to keep Let’s assume that you have a single hard drive in your system, that—as directed in Chapter 3, “Getting Ready to Install Linux”—you created an area of free space (preferably larger than 1GB) using the techniques described there, and that the space is now ready to be used The first question you are asked is which tool you want to use to set up your partitions The two choices in Red Hat Linux are Disk Druid or fdisk Fdisk is the standard Linux tool for configuring disk partitions and is available for every Linux distribution However, it is difficult to use and can be especially daunting for first-time Linux or Unix users WARNING If you don’t know what you’re doing, fdisk can cause you to lose all of your data Also, the Linux fdisk tool is quite different from the MS-DOS fdisk tool, in that Linux fdisk includes a large number of options To help ease this process, Red Hat Linux provides its own tool for disk partition management called Disk Druid This section will focus on using Disk Druid because it eases the initial installation process for users new to the Linux environment Other distributions provide similar user-friendly tools; for example, Caldera eDesktop uses Partition Magic, and S.u.S.E.’s tool is integrated into its YaST utility 2915ch04.qxd 04/19/01 1:05 PM Page 53 Configuring Your System for Installation 53 If you select the Disk Druid button, the main Disk Druid screen appears, as shown in Figure 4.4 FIGURE 4.4: The main Disk Druid screen This screen has three main sections: the Partitions section, the button row, and the Drive Summary section In the Partitions section, a single row is displayed for each existing disk partition on your system The following information is presented about each partition: Mount Point This indicates where the partition appears in your Linux directory structure Linux directories all appear as subdirectories of the root directory The root directory is / and all subdirectories start with /, such as /home, /opt, and /usr/X11R6 At a minimum, you need to have a partition mounted as / and a swap partition If you choose to mount additional partitions as subdirectories, this will spread your Linux distribution across additional directories For instance, if you mount a partition as /usr, then any content stored under this subdirectory is stored on the /usr partition, while all other data is on the root-mounted (/) partition If you want 2915ch04.qxd 54 04/19/01 1:05 PM Page 54 Chapter • Installing Linux to limit or dedicate a certain amount of space to a directory, you can mount that directory in a limited amount of space The primary roles of the standard top-level Red Hat Linux directories are as follows: /bin Standard system utilities are stored here /dev Device files are stored here /home /opt Users’ home directories are stored here Optionally installed software is stored here /root The home directory of the root user Do not confuse this with the root-mounted (/) partition /sbin Standard system administration files are stored here /usr Additional system software and administration tools are stored here /var Log files and print spools are stored here This is commonly mounted separately in limited space on Web servers, as the log files from a Web site can otherwise easily crowd out any other information on that Linux computer /etc Administrative files and commands are contained here Device This indicates the Linux device name for each partition For IDE disks, the drives are labeled hdx, where x is a letter designating a drive (a for the primary master drive, b for the primary slave, c for the secondary master, and d for the secondary slave) Thus, if you have a single IDE hard disk, it is disk hda SCSI disks are labeled sdx with x again designating a drive Partitions on the disk are then numbered consecutively starting with hda1 and moving up Generally, partitions through are primary partitions, and and above represent the logical partitions common on many DOS systems In Figure 4.4, you see Linux partitions associated with the root directory (hda1) and the swap partition (hda5) Requested This indicates the minimum size of the partition in megabytes Actual This indicates the actual space allocated for a partition Disk Druid allows the creation of growable Linux partitions, which increase in size as free space is available on the hard disk and space runs out in the partition DOS partitions should have matching actual and requested values 2915ch04.qxd 04/19/01 1:05 PM Page 55 Configuring Your System for Installation 55 Type This field indicates the type of partition that you can create with Disk Druid Possible values include Linux native, Linux swap, Linux RAID, DOS 16-bit=32M (While you can’t create FAT32 or NTFS partitions here, Disk Druid now recognizes these common Microsoft Windows partitions.) The next main section of the screen is the set of five task buttons Use the Add button to create the necessary Linux partitions for your installation and the Edit button to make sure your existing DOS and Windows data is accessible in Linux or to change previous settings You can delete an individual partition with the Delete button If you want to start over, use the Reset button If you need more speed and security with your data, the Make RAID Device button lets you distribute files over a series of independent partitions Finally, there is the Drive Summary section This presents one line for each hard disk on your system and includes the following information about the drives: Drive This is the device name for the hard drive, discussed previously Geometry This indicates the number of cylinders, heads, and sectors (in that order) for the drive Total This indicates the total available space on the drive, in megabytes Free This shows how much of the drive is available, in megabytes, for additional partitions Used This indicates the total used space on the drive, in megabytes This number actually reflects how much is used in the sense of how much has been allocated to partitions These partitions may not be full, but the space is no longer available to be allocated to other partitions The number associated with Linux native partitions must be more than zero and should be more than 1GB before proceeding, because you need to use this space to install Linux in If you don’t have any free space, consult the discussion in Chapter 3, which describes how to allocate space for your Linux installation Used (%) This indicates the percentage of space on the drive allocated to partitions If this number is less than 100%, you can add more partitions Finally, the button bar across the bottom of the screen has Hide Help, Back, and Next buttons You can use the Hide Help button to hide the explanation screen on the left-hand side of the page You can use the Back button to return to the previous 2915ch04.qxd 56 04/19/01 1:05 PM Page 56 Chapter • Installing Linux menu Use the Next button when you want to continue to the next menu The Next button will be available only after partitions are configured correctly for Linux to be installed Adding New Partitions To add a new partition, you simply press the Add button on the main Disk Druid screen A screen appears asking for the following main information: • Mount point • Size in megabytes • Whether the drive can grow to use unallocated disk space as needed (through the Use Remaining Space check box) • Partition type (from a selection list field) • Which drives the partition can be created on If more than one drive is indicated as allowed and all allowed drives have sufficient space to create the partition, then Disk Druid will decide which disk to use If you want to create the partition on a specific disk, make sure that only that disk is checked You should use the Add button to create at least the following partitions: A swap partition Linux needs a separate partition to use for swapping This is necessary when you use up all your physical RAM and the operating system must draw on virtual memory (disk space masquerading as RAM) to keep functioning Subject to the limitations in the following note, you generally should at least match the amount of physical RAM you have on your system; if you have plenty of free disk space, make the size of the swap partition as much as double that of your physical RAM So, on a 32MB system, create a swap partition of between 32 and 64MB The partition type should be set to Linux Swap, and no mount point should be indicated To save room for other partitions, the Use Remaining Space check box should be unselected A root partition In this chapter, you are going to install Linux in a single partition (The next chapter discusses the use of multiple partitions or drives for the installation of Linux.) To this, you need to add another partition You will probably want the partition to be at least 1GB to give you room to work once Linux is installed This partition should be type Linux Native, should have a mount point of /, and can be marked with the Use Remaining Space option if there is unallocated free space on your drive that you want to use if the partition grows larger than its initial size 2915ch04.qxd 04/19/01 1:05 PM Page 57 Configuring Your System for Installation NOTE 57 Swap partitions depend on access speed to your hard disks Especially if you have a large amount of faster RAM (PC 100 or better), larger swap partitions (greater than 128MB) may be counterproductive Editing a Partition You can edit existing partitions by selecting them on the list of current partitions and then clicking the Edit button This brings up a window like the one you used when adding a new partition, except that here all the fields are filled in to match the settings of the partition you are editing If you have pre-existing DOS partitions, you can make them available to Linux by specifying a mount point for them To this, select the partition you wish to make accessible in Linux, press the Edit button, and then fill in a mount point for the partition If you have a single DOS partition, you could mount it as /dos, for instance If you have two DOS partitions, which are drives C and D in DOS and Windows, you could choose /dosc and /dosd (or /c and /d) respectively, as the mount points Deleting a Partition If, in the process of creating your Linux swap and root partitions, you make a mistake (maybe the swap partition is too large or your root partition too small), you can delete the partitions and then re-add them To this, select the partition in the list of current partitions and then press the Delete button WARNING Take care when doing this Don’t accidentally delete any partitions that already existed before you started installing Linux and that contain important data or software you want to keep Reset If, in the process of creating your Linux partitions, you feel the need to start again, click the Reset button This restores the partition table to the state before you started Disk Druid 2915ch04.qxd 58 04/19/01 1:05 PM Page 58 Chapter • Installing Linux Make RAID Device If you are setting up Linux as a server, you are setting up a computer for multiple users The programs and data on that server become even more important You can protect the data by spreading it out among multiple hard drives, known as a Redundant Array of Independent Disks (RAID) If you set up a series of RAID partitions, you can then configure them together with the Make RAID Device option Moving On Once you have finished creating and configuring your partitions, you are ready to move on You can this by pressing the Next button Formatting Your Linux Partitions The next step is to format your Linux partitions in preparation for installing Linux A list of partitions of type Linux Native appears with indications of the mount points they have Any newly created partitions should be marked for formatting by selecting the check box next to the drive If you have additional partitions of type Linux Native, they should be formatted if they are new partitions If they already existed (this is unlikely for new Red Hat users) and you want to retain the data they hold, don’t mark them for formatting You can indicate that a bad block check should be performed during formatting This is a good idea, especially for new hard drives Setting Up LILO LILO is the Linux boot loader In order for your system to boot properly, you need to configure and install LILO LILO also provides the dual-boot features that can allow you to choose what operating system to launch at boot time, providing you with access to your existing Windows or DOS system as well as Linux There are four parts to this process, as shown in Figure 4.5 First, you need to decide where to install LILO: on your hard drive and or on a boot disk 2915ch04.qxd 04/19/01 1:05 PM Page 59 Configuring Your System for Installation 59 FIGURE 4.5: Configuring the Linux boot loader Next, if you choose to install LILO on your hard drive (as you should), there are two viable locations: on the Master Boot Record (MBR) or on the first sector of the boot partition You should install LILO on your MBR unless you are running an operating system with a boot loader such as OS/2 or Windows NT/2000 or have set up another boot loader such as Partition Magic or System Commander If you already have one of these other boot loaders, you don’t need LILO in the way; you should then install LILO on the Linux boot partition WARNING You need to either install LILO or create a boot disk during this step in order to boot your Linux system It is highly recommended that you install LILO during this initial installation Most hard drives can be accessed in linear mode Unless your hard drive does not use logical block addressing (LBA) mode (check your BIOS), keep the Use Linear Mode option selected 2915ch04.qxd 60 04/19/01 1:05 PM Page 60 Chapter • Installing Linux In the next part of the screen, you can see all partitions with operating systems When you set a Default boot image, you set the operating system (usually Linux or Microsoft Windows) that starts by default when you boot your computer The boot label is the name you use (in Figure 4.5, dos or linux) to select which operating system will boot when you start your computer Network Configuration The next item to be configured is your network Because you are installing a stand-alone system in this chapter, choose not to configure your network Chapter 27 discusses networked configuration in more detail Time Zone Configuration The next step is to configure your computer’s clock and time zone You need to make two decisions First, you need to indicate whether you want your system’s clock set to your local time or to Greenwich mean time (GMT), also known as Coordinated Universal Time, which is known by its French acronym, UTC If you run only Linux on your computer, set the clock to UTC Linux then converts it to the current time for your time zone But if you also run other operating systems on your PC, don’t select this option Second, you need to choose the actual time zone from the list of available time zones Account Configuration As a multiuser operating system, Linux needs at least one user to exist in order for it to be used On all systems, you have to have a root user, so you are prompted to provide a root password (twice, for confirmation) The root user is the all-powerful system administrator When logged in as the root user, you can view all users’ files, perform all system administration tasks, and, if you want to, delete all files on your system This is a powerful account, and you need to keep this password secure if other people are going to have access to your system You can then set up individual accounts, based on a desired account name and password Enter a descriptive name in the Full Name text box 2915ch04.qxd 04/19/01 1:05 PM Page 61 Configuring Your System for Installation 61 Authentication Configuration Next, you are prompted to make authentication configuration selections There are five options on this screen and each can be selected individually They are not mutually exclusive The options are shown here: Enable MD5 Passwords Typically, Unix systems have used a relatively weak encryption scheme for storing passwords This option makes Linux use a more rigorous encryption scheme for storage of user passwords By default, this option is selected Use Shadow Passwords Using shadow passwords is a technique designed to make it harder for an attacker or a regular system user to steal the user database and then attempt to crack the system administration password at their own leisure By default, this option is selected Enable NIS This is a type of network authentication common in many Unix networks, especially those with Sun Solaris-based servers You can specify the domain name of the group of computers on this network or specify a specific server where NIS usernames and passwords are stored By default, this option is not selected Enable LDAP The Lightweight Directory Access Protocol is set up for special directories of users If you know the name of an LDAP server on your network, you can enable LDAP By default, this option is not selected Enable Kerberos Kerberos is a secure means of encrypting passwords that are transmitted across a network Kerberos requires access to a server that grants Kerberos tickets, which includes the encryption scheme Do not enable Kerberos unless you plan to set up all Linux services to use this protocol By default, this option is not selected Unless you are familiar with these options and have compelling reasons to alter them, leave the default selections the way they are and move on Selecting Packages Now that your hard disks are configured and your Linux partitions are formatted, you are ready to begin installing the actual software The default installation includes all the necessary core software, but several optional components are also available, including those shown in Figure 4.6 2915ch04.qxd 62 04/19/01 1:05 PM Page 62 Chapter • Installing Linux FIGURE 4.6: Selecting additional components Each component is a collection of related packages for specific tasks such as dial-up connections, Web surfing, and others You can choose the packages individually by marking their respective check boxes or you can choose the Everything option, which is the last entry in the list The Select Individual Packages option that appears below the list field indicates that you want to select individual packages within each component However, if you are a first-time Linux user, it will be hard to choose the packages Leaving this option unselected means that each component is installed in its entirety If you have plenty of disk space (more than 2GB; 3GB is preferable), then select everything so that you have a complete Linux installation Note the Total Install Size shown at the bottom of Figure 4.6 If your space is in more limited supply, consider installing the following components at a minimum: • Printer Support (If you don’t have a printer, then this is unnecessary.) • X Window System • GNOME 2915ch04.qxd 04/19/01 1:05 PM Page 63 Configuring Your System for Installation • Mail/WWW/News Tools • DOS/Windows Connectivity • Multimedia Support • Dial-up Workstation 63 If you have sufficient room, install KDE as well as GNOME to help you follow Chapter 11, “Using KDE.” If you choose to install X Windows, you next get to configure your video card and monitor Otherwise, you are taken directly to installation, as described at the end of the next section Configuring X Windows X Windows is Linux’s graphical user interface (GUI) Chapter 7, “Installing and Configuring X Windows,” discusses configuring X Windows in detail For now, let’s quickly run through the configuration process Configuration can be quite complex and a whole chapter is devoted to it, so any problems will be left to that chapter for resolution First, a list of monitor types appears If you find an exact match for your monitor, choose it; otherwise, select Unprobed Monitor or hold off until you read Chapter An incorrect configuration can cause damage to the monitor The match should be exact Next, an attempt is made to determine what type of video card you have If this fails, a list of available video cards appears Select the one that most closely matches your card (if none match, select Generic VGA Compatible, or leave the configuration of X Windows until Chapter 7) Select the amount of video memory available on your video card Consult your video card’s documentation for this information Once you’ve made your selections, you can click Test This Configuration to make sure that the chosen settings work for your system If you see and choose a Customize X Configuration option, you can customize the resolution of X Windows on your monitor (aka Video Modes) With the Use Graphical Login option, you can set up a graphical login screen If you want to configure graphics after installing Linux, select the Skip X Configuration option You can then leave graphical configuration to Chapter [...]... to create robust enterprise Web and mail servers This section describes how to set up Linux-based Web and mail servers If you already have some experience with Linux, you probably can skip straight to the second section of the book, “Installing Linux, and begin installing a Linux system If you have never used Linux before, start at the beginning with “Welcome to Linux” to get your feet wet and become... helpful to do so before diving into the world of Linux, where the command line is more powerful, and therefore more heavily used, than in the Windows arena If you are already a power user of Windows, then you are more than ready to become a power user of Linux Just as this book will make the everyday computer user proficient at getting their work done using Linux, it will help you become an advanced Linux... and desktop computers Any operating system with the breadth of features and capabilities offered by Linux cannot be covered completely in a single book Still, this book provides the sound knowledge of Linux, and Red Hat in particular, needed for users to move on and learn more on their own as they use Linux in their everyday work Who Should Read This Book? This book is really designed for anyone who... and X Windows 161 Chapter 10: Advanced GNOME Configuration 193 Chapter 11: Using KDE 217 Chapter 12: Advanced X Windows Configuration 259 2915FM.qxd 05/09/01 Part IV: Part V: Part VI: 12:16 PM Page xii Mastering the Essentials Chapter 13: Introducing Linux Commands 291 Chapter 14: Working with Files 315 Chapter 15: Using LinuxConf and Other Tools for System Configuration 333 Chapter 16: Understanding... Environments in Linux This section looks at the use of X Windows with the GNOME desktop manager (the standard Red Hat Linux GUI) This discussion includes an overview of some common X Windows applications Mastering the Essentials This section describes a range of essential skills needed to truly master Linux Topics covered include file management, system configuration, and printers and peripherals Basic... and Windows networks and will give you an awareness of basic security issues when using Linux in a networked environment Finally, this section examines DOS and Windows compatibility and integration in Linux, which allows many organizations to migrate from their current Windows environments to Linux without sacrificing their current investment in software and applications Using Linux As a Web and E-Mail... 233 233 234 235 238 240 241 241 251 252 252 253 254 255 256 259 260 262 263 266 267 270 272 273 274 276 278 279 282 285 285 286 287 287 287 2915FM.qxd 05/09/01 12:16 PM Page xxi Contents PART IV: xxi Mastering the Essentials 289 13 291 Introducing Linux Commands What Is a Linux Command? Executing a Linux Command Common Linux Commands su pwd, cd, and ls more and less find, locate, and grep tar and gzip

Ngày đăng: 28/08/2016, 13:21