intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Red Hat Linux 7.2 Bible P2

Chia sẻ: Tuyen Thon | Ngày: | Loại File: PDF | Số trang:20

90
lượt xem
5
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

I would be remiss to not say something about the culture of free software development from which Linux has thrived and will continue to thrive. The copyright for Red Hat Linux is covered under the GNU public license. That license, which most free software falls under, provides the following:

Chủ đề:
Lưu

Nội dung Text: Red Hat Linux 7.2 Bible P2

  1. w3m — Contains the w3m utility for browsing the Web in text mode. • webalizer — Contains webalizer for analyzing Web server log files. • xawtv — Contains the xawtv command that allows you to watch TV on your computer screen. There are other new packages in Red Hat Linux 7.2 as well. For a more complete list, see Appendix B, “Red Hat Linux RPMs.” The Culture of Free Software I would be remiss to not say something about the culture of free software development from which Linux has thrived and will continue to thrive. The copyright for Red Hat Linux is covered under the GNU public license. That license, which most free software falls under, provides the following: • Author rights — The original author retains the rights to his or her software. • Free distribution — People can use the GNU software in their own software, changing and redistributing it as they please. They do, however, have to include the source code with their distribution (or make it easily available). • Copyright maintained — Even if you were to repackage and resell the software, the original GNU agreement must be maintained with the software. This means that all future recipients of the software must have the opportunity to change the source code, just as you did. It is important to remember that there is no warranty on GNU software. If something goes wrong, the original developer of the software has no obligation to fix the problem. However, the Linux culture has provided resources for that event. Experts on the Internet can help you iron out your problems, or you can access one of the many Linux newsgroups to read how others have dealt with their problems and to post your own questions about how to fix yours. Chances are that someone will know what to do — maybe even going so far as to provide the software or configuration file you need. Note The GNU project uses the term free software to describe the software that is covered by the GNU license. On occasion, you may see the term open source software being used to describe software. Though source code availability is part of the GNU license, the GNU project claims that software defined as open source is not the same as free software because it can encompass semi−free programs and even some proprietary programs. See http://www.opensource.org/ for a description of open source software. Summary Linux is a free computer operating system that was created by Linus Torvalds in 1991 and that has grown from contributions from software developers all over the world. Red Hat Linux is a distribution of Linux that packages together the software needed to run Linux and makes it easier to install and run. Features in Red Hat Linux include a simplified installation procedure, Red Hat Package Management (RPM) tools for managing the software, and easy−to−use Gnome and KDE desktop environments. You can get Red Hat Linux from the Internet, from distributions that come with books such as this one, or from a commercially
  2. available boxed set of Red Hat Linux software. Linux is based on a culture of free exchange of software. Linux’s roots are based in the UNIX operating system. UNIX provided most of the framework that was used to create Linux. That framework came in the form of the POSIX standard, which defined the interfaces a UNIX system needs to support in order to be a UNIX system.
  3. Chapter 2: Installing Red Hat Linux A simplified installation procedure is one of the best reasons for using a Linux distribution such as Red Hat Linux. In many cases, for a computer dedicated to using Linux, you can just pop in the Red Hat Linux CDs (that come with this book), choose from several preset configurations, and be up and running Linux in less than an hour. If you want to share your computer with both Linux and Microsoft Windows, Red Hat offers several ways to go about doing that. If your computer doesn't have a CD drive, Network and Hard Disk installs are available. To preconfigure Red Hat Linux to install on multiple, similar computers, you can use the Kickstart installation. Quick Installation It can be a little intimidating to see a thick chapter on installation. But the truth is, if you have a little bit of experience with computers and a computer with common hardware, you can probably install Red Hat Linux pretty easily. The procedure in this section will get you going quickly if you have: • The Red Hat Linux Installation CDs that come with this book. • A PC with a built−in, bootable CD−ROM drive, at least 32MB of RAM, at least 350MB of free hard disk space for a minimal custom install, at least 1.5GB of free space for a workstation install, and at least 1GB for a server install. For this quick procedure, you must either be dedicating your entire hard disk to Linux, have a preconfigured Linux partition, or have free space on your hard disk outside any existing Windows partition. Caution If you are not dedicating your whole hard disk to Red Hat Linux and you don't understand partitioning, skip to the “Detailed Installation Instructions” section in this chapter. That section describes choices for having both Linux and Windows on the same computer. Here's how you get started: 1. Insert the first Red Hat Linux installation CD into your computer's CD−ROM drive. 2. Reboot your computer. 3. When you see the Welcome screen, press Enter to begin the installation. During installation, you are asked questions about your computer hardware and the network connections. After you have completed each answer, click Next. The following list describes the information you will need to enter. (If you need help, all of these topics are explained later in this chapter.) • Language — Choose your language. • Keyboard — Choose your keyboard type. •
  4. Mouse — Identify the type of mouse you are using. • Install type — Choose a configuration, such as Workstation (adds Linux and leaves Windows partitions), Server (adds Linux server packages and erases entire disk), Laptop (ensures that special laptop packages, such as PCMCIA and power management support, are included), or Custom (adds selected Linux packages and lets you choose partitioning). If you have an earlier version of Red Hat Linux installed, you can choose Upgrade to upgrade your system (hopefully) without losing data files. • Partitions — Either have Red Hat choose your partitions or customize your own (with Disk Druid or fdisk). You must have at least one Linux partition, which must be assigned to root (/), and a swap partition. You may be asked to format that partition. (Because repartitioning can result in lost data, I recommend that you refer to descriptions on repartitioning your hard disk later in this chapter.) • GRUB — Add the GRUB boot manager to control the boot process. (GRUB is described later in this chapter.) • Network configuration — Set up your LAN connection. Information includes your computer's IP address, netmask, network number, broadcast address, host name, default gateway, and DNS servers. You can also indicate whether to activate your network when Linux boots. • Firewall — Choose a default firewall configuration. Select High if you plan to connect to the Internet but don't plan to use Linux as a server. Choose Custom if you want to make particular services available to the network. Select No Firewall only if you are connected to a trusted network, with no connection to a public network. You can also customize the firewall to allow selected interfaces or services. • Language support — Choose to install support for additional languages. • Time zone — Identify the time zone in which you are located. • User accounts — Add the root user account password and add at least one regular user. • Authentication — Choose whether to use encrypted or shadow passwords. You can instead choose to use a network−based authentication scheme, including the following: NIS, LDAP, or Kerberos. (These methods require special configuration.) • Packages — For custom installations, choose groups of software packages to install. (You can also choose individual packages, if you like.) • Video — Identify your video card. •
  5. Installing packages — Up to this point, you can quit the installation process without having written anything to hard disk. After you select Next, the packages you selected are installed. • Boot disk — Create a boot disk (optional). • Monitor — Identify your monitor by selecting the vendor and model. • Custom X Configuration — Indicate the color depth and screen. You can also choose your GUI environment (GNOME or KDE, if both are available) and whether you will see a graphical or text−based login prompt. During installation, you can choose to install software based on the type of system you want (workstation, laptop, or server) or to select package groups individually (custom). I installed all packages, which I recommend doing only if you are trying out Linux in a nonproduction environment and have the disk space. Caution If your computer is connected to the Internet, you should be more selective about which server packages you install because they can pose potential security risks. A misconfigured server can be like an open window to your computer. After answering the questions, the actual installation of packages takes between 20 and 40 minutes, depending on the number of packages and the speed of the computer hardware. The time will vary depending on your hardware. During this time, you may be asked to insert the other Red Hat installation CD. When installation is done, remove the Red Hat Linux CD and click Exit to reboot your computer. When you see the boot screen, use up and down arrows to select a partition. Linux should boot by default. After Linux boots, it presents you with a login prompt. If you need more information than this procedure provides, go to the detailed installation instructions just ahead. Detailed Installation Instructions This section provides more detail on installation. Besides expanding on the installation procedure, this section also provides information on different installation types and on choosing computer hardware. TipIf anything goes wrong during installation and you get stuck, go to the “Troubleshooting Your Installation” section later in this chapter. It will give you suggestions about how to solve common installation problems. Caution If you are installing a dual−boot system that includes a Windows operating system, try to install the Windows system first and the Red Hat Linux system later. Some Windows systems blow away the Master Boot Record (MBR), making the Red Hat Linux partition inaccessible. If, when installing Windows or Red Hat Linux, you find that the other operating system is no longer available on your boot screen, don't panic and don't immediately reinstall. You can usually recover from the problem by booting with the Red Hat Linux emergency boot disk, and then using either the grub−install or lilo commands to reinsert the proper MBR. If you are uncomfortable working in emergency mode, seek out an expert to help you. Choosing an installation method Red Hat Linux offers very flexible ways of installing the operating system. Of course, I recommend installing Red Hat Linux from the CDs that come with this book. However, if you don't have the Red Hat CDs or if you don't have a working CD−ROM drive, you can install Red Hat Linux from any of several different types of
  6. media. There are also several special types of installation. The installation types noted here are described fully in the “Special Installation Procedures” section. First you should determine if you are doing a new install or an upgrade. If you are upgrading an existing Red Hat Linux system to the latest version, the installation process will try to leave your data files and configuration file intact as much as possible. This type of installation takes longer than a new install. A new install will simply erase all data on the Linux partitions (or whole hard disk) that you choose. You can install Red Hat Linux from any of the locations described here. Each of the installation procedures from locations other than a CD requires a Red Hat Linux installation boot disk. (Creating an installation boot disk is described later.) • HTTP server — Lets you install from a Web page address. • FTP server — Lets you install from any FTP site. • NFS server — Allows you to install from any shared directory on another computer on your network using the Network File System (NFS) facility. • Hard disk — If you can place a copy of the Red Hat Linux distribution on your hard disk, you can install it from there. (Presumably, the distribution is on a hard disk partition to which you are not installing.) The following specialty installation type also may be of interest to you: • Kickstart installation — Lets you create a set of answers to the questions Red Hat Linux asks you during installation. This can be a timesaving method if you are installing Red Hat Linux on many computers with similar configurations. The Red Hat Installation Guide is available on the Red Hat Documentation CD. If you don't have Red Hat Linux installed yet, you can open this CD on any Windows computer you have available. The guide is in HTML format, so you can view it from your browser. Open the index−en.html file in the RH−DOCS directory to start from the table of contents for Installation and other guides. Another document you may find useful before installing is the Red Hat Linux Reference Guide (also listed on the index−en.html page). Choosing computer hardware This may not really be a choice. You may just have an old PC lying around that you want to try Red Hat Linux on. Or you may have a killer workstation with some extra disk space and want to try out Red Hat Linux on a separate partition. To install the PC version of Red Hat Linux successfully (that is, the version on the accompanying CD), there are a few things that the computer must have: • x86 processor — Your computer needs an Intel−compatible CPU. Unlike with some commercial operating systems, you don't need the latest Pentium processor to run Red Hat Linux (although it wouldn't hurt). Red Hat Linux can run on older processors. I've even seen the Intel 80386 on compatibility lists, although I haven't tried installing Red Hat Linux on a computer with that CPU. •
  7. Floppy disk drive or CD−ROM — You need to be able to boot up the installation process from either floppy disk or CD−ROM. If you don't have a CD−ROM drive, you need a LAN connection to install Red Hat Linux from a server on the network or figure out a way to copy the contents of the CD to a hard disk. • Hard disk — You need a hard disk, or a partition from a hard disk, that contains at least 350MB of hard−disk space for the most minimal custom install. (The actual amount of space you need varies depending on the installation type and packages you select. Workstation installs require 1.5GB, while an "Everything" install requires nearly 3GB.) • RAM — You should have at least 32MB of RAM to install Red Hat Linux. If you are running in graphical mode, you will probably want at least 64MB. • Keyboard and monitor — Although this seems obvious, the truth is that you only need a keyboard and monitor during installation. You can operate Red Hat Linux quite well over a LAN using either a shell interface from a network login or an X terminal. There are versions of Red Hat Linux that run on Alpha and Sparc workstations, instead of just on PCs. The CD that comes with this book and the installation procedures presented here, however, are specific to PCs. Most of the other software described in this book, however, will work the same in any of those hardware environments. Note The list of hardware supported by Red Hat Linux is available on the Internet at www.redhat.com/hardware. If your computer's CD−ROM device is connected to a PCMCIA port (such as those that come on laptop computers), you will need to install PCMCIA support during installation. PCMCIA support is available only on Intel−based computers. See the sidebar on installing Red Hat Linux on a laptop for further information. Installing Red Hat Linux on a Laptop If your laptop computer has a built−in CD−ROM drive, you can install from that drive without any special considerations. However, if your laptop doesn’t have a built−in CD−ROM drive, you probably need to install from a device that is connected to a PCMCIA slot on your laptop. PCMCIA slots let you connect a variety of devices to your laptop using credit−card−sized cards (sometimes called PC Cards). Linux supports hundreds of PCMCIA devices. You may use your laptop's PCMCIA slot to install Red Hat Linux from several different types of PCMCIA devices, including: • A CD−ROM drive • A LAN adapter If you would like to know which PCMCIA devices are supported in Linux, see the SUPPORTED.CARDS file (located in the /usr/share/doc/kernel−pcmcia−cs* directory). In any of these cases, you need the PCMCIA support disk to use the device as an installation medium. The section on creating install disks describes how to create these installation floppy disks.
  8. Beginning the installation If you feel you have chosen the right type of installation for your needs, you can begin the installation procedure. Throughout most of the procedure, you can click Back to make changes to earlier screens. However, once you are warned that packages are about to be written to hard disk, there's no turning back. Most items that you configure can be changed after Red Hat Linux is up and running. Caution It is quite possible that your entire hard disk is devoted to a Windows 95, 98, 2000, ME, NT, or XP operating system and you may want to keep much of that information after Red Hat Linux is installed. Workstation and Custom install classes let you retain existing partitions, but they don't let you take space from existing DOS partitions without destroying them. See the section on reclaiming free disk space called "Using the FIPS Utility" for information on how to assign your extra disk space to a different partition before you start this installation process. 1. Insert the CD−ROM in the CD−ROM drive. If you are doing an install from a local hard disk or network, you can insert an installation boot disk instead. Refer to the section on creating install disks for information on making the disk (or disks) that you need. 2. Start your computer. If you see the "Red Hat Linux Welcome" screen, continue to the next step. TipIf you don't see the Welcome screen, your CD−ROM drive may not be bootable. Creating a bootable floppy may be the best way to proceed. However, you also may have the choice of making your CD−ROM drive be bootable. Here's how: Restart the computer. Immediately, you should see a message telling you how to go into setup, such as by pressing the F1, F2 or Del key. Enter setup and look for an option such as "Boot Options" or "Boot from." If the value is "A: First, Then C:" change it to "CD−ROM First, Then C:" or something similar. Save the changes and try to install again. If installation succeeds, you may want to restore the boot settings. If your CD drive still won't boot, you may need to create an installation boot disk from the boot.img (for most computers), bootnet.img (for network installs), or pcmcia.img (for laptops) files on your CD. Create that boot disk from descriptions provided later in this chapter. Then insert the floppy, reboot, and continue this procedure. 3. Start the boot procedure. At the boot prompt, press Enter to start the boot procedure in graphical mode. If for some reason your computer will not let you install in graphical mode (16−bit color, 800@@ts600 resolution, framebuffer), refer to the "Choosing Different Install Modes" sidebar. You are asked to choose a language. Choosing Different Install Modes Though most computers will allow you to install Red Hat Linux in the default mode (graphical), there are times when your video card may not support that mode. Also, though the install process will detect most computer hardware, there may be times when your hard disk, Ethernet card, or other critical hardware cannot be detected and require special information at boot time.
  9. Here is a list of different installation modes you can use to start the Red Hat Linux install process. You would typically only try these modes if the default mode failed (that is, if the screen was garbled or hardware wasn't detected). • text: Type text to run installation in a text−based mode. Do this if installation doesn't seem to recognize your graphics card. The installation screens aren't as pretty, but they work just as well. • lowres: Type lowres to run installation in 640@@ts480 screen resolution for graphics cards that can't support the higher resolution. • nofb: Type nofb to turn off frame buffer. • expert: Type expert if you believe that the installation process is not properly auto−probing your hardware. This mode bypasses probing so you can choose your mouse, video memory, and other values that may otherwise be chosen for you. • linux rescue: The linux rescue mode is not really an installation mode. This mode boots from CD, mounts your hard disk, and lets you access useful utilities to correct problems preventing your Linux system from operating properly. • linux dd: Type linux dd if you have a driver disk you want to use to install. You can add other options to the linux boot command to identify particular hardware that is not being detected properly. For example, to specify the number of cylinders, heads, and sectors for your hard disk (if you believe the boot process is not detecting these values properly), you could pass the information to the kernel as follows: linux hd=720,32,64 In this example, the kernel is told that the hard disk has 720 cylinders, 32 heads, and 64 sectors. You can find this information in documentation that comes with your hard disk (or stamped on the hard disk itself on a sticker near the serial number). 4. Choose a language. When prompted, indicate the language that you would like to use during the installation procedure by moving the arrow keys and selecting Next. (Later, you will be able to add additional languages.) You are asked to choose a keyboard. 5. Choose a keyboard and then click Next. Select the correct keyboard model (Generic 101−key PC by default), layout (U.S. English by default), and whether or not you want to enable dead keys (on by default). Dead keys allow you to enter characters with special markings (such as circumflexes and umlauts). 6.
  10. Add a mouse. When prompted, indicate the kind of mouse and click Next. If possible, choose an exact match to the model of mouse you have. Otherwise, you can choose a generic serial mouse (if it connects to a COM port) or a generic PS/2 mouse (if it connects to a PS/2 port). Support exists also for two−button and three−button USB mice. For a serial mouse, you need to identify which COM port the mouse is connected to. If you are using a two−button mouse, you can click Emulate 3 Buttons. This allows you to use the Shift key with a mouse button to emulate the center button from a three−button mouse. 7. Continue installation. From the Welcome to Red Hat Linux screen, click Next to continue. You will see the Install Options screen. 8. Choose install type. Select either Install for a new install (along with the type of install) or Upgrade to upgrade the software for an existing version of Red Hat. Note To upgrade, you must have at least a Linux 2.0 kernel installed. With an upgrade, all of your configuration files are saved as filename.rpmsave (for example, the hosts file is saved as hosts.rpmsave). The locations of those files, as well as other upgrade information, is written to /tmp/upgrade.log. The upgrade installs the new kernel, any changed software packages, and any packages that the installed packages depend on being there. Your data files and configuration information should remain intact. Cross−Reference See the section on partitioning to learn to use Disk Druid or fdisk to partition your disk. See Appendix B for descriptions of Red Hat packages. For a new install, you must choose one of the following types (also referred to as classes) of installation: ♦ Workstation — It automatically selects the partitioning and installs packages that are appropriate for a Linux workstation. Either GNOME or KDE is the desktop environment and the X Window System provides the underlying GUI framework. GNOME is the default window manager for Red Hat Linux. You can select to install one or both of them later in the installation process. Caution Any Linux partitions or free space on your hard disk(s) will be assigned to the new installation with the Workstation and Laptop types of installation. Any Windows partitions (VFAT file system types) will not be touched by this install. After installation, you will be able to boot Linux or Windows. If there is no free space outside of your Windows partition, you must run the FIPS program (described later) before proceeding, or you will lose your Window installation. ♦ Server — A Server installs the software packages that you would typically need for a Linux server (for example, Web server, file server, and so on). This type of install does not install the X Window System by default (so you need to either add X when you select packages or you’d better know how to use the shell). This type of install also erases all hard disks and assigns all disks to Linux by default.
  11. Caution This is a big one. In case you didn't catch the previous paragraph, Server installs erase the whole hard disk by default! If you have an existing Windows partition that you want to keep, change the Automatic Partitioning option that appears next to either only remove the Linux Partitions or to only use existing free space. ♦ Laptop — A Laptop install is similar to a Workstation install. The primary differences between the two are that the Laptop install includes PCMCIA support, IRDA (infrared) utilities, and wireless tools. ♦ Custom System — You are given the choice of configuring your own partitions and selecting your own software packages. Note If you are at all computer literate, I recommend choosing Custom System install. It will give you a better feel for what is going on with your installation. At this point, the procedure will continue through a Custom System installation. If you are doing a Workstation installation, you can indicate that you want to do automatic partitioning, then skip to the Configure Networking step. If you select Server installation, you can indicate that you want to erase the entire disk, then skip to the Configure Networking step. For Custom System installs, continue on. 9. Choose your partitioning strategy. You have three choices related to how your disk is partitioned for Red Hat Linux installation: ♦ Have the installer automatically partition for you — With this selection, all Linux partitions on all hard disks are erased and used for the installation. The installation process automatically handles the partitioning. ♦ Manually Partition with Disk Druid — With this selection, the Disk Druid utility is run to let you partition your hard disk. This interface is more intuitive than fdisk’s. ♦ Manually Partition with fdisk [experts only] — With this selection, the fdisk utility is run to let you partition your hard disk. This interface is more appropriate for seasoned Linux/UNIX users. Click Next to continue. 10. Choose partitioning. If you selected to have the installer automatically partition for you, you can choose from the following options: Note If you selected to use Disk Druid or fdisk for partitioning, refer to the section on partitioning your hard disk later in this chapter for details on using those tools. ♦ Remove all Linux partitions on this system — Windows and other non−Linux partitions remain intact with this selection. ♦
  12. Remove all partitions on this system — This erases the entire hard disk. ♦ Keep all partitions and use existing free space — This only works if you have enough free space on your hard disk that is not currently assigned to any partition. If you have multiple hard disks, you can select which of those disks should be used for your Red Hat Linux installation. Leave the Review check box on to see how Linux is choosing to partition your hard disk. After reviewing the Partitions screen, you can change any of the partitions you choose, providing you have at least one root (/) partition that can hold the entire installation and one swap partition. The swap partition is usually twice the size of the amount of RAM on your computer (for example, for 128MB RAM you could use 256MB of swap). Click the Next button to continue. 11. Choose a boot loader. Select whether you want to use the GRUB or LILO boot loader. Or you can choose to not install a boot loader (for example, if you want to use a boot loader that is already installed on your computer or if you want to boot Linux from floppy disk). You can also choose where to store the boot loader. Your choices are: ♦ Master Boot Record (MBR) — This is the preferred place for GRUB or LILO. It causes either GRUB or LILO to control the boot process for all operating systems installed on the hard disk. ♦ First Sector of Boot Partition — If another boot loader is being used on your computer, you can have GRUB or LILO installed on your Linux partition (first sector). This lets you have the other boot loader refer to your GRUB or LILO boot loader to boot Red Hat Linux. Note If you select the GRUB boot loader, which is the default, you have the option of adding a GRUB password. The password protects your system from having potentially dangerous kernel options sent to the kernel by someone without that password. GRUB and LILO boot loaders are described later in this chapter. You can choose to add Kernel Parameters (which may be needed if your computer can't detect certain hardware). For example, if you have an IDE writeable CD drive, you would want it to operate in SCSI emulation mode by setting the drive to use the ide−scsi module. You can select to use linear mode (which is required if you use LILO to boot from a disk with more than 1024 cylinders and you want to have the Linux boot partition exist above that partition). The bottom of the screen indicates the bootable partitions on your computer. Select the default boot partition by clicking the partition and selecting "Default boot image." You can also change the label on any partition by clicking it and then changing the value in the Boot label box. Note For further information on configuring GRUB or LILO, refer to the section on those two boot loaders later in this chapter. 12. Configure networking. At this point, you are asked to configure your networking. This applies only to configuring a local area network. If you will use only dial−up networking, skip this section by clicking Next. If your
  13. computer is not yet connected to a LAN, you should skip this section. Network address information is assigned to your computer in two basic ways: statically (you type it in) or dynamically (a DHCP server provides that information from the network at boot time). A system administrator will give you information about a DHCP server, or the administrator may give you a static IP address that is permanently assigned to your computer, as well as other information that is needed to complete your network configuration. Besides this information, you should also indicate whether you want the network to start at boot time (you probably do if you have a LAN). Cross−Reference Refer to Chapter 15 for descriptions of IP addresses, netmasks, and other information that you need to set up your LAN and to Chapter 16 for information related to domain names. If you have selected to enter your networking information statically, you may need to deselect the Configure Using DHCP option and add the following information: ♦ IP Address — This is the four−part, dot−separated number that represents your computer to the network. How IP addresses are formed and how you choose them is more than can be said in a few sentences (see Chapter 15 for a more complete description). An example of a private IP address is 10.0.0.12. ♦ Netmask — The netmask is used to determine what part of an IP address represents the network and what part represents a particular host computer. An example of a netmask for a Class A network is 255.0.0.0. (Red Hat installation does a good job of guessing your netmask.) ♦ Network — This number represents the network number. For example, if you have an IP number of 10.0.0.12 on a Class A network (255.0.0.0), the network number is 10 (although it would be represented here as 10.0.0.0). ♦ Broadcast — This is the IP number that is reserved for broadcast data on the network. For a Class A network with a network number 10, the broadcast number could be 10.255.255.255. ♦ Hostname — This is the name identifying your computer within your domain. For example, if your computer were named "baskets" in the handsonhistory.com domain, your full hostname may be baskets.handsonhistory.com. ♦ Gateway — This is the IP number of the computer that acts as a gateway to networks outside your LAN. This typically represents a host computer or router that routes packets between your LAN and the Internet. ♦ Primary DNS — This is the IP address of the host that translates computer names you request into IP addresses. It is referred to as a Domain Name Service (DNS) server. You may also have Secondary and Ternary name servers in case the first one can't be reached. (Most ISPs will give you two DNS server addresses.)
  14. Cross−Reference To configure your LAN after installation, see Chapter 15. 13. Choose a firewall configuration. The use of a firewall has significant impact on the security of your computer. If you are connected to the Internet or to another public network, a firewall can limit the ways an intruder may break into your Linux system. Here are your choices for configuring a firewall during installation: ♦ High — Select this security level if you are connecting your Linux system to the Internet for Web browsing but don't plan to offer your system as a server to the Internet. Only explicitly defined connections are accepted. To allow Web browsing and basic network setup, DNS replies and DHCP (to serve addresses) are allowed. ♦ Medium — Select this security level if you want to block access to ports used to offer most basic TCP/IP services (standard, reserved ports lower than 1023). This selection denies access to ports used for NFS servers, remote X clients, and the X font server. ♦ No firewall — Select this security level if you are not connected to a public network and do not want to deny requests for services from any computer on your local network. Of course, you can still restrict access to services by starting up only the services you want to offer and by using configuration files to restrict access to individual services. If you know you want to allow access to particular services, you can click Customize and allow incoming requests for the following: DHCP, SSH, Telnet, WWW, Mail, and/or FTP services. You can also add a comma−separated list of port numbers to the Other Ports box to open access to those ports. (The /etc/services file lists which services are associated with which port numbers.) If you have a LAN that consists of trusted computers, you can click the box representing your interface to that LAN (probably eth0). Clicking the box allows access to any services you care to share with the computers on your LAN. TipAdding firewall rules here results in rules being added to the /etc/sysconfig/ipchains file. The rules are run from the /etc/init.d/ipchains start−up script when you boot your computer. I recommend that you edit the rules file to change your firewall rules. This makes sure that your rules are configured automatically each time the system starts. Cross−Reference For more information on configuring firewalls, see Chapter 14. 14. Choose language support. Your installation language should be selected automatically on this screen. You can select to install support for additional languages by clicking the check boxes next to the languages you want. 15. Choose a time zone. Select the time zone from the list of time zones shown. Either click a spot on the map or choose from the scrolling list. To see a more specific view of your location, click World and choose your continent. From the UTC Offset tab, you can choose a time zone according to the number of hours away from Greenwich Mean Time (GMT), known as the UTC offset. 16.
  15. Configure user accounts. You need to choose a password for your root user at this point and add one or more regular user accounts. The root password provides complete control of your Red Hat Linux system. Without it, and before you add other users, you will have no access to your own system. Enter the Root Password, and then type it again in the Confirm box to confirm it. (Remember the root user's password and keep it confidential!) TipUse the passwd command to change your password later. See Chapter 14 for suggestions on how to choose a good password. See Chapter 11 for information on setting up user accounts. Add an account name for a regular user on your computer. Type the password, confirm it, type a full name for the user, and click Add to add the account. Click Next to continue. 17. Enable authentication. In most situations, you will enable shadow passwords and MD5 passwords (as selected by default). The shadow password file prevents access to encrypted passwords. Note MD5 is an algorithm used to encrypt passwords in Linux and other UNIX systems. It replaces an algorithm called crypt, which was used with early UNIX systems. When you enable MD5 passwords, your users can have longer passwords that are harder to break than those encrypted with crypt. If you are on a network that supports one of several different forms of network−wide authentication, you may choose one of the following features: ♦ Enable NIS. Select this button and type the NIS Domain name and NIS server location if your network is configured to use the Network Information System (NIS). Instead of selecting an NIS Server, you can click the button to broadcast to find the server on your network. Cross−Reference For more information on NIS, see Chapter 23. ♦ Enable LDAP. If your organization gathers information about users, you can click this button to search for authentication information in an LDAP server. You can enter the LDAP Server name and optionally an LDAP distinguished name to look up the user information your system needs. ♦ Enable Kerberos 5. Click this button to enable network authentication services available through Kerberos. After enabling Kerberos, you can enter information about a Kerberos Realm (a group of Kerberos servers and clients), KDC (a computer that issues Kerberos tickets), and Admin server (a server running the Kerberos kadmind daemon). ♦ SMB. Click on this tab to configure your computer to use Samba for file and print sharing with Windows systems. If you Enable SMB Authentication, you can enter the name of the SMB server for your LAN and indicate the Workgroup you want your computer to belong to. 18. Select Packages. You are presented with groups of packages at this point. Which packages are selected by default depends on the type of installation you chose earlier. In general, either more workstation−oriented or
  16. server−oriented packages are selected. Select the ones you want and click Next. TipIf you have enough disk space and you want to try out lots of different areas of Linux, I recommend you do a Custom install and select "Everything" at the bottom of the Package Group list. As you try out procedures in this book, you won't have to keep installing packages if everything is already installed. Again, I don't recommend this on production computers because many server software packages open security holes. Installing everything can also consume about 3GB of space. Because each group represents several packages, you can click the "Select individual packages" button to select more specifically the packages you want. Cross−Reference Appendix B describes the software packages that come with Red Hat Linux. Tip A listing of all of the software packages in each Package Group is contained in the file RedHat/base/comps on the Red Hat installation CD−ROM. 19. Configure video hardware. Your video card should have been detected automatically and should be highlighted. If not, choose the correct video driver from the list, and select the amount of video RAM contained on the board. You can also choose to skip X configuration. (If you do, you can configure X after Linux is installed and running by using the Xconfigurator command.) TipIf you have problems getting your video card and monitor to work properly, refer to the XFree86 Web site (http://www.xfree86.org/). Select a link to a driver status document to view problems with specific video cards. See the troubleshooting section later in this chapter. 20. Begin installing? A screen tells you that you are about to begin writing to hard disk. You can still back out now, and the disk will not have changed. Click Next to proceed. (To quit without changes, eject the CD and restart the computer.) Now the file systems are created and the packages are installed. You are prompted to insert additional installation CDs as they are needed. 21. Create boot disk. If you chose to create a boot disk earlier, you are prompted here to insert a blank floppy and click Next to create the boot floppy. (You can still skip it, if you like, by clicking Skip Boot Disk Creation.) 22. Select Monitor Configuration. Scroll down the list to find your monitor's manufacturer; then click the plus sign to choose the model. When you select the model, the correct horizontal and vertical sync rates are added or you can type your own values. If your model is not found, consult the monitor's manual. Click Next to continue. 23. Choose Custom X Configuration (Color and Resolution). Based on what your hardware can support, you will see possible combinations of the number of colors and screen resolutions. The number of bits per pixel represents the total number of colors that can be displayed. You can choose 8 bits and possibly 16 bits and 32 bits. (Some applications require at least
  17. 16−bit color.) Standard screen resolution begins with 640@@ts480. Higher resolutions allow you to fit more windows on your screen, but everything is smaller and performance can be degraded. Click the Test This Configuration button to try out the selected resolution/color combination. Click Next to continue. If you installed both GNOME and KDE, you can choose which to use by default (you can switch between them once your system is running). You can also choose whether or not you want a graphical login screen (run level 5) or a text−based login screen (run level 3). Click Next to continue. 24. Finish installing. When you see the "Congratulations" screen, eject the CD and click Exit. Your computer will restart. If you installed GRUB or LILO, you will see a graphical boot screen that displays the bootable partitions. Press the Up Arrow and Down Arrow keys to choose the partition you want to boot, and press Enter. If Linux is the default partition, you can wait a few moments and it will boot automatically. Depending on whether you set your computer to use graphical login or not, you will either see the Red Hat graphical login screen or a simple command−line login prompt. Go to Chapter 3 for a description on how to login to Red Hat Linux and begin learning how to use Linux. If after installation you decide to add or remove hardware from your computer, there is a tool that will allow you to reconfigure your hardware when the system boots up. See the sidebar describing kudzu for detecting and configuring new and changed hardware. Reconfiguring Hardware at Boot Time with kudzu Sometimes as Red Hat Linux is booting up, you may want to make changes to the system configuration. You may have added a new piece of hardware (or removed one). You may want to turn off a particular system service because it is hanging during the boot. With kudzu, you can change hardware and service configurations as your computer is booting. To enter kudzu while Red Hat Linux is booting, look for a message on the screen that says "Press 'I' to enter interactive startup." Press I and you will be prompted to enter interactive startup. The kudzu Hardware Discovery Utility will check for hardware that has been removed or added and allow you to add or remove configuration for the hardware or do nothing. When all the new or changed hardware has been reconfigured, you are prompted to start service reconfiguration. Type Y and you will be stepped through each service that is configured to start at boot time. This is an excellent way to temporarily turn off a service that is hanging your system or that is no longer needed. Special Installation Procedures If you don't want to, or can't, use the procedure to install Red Hat Linux from CD, the procedures in this section give you alternatives. The first procedure tells how to install Red Hat Linux from alternative media (using FTP, HTTP, NFS, or hard disk installs). The next procedure describes how to do kickstart installations.
  18. Installing from other media Your CD−ROM drive may not be working, you may not have a CD−ROM drive, or maybe you just want to install a new version of Red Hat Linux that is available from another computer on the network. In any of these cases, Red Hat will let you install Linux from a Web server (HTTP), an FTP server, a shared NFS directory, or local hard disk. Note To use HTTP, FTP, or NFS installations, your computer must be connected to a LAN that can reach the computer containing the Red Hat Linux distribution. You cannot use a direct dial−up connection. For a local hard disk install, the distribution must have been copied to a local disk that is not being used for installation. See the section “Setting Up an Install Server” for details on copying the distribution and making it available. Beginning installation To begin any of these types of installation, you need to boot the installation process from a floppy disk. Refer to the section on creating boot disks later in this chapter. With the appropriate boot disk in hand (bootnet.img for a network install and boot.img for a hard disk install), start the installation for these types of installs as follows: 1. Insert the floppy boot disk. 2. Reboot the computer. You should see the "Welcome to Red Hat" boot screen. 3. Press Enter. You are prompted to select a language. 4. Select the language. You are prompted to choose a keyboard type. 5. Select your keyboard type. You are prompted to select an installation method. 6. Choose install method. Select any of the following installation methods: NFS Image, FTP, HTTP, or Hard disk. 7. Configure TCP/IP. For any of the network install types (NFS, FTP, and HTTP), you are prompted to configure TCP/IP. (See the section on configuring networking earlier in this chapter for descriptions of information you need to add to these fields.) 8. Identify location of Red Hat. You need to identify the NFS server name, FTP site name, or Web site name that contains the Red Hat directory that holds the distribution. Or, if you are installing from hard disk, you must identify the partition containing the distribution and the directory that actually contains the Red Hat directory. 9. Continue with installation. If the distribution is found in the location you indicated, continue the installation as described in the previous section. The next section describes how to set up your own server for installing Red Hat Linux.
  19. Setting up an install server If you have a LAN connection from your computer to a computer that has a CD−ROM drive and about 1.3GB of disk space and offers NFS, FTP, or Web services, you can install Red Hat Linux from that server. Likewise, you can install from a spare disk partition by using a hard disk install. The following procedures let you set up a Linux install server: Because there are two CDs in the Red Hat Linux distribution, you can't just identify the location of the mounted CD as you could with previous Red Hat Linux distributions. You must install the contents of both CDs in the same directory structure on the server's hard disk. For example, you could do the following: # mkdir /tmp/rh # mount /mnt/cdrom With first CD inserted # cp −r /mnt/cdrom/* /tmp/rh/ # umount /mnt/cdrom ; eject /mnt/cdrom # mount /mnt/cdrom With second CD inserted # cp −r /mnt/cdrom/* /tmp/rh/ Just type "y" when it asks to overwrite some files. The distribution directory must contain at least the RPMS and base directories, which must include all necessary software packages. In this example, all files were copied. What you do next depends on the type of install server you are using. NFS server Add an entry to the /etc/exports file to share the distribution directory you created. This entry would make the directory available in read−only form to any computer: /tmp/rh (ro) Next, restart NFS by typing the following as root user: /etc/init.d/nfs restart If your computer were named pine, the computer installing the distribution from your shared directory would identify it as pine:/tmp/rh. Web server If your computer is configured as a Web server, you need to simply make the distribution directory available. For example, after creating the distribution directory as described above, type the following: # ln −s /tmp/rh /var/www/html/rh If your computer were named pine.handsonhistory.com, you would identify the install server as http://pine.handsonhistory.com/rh. FTP server If your computer is configured as an FTP server, you need to make the distribution directory available in much the same way you did with the Web server. For example, after creating the distribution directory as described above, type the following: # ln −s /tmp/rh /var/ftp/pub/rh If your computer were named pine.handsonhistory.com, you would identify the install server as ftp://pine.handsonhistory.com/pub/rh.
  20. Hard disk install For a hard disk install, you need to copy the ISO images of each CD (for example, type cp /dev/cdrom /tmp/rh/cd1.iso). If the ISO images existed in the /tmp/rh directory of the first partition of your IDE hard disk, you could identify the device as /dev/hda1 and the directory holding the images as /tmp/rh. TipBecause I had a dual−boot system (Linux and Windows ME) with a lot of space on my Windows partition, I copied iso images of each Red Hat Linux distribution CD to a top level directory called rh. The install procedure had no trouble accessing the Windows (VFAT) partition and installation went smoothly. Kickstart installation If you are installing Red Hat Linux on multiple computers, you can save yourself some trouble by preconfiguring the answers to questions asked during installation. The method of automating the installation process is referred to as a kickstart installation. Caution Based on the information you provide in your ks.cfg file, kickstart will silently go through and install Red Hat Linux without intervention. If this file is not correct, you could easily remove your master boot record and erase everything on your hard disk. Check the ks.cfg file carefully and test it on a noncritical computer before trying it on a computer holding critical data. The general steps of performing a kickstart installation are as follows: 1. Create a kickstart file. The kickstart file, named ks.cfg, contains the responses to questions that are fed to the installation process. 2. Install kickstart file. You have to place the ks.cfg on a floppy disk, on a local hard disk, or in an accessible location on the network. 3. Start kickstart installation. When you boot the installation procedure, you need to identify the location of the ks.cfg file. TipIf you already have a Red Hat Linux installation completed, you can use the settings given for that installation to create a ks.cfg file that you can use for the next computer. Type the following from a terminal window on that computer. # mkkickstart > /tmp/ks.cfg Be sure to open the ks.cfg file you just created, in any text editor, and change it as you desire. The output is not perfect, so you will need to correct it. In particular, you need to create good partitioning information. It is useful, however, for gathering a list of packages. You can then copy the ks.cfg file to a floppy disk to use for your next kickstart installation. Creating the kickstart file The best way to begin creating your kickstart file is from a working ks.cfg file. You can do this either by copying one that comes with your Red Hat installation or by creating one using the mkkickstart command described in the previous section. From the Red Hat Documentation CD, copy the sample.ks file to a temporary directory so you can work on it. Here is an example: # cp /mnt/cdrom/RH−DOCS/sample.ks /tmp/ks.cfg Use any text editor to edit the ks.cfg file. Remember that required items should be in order and that any time
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2