Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Step-by-Step Installation

This section provides a basic step-by-step installation of Red Hat Linux from CD-ROM. There are many different ways to proceed with an install, and the Red Hat Linux installer can provide a graphical or text-based interface in a variety of modes.

This example installation prepares a computer for general duties as a server, perhaps to host a File Transfer Protocol (FTP) site, a Web server using Apache, or Session Message Block (SMB) services using Samba.

Before you begin, you should ensure that your computer is not connected to the Internet. Although you can use the Red Hat installer to set up network protection during the install, it is best to check your system settings after any install and before opening up any public services (see the section "Firewall and Security Configuration" later in this chapter).

NOTE

See Chapter 18 for details on how to configure an FTP server. Chapter 16 provides information on how to set up and configure Apache for Web service. See Chapter 13 for Samba settings. Note that you can have your server perform all three duties.

NOTE

Red Hat's graphical installation dialogs are convenient and easy to use. However, a text-based installation is outlined here as it should work with any PC, and it can be used as a starting point for learning more about installing Red Hat Linux.

Starting the Install

To get started, insert the first Red Hat Linux CD-ROM and reboot your computer. You'll first see a boot screen that offers a variety of options for booting (see Figure 3.1). These options are

  • <ENTER>—Start the install using a graphical interface. The graphical interface supports a mouse and offers check boxes and text fields for choosing software, configuring options, and entering information.

  • linux text—Start the install using a graphical text interface. (This is the choice we will use here.)

To install Red Hat using a text-based interface (used for our example), type linux text and press Enter.

Figure 3.1Figure 3.1 Select a type of installation when first installing Red Hat Linux.

Several function keys can be used to cycle through four help screens with additional install information. Use these function keys at the boot prompt to jump to different screens describing alternative installation options and modes:

  • Pressing F1 returns to the initial boot screen.

  • Pressing F3 gives general installation information (described next in this chapter).

  • Pressing F4 describes how to pass kernel video arguments, useful for configuring video hardware to support a graphical install at a specific resolution (such as 800-by-600 pixels).

  • Pressing F5 describes Red Hat's rescue mode.

The F3 screen lists a number of options you can use at the boot prompt, such as

  • linux noprobe—Disable probing of the system's hardware.

  • linux mediacheck—Verify the integrity of one or more Red Hat Linux install CD-ROMs.

  • linux rescue—Boot to single-user mode with a root operator prompt, disabling X, multitasking, and networking; this option can be used if you need to reconfigure your Red Hat boot loader or to rescue data from your system.

  • linux dd—Use a driver disk (a floppy image) and possibly one or more kernel arguments (such as linux mem=512M expert) to enable certain types of hardware, such as networking cards.

  • linux askmethod—Prompt for the type of install to perform, such as over a network.

  • linux updates—Start an installation update.

  • linux lowres—Install using a graphical display of 640-by-480 pixels, which can be helpful if your PC has an older or less capable display monitor.

The F4 screen lists options that can be used at the boot prompt to set a specific resolution for the installation. For example, this is done by typing linux resolution= at the boot prompt, along with an option such as "800x600".

TIP

The Red Hat installer will start automatically. Press the spacebar if you need to halt the install.

After you type linux text and press Enter, the installer's kernel loads, and you're asked if you would like to perform a media check of your CD-ROM, as shown in Figure 3.2.

Figure 3.2Figure 3.2 You can check your CD-ROM media before installing Red Hat Linux.

This check can take quite some time, but can ensure the integrity of the CD-ROM's contents because Red Hat embeds an md5sum value on each CD-ROM. This check can help foil installation of malicious software from CD-ROMs with tampered contents. The check can also be helpful to make sure that the CD-ROM you are using will work on your PC and in your CD drive. To perform the check, choose OK; otherwise, use the Tab key to navigate to the Skip button and press Enter to choose it.

After checking your CD-ROM or skipping the check, you are presented with a welcome screen. Press Enter to continue, and the installer asks you to select a language for the installation, as shown in Figure 3.3.

Figure 3.3Figure 3.3 Select a language to use when installing Red Hat Linux.

Navigate the installation dialog boxes using the Tab key. You can scroll through lists using your cursor keys. Scroll to highlight a language; then use the Tab key to highlight the OK button and press Enter. You'll then be asked to select a keyboard for the install, as shown in Figure 3.4.

Figure 3.4Figure 3.4 Select a default keyboard to use when installing and using Red Hat Linux.

Scroll to the appropriate keyboard option (which can be used to configure Red Hat to support a specific language); then use the Tab key to highlight the OK button and press Enter. You're next asked to select a pointing device (your mouse), as shown in Figure 3.5.

Figure 3.5Figure 3.5 Select a pointing device to use when installing and using Red Hat Linux.

Select the mouse type you plan to use for Red Hat Linux sessions. Note that Red Hat Linux supports USB devices, including USB mice.

Highlight OK to continue, and press Enter. You're then asked to select a type of installation, as shown in Figure 3.6.

TIP

If you select a two-button mouse from the list during installation, notice that three-button emulation is automatically selected. This emulation enables a middle-mouse button to be simulated when both the left and right mouse buttons are pressed simultaneously. Use of the middle (or 2) button is important for certain actions, such as pasting text.

Figure 3.6Figure 3.6 Select a type of Red Hat Linux installation.

Select a type of installation using your cursor keys and the Tab key (refer back to "Choose an Installation Type," if necessary, for information on making this choice).

NOTE

Red Hat Linux also supports the ability to monitor background and install processes running during an installation. You can watch the progress of an install by navigating to a different console display or virtual console by simultaneously pressing the Ctrl, Alt, and appropriate Fn key (such as F1 through F5).

Use this approach to watch for kernel messages, monitor hardware detection, gain access to a single-user shell, and view the progress of the installer script.

When using a graphical installer, press Ctrl+Alt+F4 (then Alt+F2 or Alt+F3) to navigate to the various screens. Press Alt+F7 to jump back to the installer. When performing a text-based installation, use Alt+F2 (then Alt+F3 or Alt+F4). Use Alt+F1 to jump back to a text-based install.

In this example, select a Server install and press Enter to continue. You'll then see a screen, as shown in Figure 3.7, which offers a choice of partitioning schemes and tools.

Figure 3.7Figure 3.7 Select a partitioning scheme or tool.

Partitioning Your Drive

You learned how to choose and plan a partitioning scheme in "Planning Partition Strategies," earlier in this chapter, based on the more specific partitioning information offered in Chapter 2. Here is what the options in the Disk Partitioning Setup screen do:

  • Using the Autopartition button will conveniently partition your hard drive according to the type of installation you selected and configure the partitions for use with Linux.

  • Choosing the Disk Druid button launches a graphical partition editor that enables the creation of custom partition schemes.

  • Choosing the fdisk button launches the Linux fdisk utility for the ultimate flexibility in partitioning your disk; but this utility also involves more complex options. The fdisk command offers the ability to create (not format) nearly 60 different types of partitions, but has a text-based, command line–like interface. See the section "Partitioning Before and During Installation" in Chapter 2. Chapter 10 contains information on using the Linux fdisk utility.

For this example, highlight the Disk Druid button and press Enter. If you are using a new hard drive that hasn't previously been partitioned, you'll be asked if you would like to create new partitions on the drive. Click the Yes button to initialize the drive. If you are using a hard drive that has been previously partitioned or formatted and the partitions are recognized, Disk Druid will present the partitions in its partition dialog. Figure 3.8 shows the graphical interface presented for a 6GB hard drive that hasn't been partitioned.

Figure 3.8Figure 3.8 You can use Disk Druid to partition your drive before installing Red Hat Linux.

To use Disk Druid, select any listed free space, and then press the New button (or press F2) to create a new partition. Alternatively,

  • To get help, press F1.

  • To create free space, scroll to an existing partition and use the Delete button to delete the partition.

After you choose the New button, you see a dialog box as shown in Figure 3.9.

Figure 3.9Figure 3.9 Set partition information about a selected or new partition on a hard drive.

You use the Add Partition dialog box to assign a mount point (such as /boot or /), assign a filesystem (such as ext2, ext3, RAID, swap, or vfat), assign the size of the partition, and assign a filesystem check. Remember that, at a minimum, your Red Hat system should have a root (/) and swap partition. The ext3 filesystem is the best choice for your Linux partitions because it is the default for Red Hat, but you can also use ext2 (and convert to ext3 later on—see Chapter 10). The size of the partition can be fixed by entering a number (in megabytes), or if you press the spacebar when selecting the Fill All Available Space field, will use all remaining free space.

Use the Check for Bad Blocks item to verify low-level formatting and to check the integrity of your hard drive. (This will take a long time on a hard drive with a capacity larger than 10GB.) You can also check your hard drive after installing Red Hat by using various Linux software tools, as shown in Chapter 10. Use the OK button when finished.

Remember: Red Hat Linux requires at least a root (/) and swap partition. The swap partition should be at least twice as large as the amount of installed memory in order to assure system performance if you run a lot of programs or host many users. Figure 3.10 shows a simple, completed partitioning scheme with a separate /home partition on a server using a 6GB hard drive.

Figure 3.10Figure 3.10 Review your partitioning scheme for your hard drive.

Take a moment to review your partitioning scheme. If you are not satisfied with the partitioning, you can make changes by selecting a partition and then using the Edit button to change the partition's information (such as mount point or type of filesystem). Use the Delete button to delete the partition entry and to free up partition space. You can then use the New button again to create partitions in the space that is now free. When satisfied, use the OK button to continue the install.

Choosing, Configuring, and Installing the Boot Loader

After you choose OK to accept the partitioning scheme, a screen appears asking you to select a boot loader for booting Red Hat Linux (see Figure 3.11). This screen also enables you to choose not to use a boot loader (when booting from floppy, a commercial boot utility, a DOS partition, or over a network). Review "Choosing a Boot Loader," shown previously in this chapter, for more information on making this choice.

Figure 3.11Figure 3.11 Select whether you want to use a boot loader, and if so, which type.

Select the desired boot loader (we'll use GRUB for our install here), and then use the OK button.

You're asked if you'd like to pass any kernel arguments before booting Linux (as shown in Figure 3.12). Kernel arguments are used to enable or disable various features of Linux at boot time. If you install the source to the Red Hat Linux kernel, you'll find documentation about the more than 200 different kernel arguments in the file kernel-parameters.txt under the /usr/src/linux-2.4/Documentation directory.

Figure 3.12Figure 3.12 Enter any desired kernel arguments to be passed by the boot loader.

Enter the arguments in the dialog box or use the OK button to continue. Note that if the Red Hat installer detects a CDRW (Read/Write) drive, you might see a Linux kernel argument such as hdc=ide-scsi implemented to support the use of the drive under SCSI emulation. This emulation is used to support CD write and erase operation while using Linux. See Chapter 4, "Post-Installation Configuration," to see how to install, configure, and use CDRW drives with Red Hat.

NOTE

You can also use the hdc=ide-scsi kernel argument later on after installing Red Hat Linux by editing the LILO or GRUB configuration files. See Chapter 24 for details. Editing these files can be dangerous, though, so be sure to read all the information (and warnings) in Chapter 24.

Highlight the OK button and press Enter to see the screen shown in Figure 3.13. Here, you're asked if you'd like to use a preboot password. If you choose to use this option, you will need to enter a password at the GRUB boot screen (see the section "Login and Shutdown" at the end of this chapter for information on graphical logins). Carefully note the password! It does not have to be the same password used to log in to Red Hat, but if you password protect booting through your computer's BIOS and use a boot loader password here, you will subsequently need to enter three passwords (BIOS, boot loader, and login) in order to access Red Hat Linux. Type in a password of at least eight characters twice (once on each line); then highlight the OK button and press Enter.

Figure 3.13Figure 3.13 You may enter a boot loader password.

You can now graphically edit the loader's configuration file, as shown in Figure 3.14, to add or remove choices of booting other operating systems. The default (and only) operating system to boot should be Red Hat Linux if you have wiped your internal hard drive, as shown in the figure. However, you can configure a dual-boot system during the install or later on when using Red Hat Linux to support booting another installed operating system residing on a different partition. Use the OK button to continue and install the boot loader.

Figure 3.14Figure 3.14 Configure and select which operating system is to be booted by default.

You're next asked where you want to install the boot loader, as shown in Figure 3.15.

Figure 3.15Figure 3.15 Select where you'd like to install the boot loader.

GRUB and LILO are typically installed in the MBR of the first IDE hard drive in a PC. However, the boot loader can also be installed in the first sector of the Linux boot partition, or even not installed on the hard drive (in which case, you'll need to create a boot floppy during the install; see "Create a Boot Disk," later in this chapter). Note that you can also backtrack through the install process to change any settings. Select a location and use the OK button to continue.

Network Configuration

If you have an installed network adapter, you are asked for network configuration details, as shown in Figure 3.16.

Figure 3.16Figure 3.16 Select or enter networking configuration information.

Red Hat Linux can be set to automatically configure networking upon booting. Note that you can also configure networking following installation using Red Hat's redhat-config-network graphical network administration tool (see Chapter 13 for details about using these tools).

NOTE

If Red Hat Linux finds more than one network interface installed on your computer, you might be asked to configure a second Ethernet device. This might be the case, for example, if you are installing Red Hat on a computer that will serve as a gateway or firewall. If you configure more than one Ethernet device, the device named eth0 will be the first active interface when you start Red Hat.

After making your selection, press Enter and you can then type in your system's hostname, such as lucky, as shown in Figure 3.17.

Figure 3.17Figure 3.17 Give your new Red Hat Linux system a hostname.

When finished, click the OK button, and you'll be asked to select a firewall configuration.

Firewall and Security Configuration

Figure 3.18 shows the Red Hat installer Firewall Configuration dialog, which offers an opportunity to set default security policies for the new server. Protecting your system using a firewall is especially important if your server is connected to a network (although it is best to first install Red Hat, set security policies, and then connect to a network). These settings in this installation screen determine how remote computers or users will be able to access your server. You can change these policies after finishing the install and logging in to Red Hat.

Figure 3.18Figure 3.18 Select a desired security level.

If you have a general idea of how you want to protect your computer, use the dialog box shown in Figure 3.18 to set a security level.

  • Choosing the No Firewall setting isn't recommended; use this setting only if Red Hat will be used as a non-networked workstation.

  • The Medium setting might be acceptable for use on an intranet protected by a firewall and served by an Internet gateway.

  • Definitely use a High security level if you plan to have your server attached directly to the Internet following the install.

NOTE

Note that you can also manually configure security settings after installing Red Hat Linux using the text-based lokkit command, redhat-config-securitylevel client, or graphical gnome-lokkit client. See Chapter 13 for details on how to protect your Red Hat system using these clients and various security level settings.

Use the Customize button to configure allowable services, as shown in Figure 3.19.

Figure 3.19Figure 3.19 Select a trusted interface and allowable incoming service requests for your custom security setting.

The settings in this dialog box should be used to select a trusted (Ethernet device connected to your Local Area Network, or LAN, and not to the Internet) networking device. You can also set allowable incoming service requests. This is important if your server is connected to a network and you want to allow requests immediately following installation and the start of Red Hat Linux.

For some servers, HTTP, FTP, and Simple Mail Transport Protocol (SMTP) requests are acceptable and reasonable. Do not select or use the Telnet service, which is used to allow remote network logins. For security reasons, the Secure SHell (SSH) service is a much better choice (see Chapter 5 on how to use the ssh client).

Use the OK button when you have finished selecting services, and then OK again to install the firewall security settings. You'll then be asked to select additional language support on your server. Again use the OK button when finished. You'll then see a Time Zone Selection dialog box, as shown in Figure 3.20.

Figure 3.20Figure 3.20 Select your time zone.

There are two "clocks," or times, when using a PC: the hardware clock, maintained by chips in the computer and a backup battery; and the system time, set upon booting and used by the Linux kernel. It is important to keep the two times accurate and in synchronization because automated system administration might need to take place at critical times. Many computer installations use computers with hardware clocks set to GMT, which stands for Greenwich Mean Time. (The correct designation is UTC or Coordinated Universal Time.) The Linux system time is then set relative to this time and the default time zone, such as Eastern Standard Time, which is –5 hours of UTC.

Setting the computer's hardware clock to UTC (GMT) has the advantage of allowing the Linux system time to be easily set relative to the geographic position of the computer and resident time zone (such as a Linux laptop user who would like to create files or send electronic mail with correct time stamps, and who has traveled from New York to Tokyo). See Chapter 4 for details on setting the date and time for Red Hat Linux.

TIP

Read the manual page for the hwclock command to learn how to keep a running Linux system synchronized with a PC's hardware clock. See Chapter 4 for more details on using the hwclock command and Linux time-related software.

Choose your time configuration, and then press the OK button.

Creating a Root Password and User Accounts

You're next asked to enter a root operator password, as shown in Figure 3.21. Type in a password, press Enter, and then type it again to make sure that it is verified. The password, which is case sensitive, should be at least eight characters (or more) and consist of letters and numbers. Note that the password isn't echoed back to the display. Your root password is important because you will need it to perform any system administration or user management with Red Hat Linux.

CAUTION

Don't forget your system's BIOS, boot loader, or root passwords! Some equipment, such as notebook computers, might require factory replacement of motherboard components if the owner forgets the BIOS password. The BIOS settings on most desktop PCs can usually be reset via a jumper or removal and insertion of the motherboard battery. If you forget your boot loader password, use a bootdisk (perhaps created during installation as shown later on in this chapter) or boot to a rescue mode using your first Red Hat Linux CD-ROM and reset the root password using the passwd command.

Figure 3.21Figure 3.21 Type in, and don't forget, your root password for Red Hat Linux.

When finished, use the OK button to continue. If you are performing a graphical install of Red Hat Linux, you will then have the opportunity to create normal user accounts. You can only create a root account during a text-based install, and will have to create user accounts later on after booting, as shown in Figure 3.22.

Figure 3.22 shows the redhat-config-users client being used to create a new user account. Create an account for yourself and any additional users. Users are commonly assigned a username, traditionally consisting of the first letter of a person's first name and the last name. For example, Cathy Taulbee would have a username of ctaulbee. Don't forget to enter a password for any new user! If you create a user without a creating a password, the new user will not be able to log in. See Chapter 9, "Managing Users," for details on managing users with Red Hat Linux.

Figure 3.22Figure 3.22 Create a user account for use with Red Hat Linux.

You should create at least one user for your server besides the root operator. This is for a security purposes and to avoid logging in as root, either through the keyboard at the server or remotely over the network.

The default shell and home directory settings should remain set at the defaults, which are the Bourne Again SHell (bash), and the /home directory. You can read more about these defaults in Chapter 9.

NOTE

See Chapter 5 for how to become the root operator or run root commands as a regular user. Chapter 9 contains details about Linux user management.

When finished, use the OK button to continue. You can then add additional users if you created a user for your system, or use the OK button to continue the install. After you have entered the root password, or if using a graphical install, have finished creating users, use the OK button to continue to install.

Software Selection and Installation

The Package Group Selection dialog box shown in Figure 3.23 displays Red Hat's ideas about the ideal selection of software to be installed for your class of installation (a server in our example).

Figure 3.23Figure 3.23 Select software package groups for installation.

If you choose to install a personal desktop, workstation, or other installation type, the software packages appropriate for that installation will be selected. Each package (actually a Group) provides many different individual software packages (refer to "Choosing Software Installation Options," earlier in the chapter).

Scroll through the list of package groups, and then highlight a software package and press the spacebar to select or deselect software to be installed. Note that the entire size (drive space requirements) of the installed software will be dynamically reflected by your choices.

Use the Select Individual Packages item to choose individual software packages. This can allow fine-tuning of the software installation to only install desired commands or clients and to prune unwanted software. Use the OK button when finished.

Red Hat will then perform a quick dependency check and present a dialog box informing you that a log of the install will be saved under the /root directory in the file named install.log. Press the Enter key to begin installation of the software on your system. The Red Hat installer will then format and prepare your new Linux partitions.

Next, the installer will prepare for the install by gathering a list of the RPM files and will start placing the software on the newly formatted partitions. This process can take anywhere from several minutes to two or more hours, depending on your PC and the amount of software you have chosen to be installed. The installer reports on the name of the current package being installed, the total number of packages, time remaining for the installation, and number of completed and remaining packages.

If you are installing over a network, go take a break because the install will proceed unattended through the software installation. If you are using this book's CD-ROMs, you will be prompted to remove the first CD-ROM and insert the second. You might also be asked to repeat this operation using the third CD-ROM at some point.

Create a Bootdisk

When the software installation finishes, the installer will perform some temporary file cleanup, install the boot loader, and then ask if you'd like to create a boot diskette for possible use later on, as shown in Figure 3.24.

Figure 3.24Figure 3.24 Create a boot disk for use with Red Hat Linux.

You can create this boot disk now, or as mentioned earlier you can use Red Hat's mkbootdisk command later on while using Red Hat Linux. Select Yes or No. Having a boot disk can be handy, especially if an error was made during the install and the boot loader fails to boot Linux.

If you choose to create a boot disk, you'll need to have a blank diskette on hand. Select Yes, insert a blank diskette when prompted, create the boot disk, and continue the install.

Configuring a Graphical Desktop

If you select the X Window System for installation (not really needed for server operations, but essential for a productive desktop), you're next asked to configure X to work with your PC's video card and monitor, as shown in Figure 3.25. Note that you can skip this configuration and configure a desktop for Red Hat later on. See Chapter 6 for details on configuring X to work with your PC.

Figure 3.25Figure 3.25 Use this screen to configure your video card for use with X11.

Again, note that you won't be asked to select a video card if you don't install the X software. The Red Hat installer will automatically probe your system's graphics card and monitor for hardware configuration information unless you use the linux noprobe installation boot option.

TIP

You can skip X configuration and configure X after installation. This might be a better approach if the install fails to accurately probe your hardware or cannot configure X during the install, but you still desire to have X software installed. See Chapter 6 for details on configuring X to work with your PC's graphics card.

If necessary, use the Tab key to highlight a <change> button and press Enter to either select a different video card or set the amount of video RAM available on your card. If you choose to change the video card, you'll see a list of cards as shown in Figure 3.26.

Figure 3.26Figure 3.26 Choose a different video card if necessary when configuring X during the install.

Use the OK button when finished. You'll then be asked to select a monitor if the installer has not detected or recognized your display. You can again use the Change button to select custom settings if desired. Figure 3.27 shows a monitor selection dialog that you can use to change the default monitor or enter custom horizontal and vertical frequency ranges for your display. See Chapter 6 for more information about configuring the Red Hat graphical desktop.

Figure 3.27Figure 3.27 Select a monitor or change settings, such as monitor type or frequency ranges, if necessary when configuring X during the install.

You'll then be asked to select a default color depth, or number of colors to use for the graphical desktop, as well as a resolution in horizontal and vertical pixels. The recommended default is 1024x768 using High Color (16 bit, which provides thousands of colors). Many newer video cards and larger monitors offer greater color depth and resolutions, and the aim here is to configure a working display using the maximum capabilities of your equipment. Again, note that this aim is only valid for personal desktop or workstations. Server operations won't benefit from any installed high-end video equipment.

You can choose to test your settings by using the Test button. If you are sure that your settings are correct and will work correctly after the install, choose the graphical login option. If not, choose the text-based login setting, which is a safer approach because you can always set Red Hat to boot to a graphical login later on. When finished, use the OK button.

Finishing the Install

You're done! Press the OK button, and Red Hat Linux will eject any inserted CD-ROM and reboot. The GRUB boot loader will present a graphical boot prompt as shown in Figure 3.28. The LILO bootloader also provides a graphical display.

Figure 3.28Figure 3.28 Boot Red Hat Linux with GRUB by pressing the Enter key or waiting five seconds.

If you have set a GRUB password, press the p key, type your password, and press Enter. If you do nothing for five seconds or press Enter, either boot loader will boot Red Hat Linux.

  • + Share This
  • 🔖 Save To Your Account