1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Installation docx

86 338 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Tiêu đề Installation
Tác giả Jang
Trường học Red Hat Academy
Chuyên ngành Linux System Administration
Thể loại Sách hướng dẫn cài đặt
Năm xuất bản 2002
Thành phố Unknown
Định dạng
Số trang 86
Dung lượng 856,96 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Generally, moreexperienced users like yourself will use the Workstation or Server installation options.The following lists the minimum disk space requirements for a basic US PersonalDesk

Trang 1

✓ Two-Minute Drill

Q&A Self Test

Trang 2

Installation is one of the three parts of the RHCE exam To pass this part of the exam, you’ll

need to know a lot more than just the basic GUI installation process for a single computer!

Once you’ve studied the installation chapters (2, 3, and 5), you’ll be able to install Red Hat

Linux in a number of ways: directly from the CD, using boot disks, managing special situations

on laptop computers, accessing from networks, and using automated Kickstart-based tools

While this chapter covers the “basics,” the basics are important You’ll learn thenuances of different installation classes Both fdisk and Disk Druid are useful toolsfor configuring your hard drives Both GRUB and LILO are popular and flexibleoptions as boot loaders And if you’re managing a LAN and don’t want to spend allnight inserting CDs and typing in commands at every computer, you need to learnhow to install Red Hat Linux in various network configurations

Many users download their version of Red Hat Linux directly from one of manyFTP sites on the Internet That is a common practice in a software world governed

by the Linux General Public License There are four basic installation routes thatyou can take—but they all use the same packages, and customization is possible ineach case

All you need to get started is sufficient unformatted free disk space The easiestway to get this is by adding a new disk drive to your system The mechanics of adding

a drive and changing your CMOS settings (so your CD-ROM is a bootable device)are beyond the scope of this book, but neither operation is complicated Once the newdrive is installed and your system is configured to boot from the CD-ROM drive,just stick the first Red Hat Installation CD-ROM into the CD drive and reboot!

Take the defaults for a Workstation installation and see what happens; it will probablyjust install, dual-boot automatically, and voilà! You are ready to play!

As you prepare for the RHCE exam, remember to think in terms of what is practical While it is important to know how to download and set up a Red Hat Installation CD, it wouldn’t be practical for a group of students to all

be downloading the Red Hat installation CDs during an actual exam.

96 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

Composite Default screen

Trang 3

CERTIFICATION OBJECTIVE 3.01

Selecting an Installation Option

Red Hat Linux includes its own installation program The graphical version of thisprogram is known as Anaconda There are five basic directions you can take duringthe installation process: Personal Desktop, Workstation, Server, Custom, and Upgrade.This section will help you understand the implications of each of these choices, asillustrated in Figure 3-1

Time is usually of the essence on the RHCE exam As text mode installation is the fastest way to install Red Hat Linux, all of the Figures in this chapter are based on that installation method.

The two most important options are Workstation and Server Almost by definition,

a Workstation installation is much simpler than a Server installation Furthermore,Workstation installs are optimized for local user applications associated with the XWindow system While many Linux administrators don’t even bother installing the

X Window on a Linux server, expect to install the X Window for regular users

Selecting an Installation Option 97

FIGURE 3-1

Red Hat

installation

options

Trang 4

It’s important for administrators to know how to configure the X Window

on a Linux computer.

The server installation includes more network servers and management features

The default Red Hat Linux server includes several distinct partitions that make upthe filesystem, including separate /usr, /home, and /var directories By splitting outthe /home directories to one partition, disk quotas can be maintained on just thatfilesystem, and backups and restores are more specific With smaller filesystems, it iseasier to recover from a disaster In addition, it is easier to expand a smaller filesystem.Depending on your needs, you can set up a system with anywhere from 500MB

to 4.7GB of files Of course, you have to have additional room for user files, log files,and any additional applications that you may want to install in the future

The essence of each installation is in the installed packages As you examine each

of the options, focus on the installed packages

Several partitions are associated with specific sizes For example, the current defaultsize for /boot is 100 MB The actual size that you see in your installation will varydepending on the size and number of cylinders on your hard drive(s)

Personal Desktop

The Personal Desktop option includes packages for basic Linux users Generally, moreexperienced users like yourself will use the Workstation or Server installation options.The following lists the minimum disk space requirements for a basic US PersonalDesktop installation

■ Personal Desktop with GNOME or KDE: 1.8GB

■ Personal Desktop with GNOME and KDE: 1.9GBPlease note, these figures may vary slightly from those shown in the Red Hat Linuxdocumentation They were taken from a sample installation of the latest Red HatLinux beta available at the time of this writing

This is just the minimum disk space required for Linux packages and other files

You’ll also need a swap partition In the default configuration, Red Hat Linux sets

up a swap partition that is twice the size of the detected RAM You’ll also requiremore for actual data files such as documents, downloads, source files, and more Ifyou’ve set up additional partitions for separate directories such as /home, /usr, and/tmp, the space requirements will also increase

98 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

Composite Default screen

Trang 5

If you are testing Linux for the first time, add at least several hundred megabytes

of additional space; more if you plan to reconfigure your kernel With other applicationsavailable during Red Hat Linux installation, you may need 4GB or more of disk space

Behind the Scenes: The Partition Layout for Personal Desktop

The Personal Desktop installation option first deletes all Linux partitions Otherpartitions, such as those created for Microsoft Windows filesystems such as VFATand NTFS, are untouched The deleted Linux partitions are added to the free space

on your hard drive Then the default Workstation installation configures the followingthree partitions in that free space:

■ A swap partition twice the size of your RAM (This may change if the amount

of RAM is large or the size of your hard drive is small.)

Dual-Boot with Previous OS

Any previous operating system that existed on the machine is left intact This providesseveral advantages It is appropriate on a test or development computer where youneed both operating systems Alternatively, if you’re making the transition to Linux,you may still need the old operating system for a few files and applications

Please note, the figures for required hard disk space may vary from those shown

in the Red Hat Linux documentation They were taken from a sample installation

of the latest Red Hat Linux beta available at the time of this writing

Workstation

The following lists the minimum recommended disk space requirements for a basicworkstation installation

■ Workstation with GNOME or KDE: 2.1GB

■ Workstation with GNOME and KDE: 2.3GB

Selecting an Installation Option 99

Trang 6

This is just the minimum disk space required for Linux packages and other files.

You’ll also need a swap partition In the default configuration, Red Hat Linux sets

up a swap partition that is twice the size of the detected RAM You’ll also requiremore for actual data files such as documents, downloads, source files, and more Ifyou are testing Linux for the first time, add at least several hundred megabytes ofadditional space; more if you plan to reconfigure your kernel

Behind the Scenes: The Partition Layout for Workstation

The Workstation installation option first deletes all Linux partitions Other partitions,such as those created for Microsoft Windows filesystems such as VFAT and NTFS,are untouched The deleted Linux partitions are added to the free space on your harddrive Then the default Workstation installation configures the following threepartitions in that free space:

■ A swap partition twice the size of your RAM (This may change if the amount

of RAM is large or the size of your hard drive is small.)

Dual-Boot with Previous OS

Any previous operating system that existed on the machine is left intact This providesseveral advantages It is appropriate on a test or development computer where youneed both operating systems Alternatively, if you’re making the transition to Linux,you may still need the old operating system for a few files and applications

Workstation Option Packages Installed

The list of file packages installed by a default Workstation installation is listed on theCD-ROM in /RedHat/base/comps.xml This list contains references, either directly

or indirectly through the use of group names, to the hundreds of packages installed.Each package contains at least one file, and sometimes dozens or more

100 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

Composite Default screen

Trang 7

Selecting an Installation Option 101

Notice that the workstation contains 13 groups (referenced by the <groupreq>

container preceding the group name) of software packages You can use this syntax

to customize the installation process, if you use the automated Kickstart systemdiscussed in Chapter 5

Server

The server option includes a default group of packages that allow you to manage thiscomputer as a Linux Server Before starting a server installation, move any data thatyou might need from this computer The server installation removes all partitions

Trang 8

The Custom Installation Option

The Custom Installation option provides the most flexibility for an experienced Linux

or Unix administrator This option allows you to select all of the package groups thatyou need If you know exactly what you want, you can even select from a list ofindividual RPM packages

Selecting Package Groups

The custom installation process allows you to select as many of the package groups asyou need Each group encompasses a list of RPM packages As explained in Chapter 4,

102 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

/home Depends on available hard disk space /usr Depends on available hard disk space /var Depends on available hard disk space

Extended Depends on available hard disk space

Trang 9

Selecting an Installation Option 103

some RPMs such as certain kernel libraries won’t work unless the appropriate C languagecompiler is installed These are known as dependencies The Red Hat installationprogram includes routines to make sure that all dependencies are satisfied

Figures 3-2 through 3-5 show the various package groups available, based on theCustom installation option It is straightforward Selected packages include a checkmark

in the box to the left of the package group name

Trang 10

It’s important to pick only the package groups you need Fewer installed packagesmeans more room for personal files for you and your users, as well as the log filesyou need to monitor your system and actually get some use from your applications.See the next section for more information on each package.

Understanding how these package groups work is important in a kickstart installation, which is described in more detail in Chapter 5.

Packages

This section includes the briefest possible overview of each of the packages you canselect when you use the Custom installation option in Red Hat Linux While the detailswill vary as Red Hat Linux evolves, the spirit of what is installed by these packages isrelatively constant Remember, some of these packages depend on others; for example,

if you want to install Dialup Support, Red Hat will make sure that you install NetworkSupport as well

For complete details of the RPMs associated with each package, go to the first RedHat Linux installation CD, and read the comps.xml file in the /RedHat/base directory

in the text editor or Web browser of your choice

These packages are based on the latest beta version of Red Hat Linux 8.0 available

Trang 11

Selecting an Installation Option 105

You can modify the comps.xml file to group packages in any way you desire Since the Red Hat installer, Anaconda, reads from the /RedHat/base/comps.xml file on the installation directory, it will read any package group that you choose to add to this file You’ll see the result on one of the screens shown

in Figures 3-2, 3-3, 3-4, or 3-5.

Administration Tools

Red Hat is developing a series of graphical administration tools for Linux, such

as redhat-config-date and redhat-config-users There are other Red Hat graphicaladministration tools available as part of the Server Configuration Tools package group

Authoring and Publishing

The Authoring and Publishing group includes support for several documentationsystems, such as DocBook and TeX

DNS Name Server

The DNS Name Server group includes the tools you need to configure and maintain

a Domain Name System server on the local Linux computer In the Linux world,

a DNS server is also known as a nameserver, based on the Berkeley Internet NameDomain (bind)

Development Tools

This group includes a large number of development tools Additional developmenttools are included when you install other packages such as GNOME Development,Graphics, Web Server, News Server, and more

Editors

These include the basic text editors associated with Linux, including vi, emacs, andjoe While it’s essential that you know vi to use the Linux rescue mode, the emacstext editor may be the most popular text editor in the world of Linux and Unix Italso requires an extensive series of packages, which makes it impossible to includeemacs on a rescue floppy that is limited to 1.44MB

Engineering and Scientific

Red Hat Linux includes a group of packages for mathematical and scientific purposes,such as gnuplot, pvm and units

Trang 12

106 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

FTP Server

This includes two of the more important FTP servers: anonftp and vsftpd

GNOME Desktop Environment

The GNOME group includes the basic packages required to install the GNOMENetwork Object Model Environment While GNOME is the default GUI for RedHat Linux, the desktop manager that you configure does not matter for the exam

GNOME Software Development

The GNOME group includes the basic packages required to develop additional GTK+

and GNOME GUI applications

Games and Entertainment

Be careful with this package group Do you really want to install games on a businesscomputing system? Some believe that computer games are useful to help newer users

to become comfortable with Linux

Graphical Internet

Linux now includes a number of different GUI clients for Internet access, from themozilla Web browser, the xchat and gaim instant message utilities, and the evolutionand kmail e-mail readers Closely related to the Text-based Internet package group

Graphics

This package group automatically incorporates the X Window package, and a number

of graphical applications This includes the most prominent Linux graphics application,The GIMP Depending on whether you also install GNOME and/or KDE, this alsoinstalls graphical packages associated with each of these GUIs

KDE

The KDE group includes the basic packages required to install the K DesktopEnvironment, which is the main alternative GUI for Red Hat Linux It is the defaultGUI for a number of other Linux distributions

Composite Default screen

Trang 13

Selecting an Installation Option 107

Kernel Development

This group includes the very large Kernel source packages, which currently requirearound 400MB of disk space It also requires the installation of the SoftwareDevelopment package

Mail Server

This group includes the packages required to configure a sendmail based IMAP

or a postfix mail server

Network Servers

This package group includes a number of smaller servers that are useful for running

a network, including DHCP, telnet, and rsh It does not include larger networkdaemons such as Apache, news, FTP, or DNS

of the installation

Time is of the essence on the RHCE exam If you choose not to install large package groups such as the Office/Productivity package group, you may save some time on the Server Installation and Network Services Setup exam.

Printing Support

Red Hat Linux currently includes support for two different print systems The LPRngsystem, short for Line PRinter, next generation, is based on the original lpr daemondeveloped for Unix Red Hat manages lpr-based printers well Red Hat includes aprinter configuration utility, printconf-gui, which can automate the configuration

of the otherwise difficult /etc/printcap configuration file

While Red Hat Linux also includes support for CUPS, this system is not included

in the Red Hat Linux 8.0 Printing Support package group As of this writing, you’llneed to install CUPS packages separately CUPS is the Common Unix Printing System

Trang 14

108 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

which supports the next-generation printing protocol, known as IPP Once installed, itcan help detect network printers, with a Web-based interface

As of this writing, LPRng is the default for Red Hat Linux 8.0; it is reasonable

to expect the RHCE 8.0 exam to focus on this print system However, Red Hat

is in the process of moving to CUPS Expect later RHCE exams to cover this other print system For the latest information, see the latest Red Hat exam prep guide at www.redhat.com.

SQL Database Server

The structured query language (SQL) is one of the basic database languages Thisgroup includes support for the PostgreSQL and mysql database systems

Server Configuration Tools

Red Hat is developing a series of server configuration tools for Linux, such as config-bind and redhat-config-samba There are other Red Hat graphical administrationtools available as part of the Administration Tools package group

redhat-Sound and Video

Not surprisingly, the Sound and Video group installs the packages required to allowyou to use sound cards and interconnect the basic components of your sound andvideo system: sound card, speakers, microphone, and CD/DVD drive

System Tools

This package group includes a varied array of tools, from the Samba client to theethereal network traffic reader and the gnome-lokkit front end to the lokkit firewallconfigurator

Text-based Internet

Linux includes a number of different text-based clients for Internet access, from thelynx Web browser, the ncftp FTP client, and the pine and mutt e-mail readers Theseare closely related to the Graphical Internet package group

Web Server

Composite Default screen

Trang 15

Windows File Server

This is not a very complex group; it includes the Samba packages required to set upLinux as a client and as a server on a Windows-based network

When you're planning an upgrade of any version of Red Hat Linux on several computers, try the upgrade on a test computer first If you have a working service that you don’t want to change yet, such as Apache, you can exclude those packages from the upgrade If you’re ready to upgrade, remember to back up your system first, or at least the configuration files that you used, so that you can go back if something goes wrong.

Baseline Packages

Every installation of Red Hat Linux gets a series of packages, organized into the Coreand Base package groups You can find a list of these on the first Red Hat InstallationCD-ROM in /RedHat/base/comps.xml, at the top of this text file Figure 3-6 showsthe first few base packages from this file

Selecting an Installation Option 109

Trang 16

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

CERTIFICATION OBJECTIVE 3.02

Required Disk Space

Most new computers come with very large disks, easily supporting even the nearly5GB of files associated with a full installation of Red Hat Linux If you do not havethis much space available, you should carefully consider the space requirementsassociated with each type of installation When considering the following options,remember to leave adequate room for swap space, personal files, log files, and anyapplications that you may want to install after Red Hat Linux installation is complete

Trang 17

Required Disk Space 111

Workstation- and Personal Desktop Space Requirements

A Workstation-class installation, with GNOME or KDE (and swap space), normallytakes over 2GB free space, before you add other files You can add additionalpackages during the Red Hat workstation-class installation process PersonalDesktop-class installation requirements are nearly identical

Server-Class Space Requirements

The space requirements of a server-class installation can vary By default, Red HatLinux installs less than 1GB of files in this type of installation But the default RedHat server partition scheme sets up seven different partitions in this type of installation,which requires nearly 4GB of disk space Obviously, you can’t install everything,which requires enough space for 4.7GB of files

You can add additional packages during the Red Hat server-class installation process,installing up to 4.7GB of files within the default partition setup

Custom-Class Space Requirements

A custom-class installation requires around 500MB for a minimal installation andover 4.7GB of free space if every package is selected

The Everything option includes more packages than just selecting all the specified groups, and thus it requires more disk space overall To use automatic partitioning, you must have enough free disk space available If you do not have enough free disk space, the automatic partitioning option will not work, and you will be required to partition the disk.

How Much More Space Is Needed?

The question of disk space needed over and above operating system needs is alwaysrelevant You will require as much as it takes, and probably more The absoluteminimum for a Red Hat Linux OS is around 500MB of disk space, if you install Linuxwith few server services and without X With 800MB, you could probably sneak in

X, but you still wouldn’t have enough room for a few server services and games Youstill should have at least 100MB or more to work with And if you want GNOME

or KDE, you’ll need another 200MB or so

For a Workstation installation, 2GB+ of disk space is merely a starting point;

you’ll likely need lots of additional space for user data Fortunately, it is relatively

Trang 18

easy to add additional physical hard disks to Linux You can then use tools like fdiskand LVM as discussed here and Chapter 5 to expand your filesystem.

Then, if you are new to Linux, select either Workstation for a single dedicated user

or the Server option for Web, FTP, File and Print, DNS, and NFS services If youhave some Linux or Unix experience, you will probably want to use the Custominstallation option for additional flexibility

You’ll also need to remember swap space requirements By default, Red Hat usuallyconfigures a swap partition that is about twice the amount of RAM on your computer.The actual amount of swap space that you may need is a highly debatable issue Somesuggest that Linux computers can use a swap partition that is up to three or even fourtimes the amount of available RAM Others suggest that at higher levels of RAM,100MB of swap space is more than sufficient

Remember, the true cost of disk space is the cost of the disk space itself plus the cost of the backup media and associated backup hardware!

CERTIFICATION OBJECTIVE 3.03

Filesystems

In all of the preceding configurations, automatic partitioning sets up multiple volumes—separate volumes on each directory The advantage of separate partitions for certaindirectories is that it limits the risks to your system For example, many Webmastersconfigure their Web sites to write daily log files with data relating to all users whovisit their sites These files can become quite large, especially for large online merchants

Before you decide how to set up partitions, you need to know about each of themajor Linux directories Linux directories are organized according to something known

as the Filesystem Hierarchy Standard (FHS)

Filesystem Hierarchy Standard

The FHS is a standard for organizing directories for Linux- and Unix-based systems.Every FHS-compliant operating system starts with a top directory, root, symbolized

by the forward slash All other directories are subdirectories of root The major FHS

112 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

Composite Default screen

Trang 19

Why Separate Filesystems?

Unix was developed when disk space was scarce As Unix was an operating system forlarger companies and universities, administrators could get multiple disks for eachUnix computer They took advantage of the space by splitting up the filesystem intosmaller, more manageable pieces Different directories were mounted on differentphysical drives

This has a number of advantages Small partitions are easier to maintain Smallerpartitions are easier to back up and restore The size of a partition can limit the spacetaken by any specific directory You can set up specific partitions as “read-only” foradditional security

Filesystems 113

Directory Description

/ The root directory Other directories are below root in the FHS hierarchy.

Unless mounted separately, the contents of other directories are in the root directory partition.

/bin Essential command line commands Do not mount this directory on

a separate volume, or else you may not be able to find these commands when you use a rescue disk.

/boot Linux startup programs Normally includes the Linux kernel Separate

/boot partitions are common; the default size is currently 100MB.

/dev Linux device drivers Do not mount this directory on a separate partition /etc Basic configuration files.

/home User home directories (except the root user).

/lib Program libraries Do not mount this directory on a separate partition /mnt Mount point for removable media (floppy disks, CD drives).

/opt For applications, such as StarOffice or VMWare.

/proc Running kernel processes.

/root Home directory for the root user Do not mount this directory separately /sbin System administration commands Do not mount this directory separately /tmp Temporary file default directory.

/usr Small programs.

/var Log files, print spools, other variable-sized data.

Trang 20

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

114 Chapter 3: Installation

There is at least one case where you should not mount different Linux directories

on different partitions If you’re limited to a smaller hard drive, you need all of thespare room that you can get This may apply to an older laptop computer, or an oldercomputer that you’re using for a dedicated purpose, such as a DNS server or a gatewayrouter

Configuring Linux Filesystems on Different Partitions

When you set up a Red Hat Server filesystem, you can let Red Hat configure thepartitions for you The following is the default server filesystem breakdown

Partition Description

/boot Used for larger hard drives on older computers, which can see only the

first 1024 cylinders on a disk.

/home If you’re limiting the disk space for each user, you should also mount

/home on a separate partition to make sure you don’t let user requests get out of control.

/var The variable area gets written to by memory; often used for mail and

spooling; system memory data becomes very fragmented.

/usr Programs that you may want to protect If you mount /usr separately,

consider making it read-only in /etc/fstab.

/ The root directory for all other files.

Any additional filesystems that you create can also be mounted on separatepartitions to meet additional or specific needs of related groups of users Someexamples include: /development, /dbms, /financials, /inventory The /tmp directory isoften also mounted on a separate partition, to limit the space allocated to whatshould be temporary storage

Other Possible Separate Filesystems

Dedicated services are also good candidates for separate filesystems For example,specific applications such as Web and FTP services can take up gigabytes of data Youwant to protect the rest of your computer if problems arise with a specific service File

Composite Default screen

Trang 21

and print sharing services such as NFS and Samba present security risks because theyexpose shared directories to other users.

If you don’t mount these services on separate partitions, anyone who uploads a largenumber of files could conceivably fill your hard disk

If the number of files and users are large, you may even want to spread shared filesover several partitions on different physical drives In this situation, not every user willwant data from the same drive all of the time The load is shared by the different drives.Performance is improved

CERTIFICATION OBJECTIVE 3.04

The Installation Process

You have many interrelated questions to answer during installation, just as you havemany ways to access installation files, and many options on how to install the operatingsystem The following installation outline is designed to get you through the process

in as simple a fashion as possible, with just enough detail to keep you going Whileother sections and chapters address the special situations that you’re more likely toencounter on the RHCE exam, you need to know how to install Red Hat Linux beforeyou can work though the other installation scenarios

Booting the First CD-ROM

Most current Intel-based PC hardware systems allow you to boot directly from theCD-ROM drive The latest official copy of Red Hat Linux, as well as Red Hat Linuxinstallation CDs that you might download from alternate sources, is also designed

to boot directly into the installation program

Figure 3-7 shows the Red Hat 8.0 startup screen You should be able to access thisscreen by booting from the CD-ROM, or with the help of one of the following floppydisk images: boot.img, bootnet.img, or pcmcia.img

If You Need an Installation Floppy

If your hardware does not boot from the CD-ROM, you will need to create one ormore DOS-based boot disks, from the image files supplied with the first Red Hatinstallation CD-ROM

The Installation Process 115

Trang 22

Installation floppies are easy to create Depending on your hardware and location

of the Red Hat installation files, select one of the following disk images:

boot.img Local installation from a hard disk or CD-ROM

bootnet.img Network installation through HTTP, FTP, or NFS

pcmcia.img Laptop computer–based installation Supports installationfrom local or network sources

Depending on your hardware, you may also need one of the following images

on a floppy disk:

pcmciadd.img Additional support for PCMCIA adapters

drvblock.img Additional drivers for special hardware

drvnet.img Additional network card drivers

Trang 23

Creating Boot Floppies

There are two easy ways to project the boot images from the first Red Hat InstallationCD-ROM onto a floppy disk

In a Microsoft Windows–based operating system, open an MS-DOS window.Navigate to the drive associated with your CD-ROM For example, if your CD-ROM

is drive E: on your Microsoft-based system, just enter: E:\> \dosutils\rawrite.

The rawrite program prompts you for the filename to write to the diskette Next,

it prompts you for the target drive, normally the A: drive

At the first prompt, enter the full path to the desired filename as follows:

E:\images\filename.img

You can view the files on any of the floppies that you create with MS-DOScommands You also must repeat this entire rawrite process for each image file youwish to create, as illustrated in Figure 3-8

Once the boot image is transferred to disk, it’s easy to read, as shown in Figure 3-9

Creating Diskette Images with Any Unix/Linux System

You can also create diskette images with the dd command from any running Unix

or Linux computer, along with the desired image files on the CD-ROM For example,the following commands mount the appropriate CD and “disk dumps” the image into

a disk on a floppy drive

Trang 24

Alternatively, you can just “cat” the disk image of your choice directly to a floppy drivedevice For example, the following command reads the laptop boot disk directly tothe first floppy drive:

# cat /mnt/cdrom/images/pcmcia.img > /dev/fd0

Know how to create the right boot disk for your system If you have a problem, the installation boot disk can also serve as a rescue disk At the boot prompt, the linux rescue command will eventually bring you to a rescue mode that can help you mount your partitions or recover specific files or directories.

Almost Ready to Install

Now you have your Red Hat Installation CD-ROMs If necessary, you also have bootfloppies to get to the Red Hat installation files Your system is now configured to booteither from the CD-ROM directly or from one of the boot floppies created from one

of the previously mentioned boot images (boot.img, bootnet.img, pcmcia.img) Nowinstall your first Red Hat Linux Installation CD-ROM, and reboot your computer

Bootable CD-ROM

Most newer computers can be set to boot directly from the CD-ROM Just after yourcomputer reboots, go into the BIOS menu, as discussed in Chapter 2 You should

be able to change the boot order to look to the CD-ROM drive first If this option

is not available, you’re just going to have to use an installation boot floppy

Trang 25

CD-ROM or Boot Diskette Starts Installation

Now your PC should boot from the CD-ROM or the installation boot floppy After

a few files are opened and decompressed, a Welcome To Red Hat Linux screen shouldappear, as shown in Figure 3-10

You are finally at the first stage of installing Red Hat Linux Press theF2button

As you can see in Figure 3-11, a number of options are available to you when youstart Especially if you’re working from installation CDs that you downloaded fromthe Internet, your first step should be to check the media While Red Hat provideschecksums that you can use for this purpose, the easiest way to check your CDs is with

the linux mediacheck option Type in that command at the boot: prompt, and you’ll

see an option to test the media as shown in Figure 3-12

If you have a problem with your graphics hardware pressF3from the first screen You can try to force a resolution with a command such as linux resolution=800x600.

The Installation Process 119

FIGURE 3-10

The First Red Hat

installation screen

Trang 26

Click OK Here you can test the CD currently in the drive, or eject it and place adifferent Red Hat installation CD into the drive Depending on the speed of yoursystem, the test may take several minutes If successful, you’ll see a screen likeFigure 3-13.

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

Trang 27

Click OK and the CD should be automatically ejected You can then insert the nextRed Hat installation CD for checks Once this process is complete, you can reinsertthe first Red Hat installation CD and then proceed with the standard Graphical Modeinstallation.

If you want to install Red Hat Linux in another way, restart your computer againwith the first Red Hat Linux installation CD in the drive The standard Red Hat Linuxinstallation options are based on Figure 3-10 and 3-11:

Graphical Mode The default is a graphically based Red Hat installation usingthe program known as Anaconda

Text Mode The linux text option starts a low-intensity graphical installation

known as text mode that all but the most graphically challenged computers canhandle If your computer can’t even handle text mode, consider upgrading forRed Hat Linux

Disable Hardware Probing The linux noprobe option allows you to enter

your own drivers, starting with the hard drive Options are available to setIRQ ports, I/O channels, and DMA addresses during this process Text-mode

installation is also possible using the text noprobe option While this mode

can help you get around special hardware detection problems, be ready withdriver disks as well as the settings that you desire for each hardware component

Rescue The linux rescue option allows you to use the Red Hat Installation

CD as a rescue disk The Red Hat rescue disk includes a bare minimum of

The Installation Process 121

FIGURE 3-13

The CD is OK.

Trang 28

122 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

tools including the vi text editor It does not include emacs It does include

an option where it tries to detect and mount the appropriate directories onthe appropriate partitions, so linux rescue may be all you need

Driver Disk The linux dd option prompts you to enter a driver disk, such

as one based on the drivers.img or pcmciadd.img files described earlier

Non-CD Installation It’s possible to use the Installation CD to access theRed Hat Linux installation files from other sources such as over a network,

with the linux askmethod option.

Updates Red Hat hopes to have update disks available for groups of packages

in the future

Basic Installation Overview

The basic Red Hat Linux installation is straightforward and should already be wellunderstood by any RHCE candidate Most of the steps are described here for reference;it’s useful to remember this process as you work on advanced configuration situationssuch as Kickstart files, which are described in Chapter 5

The first screen, as shown in Figure 3-14, welcomes you to the installation of RedHat Linux If you selected the standard installation option, a graphical screen withsimilar content is shown In most cases, you can click OK or Next or press theF12

key to continue to the next screen

Trang 29

The Installation Process 123

Red Hat Linux tries to detect some of your hardware automatically If successful,

it may skip the associated configuration step So do not be surprised if your installationvaries somewhat from what you see here

The next screen, as shown in Figure 3-15, allows you to select a language duringthe installation process

The Keyboard Configuration screen shown in Figure 3-16 allows you to select from

a variety of different keyboards in different language configurations After Linux is

installed, you can use the redhat-config-keyboard utility to enable special characters

such as an é with “dead keys.”

You can always reconfigure your keyboard after Linux is installed with the config-keyboard utility

redhat-The Mouse Configuration screen shown in Figure 3-17 allows you to select fromseveral different types of pointing devices As you can see in the figure, the Red Hatinstallation program can also help you set up many different types of USB mice

If your mouse has only two buttons, you may wish to select the Emulate 3 Buttonsoption With this option, if you click both left and right mouse buttons simultaneously,Linux interprets the action as a middle mouse button entry If you have a scrollingwheel, try pressing it down If it clicks, Linux may recognize it as a middle mousebutton

You can always reconfigure your mouse after installation with the

redhat-config-mouse utility.

FIGURE 3-15

Selecting

a language

Trang 30

124 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

The Install Options screen shown in Figure 3-18 should already be familiar Sinceyou are supposed to be an expert in Red Hat Linux, we’ll proceed with the mostdifficult of the options, that of Custom installation

Trang 31

The Installation Process 125

Server or Custom installations by default delete all data on all detected drives, including those that might contain another operating system such as Microsoft Windows Workstation or Personal Desktop installations delete all data on all detected Linux partitions While the Upgrade option isn’t supposed to delete any critical data, the effects of upgrades on specific packages can be difficult

to predict Before you continue, make sure you’ve backed up any critical data

on your system.

Three options are shown in Figure 3-19 for setting up your hard disks Red Hatincludes a default partition setup for each of the installation options Alternatively,you can set up partitions manually with fdisk or Disk Druid The fdisk option isdescribed in more detail later in this chapter For now, select automatic partitioning;you can change the partitions in the following step

The installation screens are evolving I anticipate that there will be a review optionavailable in Figure 3-20 as soon as the final release of Red Hat Linux 8.0 If available,select it for the purpose of this section This allows the Red Hat installation program

to create default partitions and then allow you to change them as needed

Disk Druid makes it easy to specify all you need about each partition Select aspecific partition and click Edit As shown in Figure 3-21, one screen allows you to edit

FIGURE 3-18

Installation

options

Trang 32

126 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

the directory to be mounted (Mount Point), the filesystem format (ext3), the drivesused (Allowable Drives), the default size of the partition, and Additional Size Optionsfor any leftover hard disk space If this partition includes the /boot directory, you shouldforce it to be a primary partition Make sure it’s installed below cylinder 1024 And

at least the first time you set up Linux, you should make the installation program checkfor bad blocks on all partitions

Trang 33

The Installation Process 127

If you use Disk Druid to create your partitions, the last partition can be tricky.

If you try to configure the last partition with the exact amount of free space

in MB, Disk Druid might add a cylinder and think you’re trying to use more space than is available The Fill to Maximum Allowable Size option shown

in Figure 3-21 can help you get around this issue.

FIGURE 3-21

Add Partition

screen

RAID from Disk Druid

Disk Druid can help you configure RAID

partitions Depending on the type, RAID

requires two or more partitions Create the

RAID partitions that you need Make sure

the “File System type” shown in Figure 3-21

is “Software RAID.” Once you have individual

RAID partitions, click the Make RAID button

Disk Druid brings up a menu that allows you

to format your RAID system to the ext2, ext3,

Linux swap, or VFAT filesystems It also allowsyou to configure your partitions to RAID 0,RAID 1, or RAID 5

The Red Hat Linux Installation programprovides a number of user-friendly tools forconfiguration The more that you can configureduring the installation process, the easier yourtasks are after installation is complete

FROM THE CLASSROOM

Trang 34

As of this writing, I anticipate that Red Hat will incorporate LVM configuration capabilities into Disk Druid for the final release of Red Hat Linux 8.0 For more information on LVM, see Chapter 5.

Now you can select a boot loader, as shown in Figure 3-22 The new Red Hatdefault boot loader is known as GRUB, which is short for the GRand Unified BootLoader The old standard is LILO, short for the Linux Loader Both boot loaders caneasily be configured to boot both Linux and Microsoft Windows–based operatingsystems, as discussed in Chapter 5

As shown in Figure 3-23, you can set up Kernel Parameters to help Linux recognizememory or specific hardware What you enter depends on your boot loader; someexamples are described later in this chapter

If you select GRUB as a boot loader, you can set up a password so that individualusers aren’t able to pass options to the kernel that might compromise security This isshown in Figure 3-24

Finally, if you have more than one operating system (OS), you can specify the default,

as well as the label associated with each OS This is shown in Figure 3-25

Figure 3-26 illustrates your choices on where to install GRUB or LILO If you’regoing to use GRUB or LILO to boot Linux and possibly other operating systems, install

it on the Master Boot Record of the hard disk If you’re using another boot loader

Trang 35

such as Windows’ NTLDR or a third-party manager such as System Commander,install it on the first sector of the partition with the /boot directory.

Next, you can set up the Network Configuration for your computer as shown inFigure 3-27 If you have a DHCP server on your LAN (or access to DHCP on another

The Installation Process 129

Trang 36

LAN via the bootp protocol), your Red Hat Linux installation can automatically getthe necessary TCP/IP configuration information Alternatively, if you have a static

IP address, you can enter that information here as well

It’s easy to change the network configuration after Red Hat Linux is installed Justuse a tool such as /sbin/ifconfig or redhat-config-network as described in Chapter 4

Trang 37

Now you can set up a firewall on this computer It’s a good idea especially if thiscomputer is going to be connected to an outside network such as the Internet Thereare three basic firewall configurations available: High, Medium, or None, as shown

Trang 38

For the purpose of this exercise, select High or Medium, then click Customize Thisbrings you to the Firewall Configuration - Customize screen shown in Figure 3-29.

If Red Hat Linux has detected more than one network adapter on your computer,you’ll see more than one entry in the trusted devices list Normally, you’d set up afirewall on a network device that’s connected to the Internet, and mark the adapterthat’s connected to your internal LAN as a “Trusted Device.”

The firewall tool you see here is based on the /usr/sbin/lokkit utility, which youcan call up to revise your firewall at any time At the time of this writing, lokkit hasjust been converted to use iptables to secure your network

If you’re planning to use a DHCP server from an external network, you’ll need toselect DHCP in the Allow Incoming list This lets in DHCP configuration informationfor your computers from outside your network

Once you’ve completed the firewall configuration, you’re ready for the next step

Select the language or languages you want to install on your system, as shown inFigure 3-30 You’ll still need to activate the language in the GUI of your choice

Next, you can select your time zone, as shown in Figure 3-31 The list is long andextensive If Linux is the only operating system on your computer, select “Hardwareclock set to GMT” This allows the Linux time configuration tools to change your clocksfor Daylight Saving Time However, if you’re dual-booting with another operatingsystem such as Microsoft Windows, this option would affect the other operating system’sclock settings

Trang 39

The Installation Process 133

In the Root Password screen shown in Figure 3-32, you’re required to pick a rootpassword You need to type the password twice to make sure you get the root passwordcorrect However, if you forget the root password, there are ways to reset it, as discussed

in later chapters The Red Hat Linux installation program does not allow you to proceeduntil you select a root password

Trang 40

134 Chapter 3: Installation

CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3

In the Add User screen shown in Figure 3-33, you can add other user accounts

The User Name and Password is what the user would type in to log into the account

The Full Name can be any name of your choice If you add a user, you’re taken to

a screen where you can add more users However, you’re not required to add any users Ifyou prefer, just pressF12or click OK to continue Refer to Chapter 4 for other tools tocreate new users, as well as the importance of strong passwords

Ngày đăng: 21/12/2013, 11:15

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN