Linux Red Hat 6.2

80
Basic Linux Group #3: Ahmad, Indra Tran, Darren Young, Kevin Yuan, Yiqian

description

Linux Red Hat 6.2

Transcript of Linux Red Hat 6.2

Page 1: Linux Red Hat 6.2

Basic Linux

Group #3:• Ahmad, Indra• Tran, Darren• Young, Kevin• Yuan, Yiqian

Page 2: Linux Red Hat 6.2

Objectives

• Installing Red Hat Linux 6.2• Remote Login• FTP (File Transfer Protocol)• VNC (Virtual Network Computing)

Page 3: Linux Red Hat 6.2

Linux Installation

Page 4: Linux Red Hat 6.2

Linux Red Hat 6.2

Basic Installation&

Getting Started

Page 5: Linux Red Hat 6.2

Basic Installation

• Uses Red Hat Linux 6.2, standard edition.• Contains Step by Step process designed for

for first time Red Hat Linux 6.2 users.

Page 6: Linux Red Hat 6.2

Quick Facts

• Linux uses NativeLinux File System, so without setting up Samba it will not be able to access files using NTFS or FAT32.

• LiLo (LInux LOader) overrides other OS boot options but is NOT compatible with WinNT.

• A typical installation will be around 700MB.• USB drivers are not included in the package, USB

drivers can be obtained at www.linux-usb.org

Page 7: Linux Red Hat 6.2

Hardware Consideration

• Red Hat suggest that you write down the make, model, and size of your hardware before you install.

• Red Hat 6.2 will automatically configure all supported hardware.

• Hardware compatibility list can be found at www.redhat.com/hardware

Page 8: Linux Red Hat 6.2

Partition Consideration

• Installing Linux on it’s own hard drive– Before installing Linux, save the files you wish to keep as

everything on that hard drive will be erased.• Installing Linux and other OS on the same hard drive

1. Partition the hard drive into at least two drives (using fdisk) before you install Linux.

2. If the hard drive is already partitioned, all files on the partitioned drive in which Linux will be installed will be lost.

Page 9: Linux Red Hat 6.2

To Begin Installation

• Insert Boot Disk into floppy drive and restart computer.

• When prompted: press [return] to use graphical installation.

• Use the chart on the right to switch display types.

Console Keystrokes Contents

1 Ctrl-Alt-F1 installation dialog

2 Ctrl-Alt-F2 shell prompt

3 Ctrl-Alt-F3 install log (messages from installation program)

4 Ctrl-Alt-F4 system-related messages

5 Ctrl-Alt-F5 other messages

7 Ctrl-Alt-F7 X graphical display

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 10: Linux Red Hat 6.2

Language and Mouse Selection

• Select the Language.• Select keyboard type.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 11: Linux Red Hat 6.2

Mouse Configuration

• Select the mouse type (scroll mouse does not seem to be supported).

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 12: Linux Red Hat 6.2

Installation Type

• Custom is personally HIGHLY recommended:

• Allows LiLo configuration, a MUST for those also running WinNT.

• Allows you to choose your partitioning scheme.

• Allows you to install both Gnome and KDE GUI’s.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 13: Linux Red Hat 6.2

Setting Partitioning Scheme

1. Highlight the drive on which you wish to install Linux.

2. Select Delete to remove the current partition.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 14: Linux Red Hat 6.2

Partitions to Add• Add the following partitions:Mount Point Type /boot Linux Native /Swap Linux Swap/ Linux Native

Size of Partitions:/boot -no more than 16M./Swap -at least 16M, size of your RAM is

recommended./ -(a.k.a root) how ever much space is left on

your hard drive, this is where your programs will be stored so it must be big enough to hold install programs.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 15: Linux Red Hat 6.2

Formatting Partitions

• Click on the partitions which you want to format– /boot– /– Any others you’ve added– Swap will not be an option

• If you are confident of your hard drive, there should not be a need to check for bad sectors.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 16: Linux Red Hat 6.2

LiLo Configuration

• Running WinNT– Do Not install LiLo if you

are running NT.– Create a boot disk.

• Default boot from other OS– Click on write to MBR.– Highlight the boot image.– Click on <Default boot

Image> box.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 17: Linux Red Hat 6.2

Network Configuration• Only shows up if you have

NIC card.• Obtain these numbers from

your ISP.• If you do not have static IP

or connections such as DSL, there will be no need to configure this screen.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 18: Linux Red Hat 6.2

Time Zone Configuration

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 19: Linux Red Hat 6.2

Choosing Passwords• Root Password

– Use login name: root. – Only a root/su (super user) access

will allow you to configure Linux after installation.

• Reminder: both Account Name and Password are case sensitive.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 20: Linux Red Hat 6.2

Authentication Configuration• MD5 Password

– allows a long password (up to 256 chars instead of 8).

• Shadow Password – Retains passwords in /etc/shadow, which

is only accessible by root.• Enable NIS: Allows you to run a group of

computers in the same NIS (network information service) domain with common a password and group file.– NIS domain- specify domain your system

belongs to.– NIS server- specifies the NIS server your

computer uses.http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 21: Linux Red Hat 6.2

Packages to Install• X Window System is a MUST.• First time users should keeps

those packages already selected.• Recommend installing both

KDE and GNOME*.• You can choose to select

individual packages to see what’s contained in each package. (not recommended).

*If your hard drive space is limited, KDE seems to offer better utilities for first timeusers.http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 22: Linux Red Hat 6.2

Monitor Selection

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 23: Linux Red Hat 6.2

X Configuration

• Installer will most likely select the correct video card.

• <Customize X Configuration> allows you to pick bits per pixel and the display size.

• DO NOT forget to click on <Use Graphical Login>.

• Always a good idea to Test Configuration before continuing.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 24: Linux Red Hat 6.2

Point of No Return

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 25: Linux Red Hat 6.2

Boot Disk Creation

• NT users must create a boot disk in order to boot up Linux.

• Boot disk is recommended as sometimes things go wrong, especially if LiLo was not configured correctly.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 26: Linux Red Hat 6.2

And Finally• Remove disk from floppy and let system

reboot.

• After power up sequence is complete, you will see the boot prompt.

boot: Press [Enter] – will boot LiLo’s default entry. Enter boot label [Enter] – will boot

appropriate entry (ie: linux [Enter], win [Enter].

? – Lists available boot options.

Do nothing – after a few seconds LiLo will boot the default entry.

http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/

Page 27: Linux Red Hat 6.2

Getting Started

Configuring Linux

Red Hat Package Manager

Page 28: Linux Red Hat 6.2

Changing Configurations

• At a shell window type: linuxconf

• Linuxconf gives an easy GUI interface to configure your system.

Page 29: Linux Red Hat 6.2

“Programs” in Linux

• Since Linux is open source, not every program you try to install will work as expected.

• Redhat uses RPM (Redhat Package Manager) to allow easy management of linux packages/programs.

• Try to download programs with the .RPM suffix:– RPM will check for package dependencies.– Packages are easy to install using RPM.– Packages that install files in different locations can be

uninstalled cleanly.– A variety of information is contained in every package.

Page 30: Linux Red Hat 6.2

To Install a Package

1. Use KDE GUI.2. Download/obtain the

desired program with .rpm suffix.

3. Click on the file and the kpackage program will automatically be launched.

4. Click Install.

Page 31: Linux Red Hat 6.2

Starting Kpackage

• Make sure you are using KDE GUI.

• Click on the KDE icon Utilities kpackage.

Page 32: Linux Red Hat 6.2

Kpackage

• Read a description about every package.

• Easily search for installed packages.

• Click on <Uninstall> to remove all files with in the package.

Page 33: Linux Red Hat 6.2

End Of Module

Back to Objectives

Page 34: Linux Red Hat 6.2

Remote Login

Page 35: Linux Red Hat 6.2

Remote Login

• Telnet• Rlogin• Secure Shell (SSH)

Page 36: Linux Red Hat 6.2

Telnet

• Telnet is a service provided by many different types of computer systems to enable remote users to log in to their machines over TCP/IP networks.

• The telnet service is available by default on Red Hat Linux systems.

• Before user can use telnet to access the host computer from a remote site, the user needs to have a ‘user name’ and ‘password’ at the host computer.

Page 37: Linux Red Hat 6.2

• This figure shows a host computer with IP address (130.182.215.74) being accessed via Telnet from a remote computer.

• User can either enter the IP address or the name of the host computer such as neptune.calstatela.edu

Page 38: Linux Red Hat 6.2

• Once connection has been established, it will ask for the user name and the password.

• Remember, user needs to have an account at the host computer in order to access it from a remote location.

• This figure shows a user enters the user name and the password in order to login to the host computer.

Page 39: Linux Red Hat 6.2

• If the user enters the correct ‘user name’ and ‘password’, he/she will see the shell prompt.

• In this figure, after the user types the user name (indra) and the password, he will see the shell prompt for the user named “indra”.

• Once in the shell prompt, the user can execute any command from the remote location as though he/she is in the host computer.

• The commands that the user can execute are based on the permission given by the network administrator.

Page 40: Linux Red Hat 6.2

Remote Computer

Host Computer

LinuxWindows 9X

Windows NT

Linux

Unix

Internet

TCP/IP

Telnet

Page 41: Linux Red Hat 6.2

Some Useful Commands• - a

Automatic login. With this option, user’s computer attempts to login to the remote computer using his/her local user name.

• - l user User name. This option is similar to the –a option, except that instead of

using user’s current user name, he/she can ask to log in using any user name he/she choose.

• Ctrl + ] After user does connect to a remote computer, he/she can return to the

telnet session at any time by typing this command.

Page 42: Linux Red Hat 6.2

Rlogin

• It is recommended to use rlogin command between computers within an organization in which the computers are trusted and there are no connections to the outside world.

• It provides a great way for people who work on multiple computers to easily exchange data.

• It can be set up to do no-password logins.

Page 43: Linux Red Hat 6.2

Setting Up User for Rlogin• Individual can create a .rhost file in the user’s home directory. • This file can contain a list of host computers on which the user has

accounts of the same name. • For example, a user named mike on the machine named banana also

has a user login (of the same name) on computers named apple, orange, and grape. He adds the following entries to a .rhost file that looks like the following in the home directory on each computer.

bananaappleorangegrape

Page 44: Linux Red Hat 6.2

APPLE BANANA

GRAPEORANGE

Mike’s Home Directory.rhost file

banana

Apple

Orange

Grape

Mike’s Home Directory.rhost file

banana

Apple

Orange

Grape

Mike’s Home Directory.rhost file

banana

Apple

Orange

Grape

Mike’s Home Directory.rhost file

banana

Apple

Orange

Grape

LANLAN

Page 45: Linux Red Hat 6.2

Using Rlogin

• In the command shell, user needs to type: rlogin hostname

• In the above, hostname is replaced by the computer that you want to log into.

• Once connected, user can access his/her file from any computers that he/she has specified.

Page 46: Linux Red Hat 6.2

Some Rlogin commands• After you have started rlogin, you can use any of

the following key sequences:1. ~.

This causes the rlogin program to exit. User should use this option when the remote shell is hung or if he/she gets stuck at the login prompt (from a forgotten password or logged into the wrong system).

2. ~Ctrl+Shift+zThis puts the current rlogin session in the background, returning user to a local shell command line. To return to the suspended session, type fg.

Page 47: Linux Red Hat 6.2

Comparison Between Telnet and Rlogin

• Telnet is similar to rlogin but it can also be used to access a non-Unix system. Rlogin is available only on Unix, Linux, and other POSIX compliant systems.

• If user connect to a remote Linux system using telnet, it presents him/her with a regular login: prompt, whereas rlogin assumes that your login name on the remote system matches that on your local system.

Page 48: Linux Red Hat 6.2

Secure Shell• The Secure Shell (SSH) is a package that provides shell

services similar to the telnet and rlogin commands, but encrypts the network traffic.

• It uses private key cryptography, so it is ideal for use with Internet connected computers, unlike rlogin.

• Before user can use SSH, he/she needs to install the package where it can be obtained for free in source code form, but its license does place some restrictions on its commercial use.

• To download the package, user needs to go to ftp://ftp.cs.hut.fi/pub/ssh/

Page 49: Linux Red Hat 6.2

After Installing SSH

• Once SSH package is installed, user can access the host computer from the remote site by using the SSH command.

• The host computer should also have the SSH package installed.

• For example, to connect to the system www.abc.com, type:

ssh www.abc.com Continued…

Page 50: Linux Red Hat 6.2

Continue…• If this is the first time user has ever logged into that system

using SSH, it will ask him/her to confirm that he/she really wants to connect. Type yes and press Enter when it asks this:

Host key not found from the list of known hosts.Are you sure you want to continue connecting

(yes/no)?• It should then prompt user for a user name and password

in the normal way. The connection will then function like a normal telnet connection. The only difference is that the information is encrypted as it travels over the network.

Page 51: Linux Red Hat 6.2

End Of Module

Back to Objectives

Page 52: Linux Red Hat 6.2

FTP in Linux

Page 53: Linux Red Hat 6.2

Objectives

• Discuss configuration of Linux FTP Server.• Provide a basic understanding of controlling

permission commands in the configuration of Linux FTP Server.

• Familiarize oneself with FTP Administrative Tools.

Page 54: Linux Red Hat 6.2

Configuring your FTP Server

• Although the default configuration of the FTP server is reasonably secure, you can fine-tune access rights by editing the following files:

• Ftpaccess• Ftpconversions• Ftphosts • Xferlog• Red hat users may find the first three files in /etc

and fourth in /var/log.

Page 55: Linux Red Hat 6.2

Continue…

• With all these files, you can control who connects to your server, when they can connect, and where they can connect from.

• The ftpaccess file is the most significant of these because it contains the most configuration options; however, misconfiguring any of the others can lead to denied service.

Page 56: Linux Red Hat 6.2

Controlling Access

•The ftpaccess file is the primary means of controlling who can access your server.•The ability to control user access to your site is a critical component in fine-tuning your anonymous FTP Server.

Page 57: Linux Red Hat 6.2

Commands for controlling user access

• The class command defines a class of users who can access your FTP server.

• The autogroup command provides tighter controls of anonymous users by automatically assigning them a certain group permission when they log in.

• The limit command enables you to control the number of users according to class and time of day.

Page 58: Linux Red Hat 6.2

Continues….

• The deny command enables you to explicitly deny service to certain hosts based on their names, their IP addresses.

• The loginfails command enables you to disconnect clients after they’ve reached your predetermined number of failed login attempts, and by default, this number is five.

• The following website has lots of FAQs with answers regarding to the controlling access

http://www.wu-ftpd.org/wu-ftpd-faq.html

Page 59: Linux Red Hat 6.2

Controlling Permissions

• To tightly control the permissions of the files placed in the archive

-- Delete tells the server whether FTP clients are

authorized to delete files that reside on the server -- Overwrite Control whether FTP clients can upload files

and replace existing files on the server

Page 60: Linux Red Hat 6.2

Continues…

• If you allow users to upload files to your server via FTP, you might want to set acceptable filenames.

• Path-filter command can enforce this restriction.

• Upload command determines the client’s permissions for placing a file in a specific directory.

Page 61: Linux Red Hat 6.2

FTP Administrative Tools

• Ftpshut Eases the FTP server’s shutdown

procedures, useful when running the server all the time.

• Ftpwho Displays all the active FTP users on the

system.

Page 62: Linux Red Hat 6.2

Continues• Ftpcount A simplified version of ftpwho, shows the

current total of user in each class defined in ftpaccess.

• The following website will show you examples of running these commands

http://www-i2.informatik.RWTH-Aachen.de/arnd/lx_wwwsites.html

Page 63: Linux Red Hat 6.2

FTP Client

• This picture is taken from WS_FTP, most other FTP clients will look similar.

Page 64: Linux Red Hat 6.2

End Of Module

Back to Objectives

Page 65: Linux Red Hat 6.2

VNC

Page 66: Linux Red Hat 6.2

VNC

• Virtual Networking Computing (VNC).• Remote display system which allows you to

view a computing desktop environment, not only on the machine where it is running, but from anywhere on the Internet and a from a wide variety of machine architectures.

Page 67: Linux Red Hat 6.2

Origination

• VNC was a piece of a larger very-thin-client hardware research project at the Olivetti Research Laboratory (ORL).

• Started around 1993.• Teleporting was what is was called for the

X-based predecessors to VNC.• Developed now by AT&T.

Page 68: Linux Red Hat 6.2

Linux Version

• The VNC Linux was created by AT&T.• Linux users can now enjoy working on the

desktops of foreign operating systems with relative ease.

• Major components consists of: an X server (vncserver), a password utility (vncpasswd, and a network communication viewer (vncviewer).

Page 69: Linux Red Hat 6.2

Other Types of Computers and Operating Systems for VNC

• Windows CE 2• Solaris• Macintosh• Win32• DEC Alpha OSF1 3.2• Unix

Page 70: Linux Red Hat 6.2

Linux VNC installation

• Go to www.redhat.com/download• In the RPM search type in VNC• Download the file:

vnc 3.3.3 - 4 .rpm • To work on the desktops of other computers, the

host needs to download and install the VNC software for the desired platform. Any viewer however, can access any type of host.

Page 71: Linux Red Hat 6.2

VNC Components

• VNC consist of two types of component.– Server- which generates a display. – Viewer- which actually draws the display on

your screen.• The server and the viewer may be on

different machines and on different architectures.

Page 72: Linux Red Hat 6.2

Linux Version

• With Linux version of VNC, you can run multiple sessions and connect to different servers. Until you kill a VNC session, it retains its current state. It means that you can disconnect from a session, reconnect later, and return right where you left off. You can even share a session so multiple users can access it.

Page 73: Linux Red Hat 6.2

Other types of remote display protocols

• X-windows system• Citrix’s ICA• Advantages over the two is that it is totally

independent of operating system, windowing system, and applications.

Page 74: Linux Red Hat 6.2

Advantages of VNC

• No state is stored at the viewer.• It is small and simple (less than 180KB).• It is truly platform-independent. It is

compatible with any Java-capable browser.• It is sharable.• It is free.

Page 75: Linux Red Hat 6.2

Disadvantages of VNC

• Bandwidth remains a constraint.• Colorful GUI’s clog a slow network.• pcAnywhere is faster on the supported

machines, once properly configured.• To preserve its simplicity, VNC doesn’t

currently integrate file transfer and printer service.

Page 76: Linux Red Hat 6.2

Download sites for VNC

• www.uk.research.att.com/vnc• www.orl.co.uk/vnc• www.redhat.com/download

Page 77: Linux Red Hat 6.2

X-windows on MAC, Win98 on X-windows

http://www.uk.research.att.com/vnc/screenshots.html

Page 78: Linux Red Hat 6.2

X-Windows on IE, Win98 on Mac IE

http://www.uk.research.att.com/vnc/screenshots.html

Page 79: Linux Red Hat 6.2

Win98, X-Windows on Palm

http://www.uk.research.att.com/vnc/screenshots.html

Page 80: Linux Red Hat 6.2

End Of Module

End of Presentation

Back to ObjectivesBack to Top