Document

advertisement
Basic Linux
Group #3:
•
•
•
•
Ahmad, Indra
Tran, Darren
Young, Kevin
Yuan, Yiqian
Objectives
•
•
•
•
Installing Red Hat Linux 6.2
Remote Login
FTP (File Transfer Protocol)
VNC (Virtual Network Computing)
Linux Installation
Linux Red Hat 6.2
Basic Installation
&
Getting Started
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.
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
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
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.
To Begin Installation
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
• 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.
http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/
Language and Mouse Selection
• Select the Language.
• Select keyboard type.
http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/
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/
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/
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/
Partitions to Add
• Add the following partitions:
Mount Point
/boot
/Swap
/
Type
Linux Native
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.
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/
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/
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/
Time Zone Configuration
http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/
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/
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/
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).
http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/
*If your hard drive space is limited, KDE
seems to offer better utilities for first time
users.
Monitor Selection
http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/
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/
Point of No Return
http://www.redhat.com/support/manuals/RHL-6.2-Manual/install-guide/
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/
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/
Getting Started
Configuring Linux
Red Hat Package Manager
Changing Configurations
• At a shell window type:
linuxconf
• Linuxconf gives an easy
GUI interface to configure
your system.
“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.
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.
Starting Kpackage
• Make sure you are using
KDE GUI.
• Click on the KDE icon 
Utilities  kpackage.
Kpackage
• Read a description
about every package.
• Easily search for
installed packages.
• Click on <Uninstall>
to remove all files
with in the package.
End Of Module
Back to Objectives
Remote Login
Remote Login
• Telnet
• Rlogin
• Secure Shell (SSH)
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.
• 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
• 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.
• 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.
Host
Computer
Remote
Computer
Windows 9X
Windows NT
Linux
Internet
TCP/IP
Unix
Telnet
Linux
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.
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.
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.
banana
apple
orange
grape
APPLE
BANANA
Mike’s Home Directory
.rhost file
Mike’s Home Directory
.rhost file
banana
banana
Apple
Apple
Orange
Orange
Grape
Grape
LAN
ORANGE
Mike’s Home Directory
.rhost file
GRAPE
Mike’s Home Directory
.rhost file
banana
banana
Apple
Apple
Orange
Orange
Grape
Grape
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.
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+z
This puts the current rlogin session in the
background, returning user to a local shell command
line. To return to the suspended session, type fg.
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.
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/
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…
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.
End Of Module
Back to Objectives
FTP in Linux
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.
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.
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.
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.
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.
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
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
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.
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.
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.RWTHAachen.de/arnd/lx_wwwsites.html
FTP Client
• This picture is
taken from
WS_FTP, most
other FTP clients
will look similar.
End Of Module
Back to Objectives
VNC
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.
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.
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).
Other Types of Computers and
Operating Systems for VNC
•
•
•
•
•
•
Windows CE 2
Solaris
Macintosh
Win32
DEC Alpha OSF1 3.2
Unix
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.
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.
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.
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.
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.
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.
Download sites for VNC
• www.uk.research.att.com/vnc
• www.orl.co.uk/vnc
• www.redhat.com/download
X-windows on MAC, Win98 on X-windows
http://www.uk.research.att.com/vnc/screenshots.html
X-Windows on IE, Win98 on Mac IE
http://www.uk.research.att.com/vnc/screenshots.html
Win98, X-Windows on Palm
http://www.uk.research.att.com/vnc/screenshots.html
End Of Module
End of Presentation
Back to Top
Back to Objectives
Download