RHCE Prerequisites - mhp ?· 2 Chapter 1: RHCE Prerequisites CertPrs8 / RHCE Red Hat Certified Engineer…

  • View
    212

  • Download
    0

Embed Size (px)

Transcript

  • 1RHCEPrerequisites

    CERTIFICATION OBJECTIVES

    1.01 Basic Linux Knowledge

    1.02 Linux Filesystem Hierarchyand Structure

    1.03 Basic Commands

    1.04 Printing

    1.05 The Linux/Unix Shell

    1.06 Basic Security

    1.07 Linux/Unix System Administration

    1.08 Basic TCP/IP Networking

    1.09 Standard Network Services

    1.10 Basic Network Security

    Two-Minute DrillQ&A Self Test

    CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 1Blind Folio 1:1

    D:\omh\CertPrs8\485-1\ch01.vpWednesday, September 18, 2002 10:11:24 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • 2 Chapter 1: RHCE Prerequisites

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

    The Red Hat Certified Engineer exam is an advanced challenge. As the RHCE coursehas a number of prerequisites, this book assumes that you know some basics aboutLinux. This chapter covers each of these prerequisite topics in a minimum of detail,with references to other books and sources for more information. Unlike in other chaptersand other books in this series, the Questions include a number of zingers that go beyond thischapters content. That is the only way to see if you have the prerequisite skills necessary forremaining chapters.

    The prerequisites are quite broad; it is okay if you do not feel comfortable with asmall number of topics in this chapter. Its in fact quite natural that many experiencedLinux administrators dont use every one of the prerequisite topics in their everydaywork. Many candidates are successfully able to fill in the gaps in their knowledgewith some self-study and lots of practice.

    Unfortunately, it is not possible to condense all of the prerequisite lessons into onechapter, at least in a way that can be understood by newcomers to Linux and otherUnix-based operating systems. If after reading this chapter, you find gaps in yourknowledge, please refer to one of the following guides:

    Red Hat Linux: The Complete Reference, Second Edition, by Richard Petersen(McGraw-Hill/Osborne, 2001), provides a detailed step-by-step guide to everypart of this operating system. After reading this book, if you want additionalexercises in Red Hat Linux, this is the book.

    Hacking Linux Exposed: Linux Security Secrets & Solutions by Hatch, Lee, andKurtz (McGraw-Hill/Osborne, 2001), gives you a detailed look at how youcan secure your Linux system and networks in every possible way.

    Linux Programming: A Beginners Guide, by Richard Petersen (McGraw-Hill/Osborne, 2001), takes a fundamental look at the scripts you need to administerLinux professionally, and customize tools such as the GNOME and KDE GUIsfor your users.

    Critical to a Linux administrator is knowledge of one or more text editors to managethe many configuration files on a Linux system. The Linux filesystem hierarchyorganizes hardware, drivers, directories, and of course, files. You need to master anumber of basic commands to manage Linux. Printer configuration can be a complextopic. Shell scripts enable you to automate many everyday processes. Security is nowa huge issue that Linux can handle better than other operating systems; locally, andon larger networks such as the Internet.

    D:\omh\CertPrs8\485-1\ch01.vpWednesday, September 18, 2002 10:11:24 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • As an administrator, you need a good knowledge of basic system administrationcommands, TCP/IP configuration requirements, and standard network services. Thebasic hardware knowledge associated with RHCE prerequisites is covered in Chapter 2.

    This is not a book for beginners to Linux/Unix-type operating systems. Some ofwhat you read in this chapter may be unfamiliar. Use this chapter to create a list oftopics that you may need to study further. In some cases, youll be able to get up tospeed with the material in other chapters. But if you have less experience with Linux oranother Unix-type operating system, you may want to refer to the aforementioned books.

    CERTIFICATION OBJECTIVE 1.01

    Basic Linux KnowledgeLinux and Unix are managed through a series of text files. Linux administrators donot normally use graphical editors to manage these configuration files. Editors suchas WordPerfect, StarOffice, and yes, even Microsoft Word normally save files in abinary format that Linux cant read. Popular text editors for Linux configuration filesinclude emacs, pico, joe, and vi.

    The VIsual EditorWhile emacs may be the most popular text editor in the world of Linux, everyadministrator needs at least a basic knowledge of vi. While emacs may be morepopular and flexible, vi may help you save a broken system. If you ever have torestore a critical configuration file using an emergency boot floppy, vi is probablythe only editor that youll have available.

    You need to know how to restore your system from a rescue floppy, which doesnot have enough room to carry any editor other than vi.

    You should know how to use the two basic modes of vi: command and insert. Whenyou use vi to open a file, it opens in command mode. Some of the commands startinsert mode. Opening a file is easy; just use the vi filename command. By default,this starts vi in command mode. An example of vi with the /etc/passwd file is shownin Figure 1-1.

    Basic Linux Knowledge 3

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

    D:\omh\CertPrs8\485-1\ch01.vpWednesday, September 18, 2002 10:11:24 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • The following is only the briefest of introductions to the vi editor. For moreinformation, there are a number of books available, as well as an extensive manualformatted as a HOWTO available from the Linux Documentation Project atwww.tldp.org.

    vi Command ModeIn command mode, you can do everything you need to a text file except edit it. Theoptions in command mode are broad and varied, and they are the subject of a numberof book-length texts. Using vi requires five critical command skills.

    Search Start with a backslash, followed by the search term. Remember,Linux is case sensitive, so if youre searching for Michael in /etc/passwd,use the /Michael (not /michael) command.

    Write To save your changes, use the w command. You can combinecommands; for example, wq writes the file and exits vi.

    Quit To leave vi, use the q command. If you want to abandon any changesthat youve made, use the q! command.

    4 Chapter 1: RHCE Prerequisites

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

    FIGURE 1-1

    The vi editor

    D:\omh\CertPrs8\485-1\ch01.vpWednesday, September 18, 2002 10:11:25 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • Edit You can use a number of commands to edit files through vi, such as x,which deletes the currently highlighted character, dw, which deletes the currentlyhighlighted word, and dd, which deletes the current line. Remember, p placestext from a buffer, and u restores text from a previous change.

    Insert A number of commands allow you to start insert mode, includingi to start inserting text at the current position of the editor, and o to open upa new line immediately below the current position of the cursor.

    vi Insert ModeIn modern Linux systems, editing files with vi is easy. Just use the normal navigationkeys (arrow keys, PAGE UP, and PAGE DOWN), and then one of the basic commandssuch as i or o to start vis insert mode, and type your changes directly into the file.

    When youre finished with insert mode, press the ESC key to return to commandmode. You can then save your changes, or abandon them and exit vi.

    EXERCISE 1-1

    Using vi to Create a New UserIn this exercise, youll create a new user by editing the /etc/passwd file with the vitext editor.

    1. Open a Linux command line interface. Go into root or superuser mode, andtype the vi /etc/passwd command.

    2. Navigate to the last line in the file. As you should already know, there areseveral ways to do this in command mode, including the DOWN ARROW key,the PAGE DOWN key, the G command, or even the K key.

    3. Make one copy of this line. If youre already comfortable with vi, you shouldknow that you can copy an entire line to the buffer with the yy command. Youcan then restore that line as many times as desired with the p command.

    4. Change the username, User ID, Group ID, user comment, and home directoryfor the new user. Based on Figure 1-2, this corresponds to pm, 501, 501,Tony Blair, and /home/pm. Make sure the username corresponds to thehome directory.

    Basic Linux Knowledge 5

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

    D:\omh\CertPrs8\485-1\ch01.vpWednesday, September 18, 2002 10:11:25 AM

    Color profile: Generic CMYK printer profileComposite Default screen

  • 6 Chapter 1: RHCE Prerequisites

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

    5. Return to command mode by pressing the ESC key. Save the file with the wqcommand.

    6. As the root user, run the passwd newuser command. Assign the password ofyour choice to the new user.

    CERTIFICATION OBJECTIVE 1.02

    Linux/Unix Filesystem Hierarchy and StructureEverything in Linux can be reduced to a file. Partitions are associated with files suchas /dev/hda1. Hardware components are associated with files such as /dev/modem.Detected devices are documented as files in the /proc directory. The FilesystemHierarchy Standard (FHS) is the official way to organize files in Unix and Linuxdirectories.