Tải bản đầy đủ (.pdf) (192 trang)

IT training train signal (lab 22) linux networks

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (12.83 MB, 192 trang )

Linux Networking

Video CBT
LAB SERIES

Linux Networking & Administration

Video CBT Lab 23
Red Hat Cerified Technician (RHCT) &
CompTIA Linux+ Preparatory Course


Linux Networking & Administration:
A complete Linux, Red Hat Certified Technician
(RHCT) & CompTia Linux +
Preparatory Course
Fast Track CBT Video Lab
Labs 1 - 10

Page 1 of 191

© Train Signal, Inc., 2002-2006


Page 2 of 191

© Train Signal, Inc., 2002-2006


About the Author
David Davis has been in the IT industry for 12 years. Currently, he manages a group of


systems/network administrators for a privately owned retail company and also authors ITrelated material in his spare time. He has written over fifty articles, eight practice tests and
has co-authored one book. His certifications include: IBM Certified Professional-AIX
Support, MCSE + Internet, Sun Certified Solaris Admin (SCSA), Certified Information
Systems Security Professional (CISSP), Certified Ethical Hacker (CEH), Certified Wireless
Network Administrator (CWNA), Cisco CCNA, CCDA, CCNP and CCIE #9369.
Train Signal, Inc.
400 West Dundee Road
Suite #106
Buffalo Grove, IL 60089
Phone – (888) 229-5055 or (847) 229-8780
Fax – (847) 229-8760
www.trainsignal.com
Copyright and other Intellectual Property Information
© Train Signal, Inc., 2002-2005. All rights are reserved. No part of this publication,
including written work, videos and on-screen demonstrations (together called “the
Information” or “THE INFORMATION”) may be reproduced or distributed in any form
or by any means without the prior written permission of the copyright holder.
Products and company names, including but not limited to, Microsoft, Novell and Cisco, are
the trademarks, registered trademarks and service marks of their respective owners.

Page 3 of 191

© Train Signal, Inc., 2002-2006


Disclaimer and Limitation of Liability
Although the publishers and authors of the Information have made every effort to ensure
that the information within it was correct at the time of publication, the publishers and the
authors do not assume and hereby disclaim any liability to any party for any loss or damage
caused by errors, omissions, or misleading information.

TRAIN SIGNAL, INC. PROVIDES THE INFORMATION "AS-IS." NEITHER TRAIN
SIGNAL, INC. NOR ANY OF ITS SUPPLIERS MAKES ANY WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED. TRAIN SIGNAL, INC. AND ITS SUPPLIERS
SPECIFICALLY DISCLAIM THE IMPLIED WARRANTIES OF TITLE, NONINFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THERE IS NO WARRANTY OR GUARANTEE THAT THE OPERATION
OF THE INFORMATION WILL BE UNINTERRUPTED, ERROR-FREE, VIRUSFREE, OR THAT THE INFORMATION WILL MEET ANY PARTICULAR
CRITERIA OF PERFORMANCE OR QUALITY. YOU ASSUME THE ENTIRE RISK
OF SELECTION, INSTALLATION AND USE OF THE INFORMATION.
IN NO EVENT AND UNDER NO LEGAL THEORY, INCLUDING WITHOUT
LIMITATION, TORT, CONTRACT, OR STRICT PRODUCTS LIABILITY, SHALL
TRAIN SIGNAL, INC. OR ANY OF ITS SUPPLIERS BE LIABLE TO YOU OR ANY
OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING WITHOUT
LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE,
COMPUTER MALFUNCTION, OR ANY OTHER KIND OF DAMAGE, EVEN IF
TRAIN SIGNAL, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES. IN NO EVENT SHALL TRAIN SIGNAL, INC. BE LIABLE FOR
DAMAGES IN EXCESS OF TRAIN SIGNAL, INC.'S LIST PRICE FOR THE
INFORMATION.
To the extent that this Limitation is inconsistent with the locality where you use the
Software, the Limitation shall be deemed to be modified consistent with such local law.
Choice of Law:
You agree that any and all claims, suits or other disputes arising from your use of the
Information shall be determined in accordance with the laws of the State of Illinois, in the
event Train Signal, Inc. is made a party thereto. You agree to submit to the jurisdiction of
the state and federal courts in Cook County, Illinois for all actions, whether in contract or in
tort, arising from your use or purchase of the Information.

Page 4 of 191


© Train Signal, Inc., 2002-2006


TABLE OF CONTENTS
INTRODUCTION............................................................................................................... 7
LAB SETUP...................................................................................................................... 9
SETTING UP THE LAB................................................................................................... 10
COMPUTER 1............................................................................................................. 12
COMPUTER 2............................................................................................................. 12
LAB SCENARIO.......................................................................................................... 14
LAB 1.............................................................................................................................. 15
SELECT THE VERSION OF LINUX TO USE ................................................................. 16
DOWNLOAD AND CREATE CD MEDIA ........................................................................ 17
INSTALLING FEDORA LINUX........................................................................................ 20
LAB 2.............................................................................................................................. 35
LAB SCENARIO.............................................................................................................. 36
INSTALLING DNS........................................................................................................... 37
CONFIGURING LINUX DNS SERVER........................................................................... 40
LAB 3.............................................................................................................................. 55
LAB SCENARIO.............................................................................................................. 56
INSTALLING LINUX DHCP SERVER............................................................................. 57
CONFIGURING LINUX DHCP SERVER ........................................................................ 59
TEST LINUX DHCP SERVER WITH WINDOWS CLIENT ............................................. 64
LAB 4.............................................................................................................................. 69
LAB SCENARIO.............................................................................................................. 70
CONFIGURING SAMBA ................................................................................................. 71
TESTING SAMBA ........................................................................................................... 80
LAB 5.............................................................................................................................. 85
LAB SCENARIO.............................................................................................................. 86
START APACHE WEB SERVER AND SET TO START AUTOMATICALLY ................. 87

CONFIGURE APACHE AND CREATE A NEW VIRTUAL SERVER .............................. 91
TESTING THE NEW VIRTUAL SERVER ..................................................................... 103
LAB 6............................................................................................................................ 104
LAB SCENARIO............................................................................................................ 105
ADDING LINUX USERS AND GROUPS ...................................................................... 106
SETTING PERMISSIONS ON FILES AND FOLDERS................................................. 111
TESTING LINUX SECURITY........................................................................................ 117

Page 5 of 191

© Train Signal, Inc., 2002-2006


LAB 7............................................................................................................................ 132
LAB SCENARIO............................................................................................................ 133
CREATING A SPREADSHEET WITH OPENOFFICE CALC ....................................... 134
CREATING A DOCUMENT WITH OPENOFFICE WRITER......................................... 138
TEST SHARING A FILE BETWEEN MS WORD AND OPENOFFICE WRITER .......... 139
LAB 8............................................................................................................................ 146
LAB SCENARIO............................................................................................................ 147
INSTALLING KDAR ...................................................................................................... 148
PERFORMING A BACKUP WITH KDAR ..................................................................... 162
RESTORING A FILE WITH KDAR................................................................................ 168
LAB 9............................................................................................................................ 171
LAB SCENARIO............................................................................................................ 172
USING YUM.................................................................................................................. 173
INSTALLING YUMEX (YUM GUI INTERFACE) ........................................................... 174
USING YUMEX TO PERFORM AN UPDATE .............................................................. 176
LAB 10.......................................................................................................................... 183
LAB SCENARIO............................................................................................................ 184

CONFIGURING THE FTP SERVER............................................................................. 185
STARTING THE FTP SERVER .................................................................................... 188
TESTING OUR FTP SERVER CONFIGURATION....................................................... 189

Page 6 of 191

© Train Signal, Inc., 2002-2006


Introduction
Welcome to Train Signal!
This series of labs on Red Hat Linux is designed to give you detailed, hands-on experience of
working with the Linux Operating System. Train Signal’s Audio-Visual Lab courses are
targeted towards the serious learner, those who want to know more than just the answers to
the test questions. We have gone to great lengths to make this series appealing to both those
who are seeking the Red Hat Certified Technician (RHCT) or Linux+ certifications and to
those who want an excellent overall knowledge of the Linux Operating System.
Each of our courses puts you in the driver’s seat, working for different fictitious companies,
deploying complex configurations and then modifying them as your company grows. They
are not designed to be a “cookbook lab,” where you follow the steps of the “recipe” until
you have completed the lab and have learned nothing. Instead, you recommend that you
perform each step and then analyze the results of your actions in detail.
To complete these labs yourself, you will need two computers equipped as described in the
Lab Setup section. You also need to have a foundation in Networking and TCP/IP
concepts. You should be comfortable with navigating through a graphical operating system.
Basic networking skills will also be very helpful. These labs will start from a default
installation of Red Hat Linux. From there, you will be run through the basic configurations
and settings for a variety of standard Linux services and applications. It is very important
that you follow these guidelines exactly, in order to get the best results from this course.
The course also includes a CD-ROM that features an audio-visual walk-through of all of the

labs in the course. In the walk-through, you will be shown all of the details from start to
finish on each step, for every lab in the course. During the instruction, you will also benefit
from live training that discusses the current topic in great detail, making you aware of many
of the associated fine points.
Thanks for choosing Train Signal!

Scott Skinger
Owner
Train Signal, Inc.
Page 7 of 191

© Train Signal, Inc., 2002-2006


Page 8 of 191

© Train Signal, Inc., 2002-2006


Lab Setup

Page 9 of 191

© Train Signal, Inc., 2002-2006


Setting up the Lab
1. Computer Equipment Needed

Item


Minimum

Recommended

Computers

(2) Pentium 2 266 MHz

(2) Pentium II 400MHz or greater

Memory

256 MB

512 MB

Hard Drive

6 GB

10 GB or larger

CD Recorder

CD recordable drive

CD recordable drive

NIC


1 per computer

1 per computer

Networking

10 Base-T Ethernet Interface
and a hub

100 Base-T Ethernet Interface and a
switch

Dedicated
Internet
Connection

Networked connection to the
Internet required to download
and install many packages in
these labs.

Networked connection to the Internet
required to download and install
many packages in these labs. A highspeed Internet connection (i.e. DSL,
Cable, T1, etc) would be ideal.

Software

Red Hat Linux (Version 9),

Enterprise Linux 3 or 4,
Fedora, or clones will all work)

Red Hat Fedora Linux Version 5

Page 10 of 191

Microsoft Office Suite

© Train Signal, Inc., 2002-2006


You are strongly urged to acquire all of the recommended equipment in the list above. It
can all be easily purchased from eBay or another source, for around $500 (less if you already
have some of the equipment). This same equipment is used over and over again in all of
Train Signal’s labs and will also work great in all sorts of other network configurations that
you may want to set up in the future. It will be an excellent investment in your education.
Call or email us at: if you need help locating networking
equipment. Two other products that you may also want to look into are a KVM (KeyboardVideo-Mouse) switch and a disk-imaging product, such as Norton Ghost. The KVM switch
will allow you to run all of your computers using a single keyboard/monitor/mouse set. A
button allows you to quickly control which PC you are managing. Disk imaging software
will save you a tremendous amount of time when it comes to reinstalling operating systems
for future labs. Many vendors offer trial versions or personal versions of their products that
are very inexpensive.
2. Computer Configuration Overview

1

2


Computer Name

CLIENT1

SERVER1

IP Address

IP 192.168.1.10
Subnet 255.255.255.0

IP 192.168.1.100
Subnet 255.255.255.0

Default Gateway

192.168.1.1

192.168.1.1

OS

Windows XP Pro

Red Hat Fedora Linux

Additional
Configurations

SP2 or later

And Microsoft Word

Core Version 5

Computer Number

***Important Note***
This lab should NOT be performed on a live production network. You should only use computer
equipment that is not part of a business network AND is not connected to a business network.
Train Signal Inc., is not responsible for any damages. Refer to the full disclaimer and limitation of
liability, which appears at the beginning of this document and on our Website at:
/>Page 11 of 191

© Train Signal, Inc., 2002-2006


3. Detailed Lab Configuration
Computer 1
Computer 1 will be named Client1 and the operating system on this computer will be
Windows XP Pro. You should also install Service Pack 2 or later to avoid any unforeseen
problems. Have Microsoft Word installed as well as we will use it to test file sharing between
Word and the Linux freeware version of Word.
Client1 will have one NIC with a static IP address of 192.168.1.10 and a 255.255.255.0
subnet mask. You are also welcome to use DHCP for both Client and Server as long as you
keep in mind that you will have to substitute the proper DHCP IP address for the static
addresses defined in this lab book. If you use the static IP addresses, make sure that these
addresses do not overlap with any existing IP addresses already on your LAN (assuming you
connect these machines to your LAN). The default gateway will be your local router that
connects to your Internet Service Provider. Initially, you should match the DNS server of
your Client and Server to match the DNS server information from your ISP. Many times,

this DNS server information will be obtained from your Router/AP. Later in these labs, you
will be configuring a Linux server using Red Hat and configuring your client’s DNS to be
that Red Hat Linux DNS server. The Client is in a workgroup named WORKGROUP but
will soon be moved to a domain when we configure the Linux Samba server. See figure 1,
next page.
Computer 2
Computer 2 will be named Server1 and the operating system on this computer will be Red
Hat Linux Fedora Core Version 5. However, most exercises will work on Red Hat Version
9, Enterprise Linux, or another version of Fedora Linux. The NIC in Server1 will have a
static IP address of 192.168.1.100 and a subnet mask of 255.255.255.0. The default gateway
should be set to 192.168.1.1. The DNS server information should match that of your
Internet Service Provider. See figure 1, next page.

Page 12 of 191

© Train Signal, Inc., 2002-2006


Big Sky Fishing Supply
Network

Internet

Server 1
IP - 192.168.1.10
SM - 255.255.255.0
DG – 192.168.1.1
DNS – match ISP’s
DNS via DHCP


Router
Internal IP - 192.168.1.1
Internal SM - 255.255.255.0
External IP, SM, DG, and
DNS via ISP’s DHCP

Red Hat Fedora Core
Version 5

`

Client 1
IP - 192.168.1.10
SM - 255.255.255.0
DG - 192.168.1.1
DNS - match ISP’s
XP Pro with SP2

(figure 1)
***Important Note***
This lab should NOT be performed on a live production network. You should only use computer
equipment that is not part of a business network AND that is not connected to a business network.
Train Signal Inc. is not responsible for any damages. Refer to the full disclaimer and limitation of
liability which appears at the beginning of this document and on our Web site at:
www.trainsignal.com

Page 13 of 191

© Train Signal, Inc., 2002-2006



Lab Scenario
Big Sky Fishing Supply (www.bigskkyfishingsupply.com) in Bozeman, Montana, sells fishing
supplies. They sell rods, reels and anything else related to fishing through their retail
locations and through their e-commerce website. Big Sky is also a wholesaler to many
different fishing stores and other retail outlets around the country.
Big Sky Fishing Supply is converting their retail outlet in Bozeman, Montana to Linux. They
will use Linux for the following services: file sharing, web serving, FTP, DHCP and DNS.
This will be a pilot test of the Linux operating system for Big Sky Fishing. If this test is
successful, they plan to convert all retail stores, the corporate office and their e-commerce
web servers to Linux. They could save thousands of dollars in licensing fees and
maintenance by doing this. Because of the potential cost savings and the high profile of this
pilot, the CIO considers this Linux implementation very critical.
As a contractor, you will be solely responsible for implementing the new Big Sky Fishing
Supply Linux server implementation. During this process, you will start by installing a new
Linux server. From there you will install, configure and test a variety of critical Linux
infrastructure applications. You will have a Windows client that you use for testing.
Before starting any of the labs you should ensure that you have setup your network
according to the lab setup section which can be found earlier in this lab.

Page 14 of 191

© Train Signal, Inc., 2002-2006


Lab 1
Fedora Linux Installation
You will learn how to:
• Select the version of Linux to use
• Download Linux and create CD Media

• Install Fedora Linux

Page 15 of 191

© Train Signal, Inc., 2002-2006


Select the version of Linux to use
Red Hat offers a variety of Linux versions. Here is a short breakdown of them:
Server
Red Hat Enterprise Linux AS – for high-end servers.
Red Hat Enterprise Linux ES – for mid-range servers.
Workstation
Red Hat Enterprise Linux WS – for technical workstations and power desktops.
Red Hat Enterprise Linux Desktop – for volume client deployments.
Free/Home User
Fedora – for cutting edge users who aren’t as concerned with stability and who do not need
support from Red Hat.
On the Red Hat Certified Technician (RHCT) and RHCE exams, the Red Hat test will be
given on the WS version of the operating system. All of these Red Hat versions are similar
but have some differences. The differences to look for are:







Support services included for that version of Red Hat.
Platforms that that version is available for.

Number of CPUs and amount of RAM supported.
Packages included. Specifically, the packages that are not in Enterprise Linux WS or
Red Hat Desktop include: amanda-server, arptables_jf, bind, caching-nameserver,
dhcp, freeradius, inews, inn, krb5-server, netdump-server, openldap-servers, pxe,
quagga, radvd, rarpd, redhat-config-bind, redhat-config-netboot, tftp-server, tux,
vsftpd and ypserv.
However, Fedora includes most all packages included in the server versions of
Enterprise Linux.

The server and workstation versions must be bought. The WS version starts at $179 but is
available as a 30 day evaluation. For the purpose of installing Red Hat Linux on this Big Sky
Fishing Supply server, you should use the free version of Red Hat Linux, called Fedora.
This way, you get all applications we will practice on and there is no cost or time limit for
use. However, if you are preparing for the RHCT exam, you may want to download the
evaluation version of Red Hat Enterprise Linux WS to practice with.

Page 16 of 191

© Train Signal, Inc., 2002-2006


Download and create CD media
1. To obtain Red Hat Fedora, go to www.redhat.com and click on Download.

2. Next, click on the Download link, under the Fedora section.

Page 17 of 191

© Train Signal, Inc., 2002-2006



3. Read through the download and installation instructions to familiarize yourself with
Fedora’s download process.

4. Click on the Download link.

Page 18 of 191

© Train Signal, Inc., 2002-2006


5. Next, choose your platform, i386 (unless you are using a 64-bit machine).
If you have trouble getting here, you can go to:
/>You will be taken to a random download mirror site for Fedora Linux. Thus, it may look
like this or it may look different. Either way, the files you want to download are the
same.

Download each of these FC-5-i386-discX.iso files where X is 1, 2, 3, 4 and 5. As these
files are about 600MB each, they will take some time to download.
Once downloaded, you need to create 5 CDs out of these 5 CD images (the ISO files
that you have downloaded). This can be done with just about any CD recording software
and a CD-R drive. Once you have the 5 CDs created, move on to installing the software.
Optionally, you could use a program like Daemon Tools ( to just mount the ISO CDs directly, without ever having to burn them to a
CD.
Another option, available on some mirrors, is to download a 3+GB DVD file and to
burn a DVD of the entire Fedora distribution on a single DVD.
Page 19 of 191

© Train Signal, Inc., 2002-2006



Installing Fedora Linux
1. To install Red Hat Linux, insert CD #1 in your CD drive and power on your Server1
system. The server should find the CD in the drive and boot from it. You should see a
screen that looks like the one below.

2. You can press F2 to see the boot loader options, like this:

Page 20 of 191

© Train Signal, Inc., 2002-2006


3. Normally, you will just press the Enter key to begin the boot, with the default settings,
in graphical mode. After pressing enter, you will see a lot of text information scroll by
quickly. This is the Red Hat system starting up.
You will now see a colorful text menu screen, asking if you want to test the CD media
for errors. Note that your mouse doesn’t work here. You need to either use tab or the
right arrow to move over to the skip button. Once there, either press the space bar or
enter to select.

4. Now, Anaconda, the Fedora Linux Installer, will start up and the screen resolution will
change from 640x480 to 800x600. Here is what you will see:

Page 21 of 191

© Train Signal, Inc., 2002-2006


5. Your mouse should now function. Use it to click Next. On the language selection, take

the English default by clicking Next (assuming that is your choice). On the keyboard
selection, take the default of US English by clicking Next (assuming that is your
choice).Assuming you have a blank hard drive, you will be told that the partition table is
unreadable and you will be asked if you want to initialize the drive and erase all data.

6. Click Yes. You are now in the Disk Partitioning Setup section. The simplest choice here
is to take the defaults. However, if you have some more advanced knowledge, you can
review and modify the partition layout using that option.

Page 22 of 191

© Train Signal, Inc., 2002-2006


7. Click Next. On a new installation, like this one, you will get a message that says that the
partition table on device sda was unreadable and you must initialize the drive to
continue.

8. This is required so click Yes. Now you are at the networking configuration screen. It is
here that you either take the default of configuring the Linux system’s IP address
information via DHCP (from a DHCP server on your network) or using static IP
address information. In most cases, DHCP works fine, just as you would on a Windows
workstation. However, in our case, we have some specific static information we want to
configure.

Page 23 of 191

© Train Signal, Inc., 2002-2006



9. Click Edit on the Network Device section. A window will come up. In that window,
uncheck the Configure using DHCP option and fill in the static IP address and subnet
mask, like this:

10. Back on the main network configuration screen, put in a hostname for this Linux
system. The hostname should be Server1.BigSkyFishingSupply.com. Enter the
gateway from the setup section of 192.168.1.1 (or whatever your local router’s gateway
is). Enter the primary and secondary DNS IP addresses that are provided by your
Internet Service Provider or this information for already existing DNS servers on your
LAN. When you are done, the screen should look similar to this:

Page 24 of 191

© Train Signal, Inc., 2002-2006


×