You are on page 1of 246

Installing Linux

Module 1 – Installing Linux

Overview
This module introduces you to the hardware and
software terminology necessary to install a Linux
operating system. The procedure for installing
Linux and the necessary configuration settings are
described.

Lessons Covered in this module


1. Performing Preinstall Evaluation
2. Performing Installation

© 2006 IIHT
Installing Linux

Lesson 1 – Performing Pre-install


evaluation
Introduction
Linux occupies less amount of space in a system.
However, running a complete Linux system has
certain hardware requirements that are discussed
below.

Topics covered in this lesson


1. Hardware Compatibility
2. Disk Partition Scheme
3. Considerations of Dual Boot

© 2006 IIHT
Installing Linux

Topic 1 – Hardware Compatibility

The installation of an operating system will have its own


hardware requirements. The necessary hardware has to be
checked for its compatibility with the operating system before
installing it.

The hardware units required for installing Linux includes:


1. Central Processing Unit
2. Memory (RAM)
3. Drives
4. Video or Graphics Card

© 2006 IIHT
Installing Linux

Topic 2 – Disk Partition Scheme

Partitioning is one of the methods employed in securing a


system.

Partitioning is dividing a single hard drive into many logical


drives.

In case of partitioning a disk, if a file system gets corrupted


then only the disk having the damaged file system gets
corrupted.

Other partitions will not be affected by the damage caused


by a file system.

© 2006 IIHT
Installing Linux

Topic 3 – Considerations of Dual


Booting
Every distribution of Linux can be installed on only particular
partitions of a hard disk and other partitions can remain untouched.

This ideally implies that Linux permits Microsoft Windows to coexist


with it.

To consider a dual boot system for Linux, a computer should have


one operating system already installed in it.

This means Linux should be installed last in a dual-boot system.

© 2006 IIHT
Installing Linux

Lesson 2 – Performing Installation

Introduction
Linux can be installed in a system through various
methods. On a standalone system, the most convenient
method is to install through a CD-ROM drive. Before
installing Linux, it has to be ensured that the system
meets all the requirements for installation.

Topics covered in this lesson


1. Types of Installation Methods
2. Starting Installation

© 2006 IIHT
Installing Linux

Topic 1 – Types of Installation


Methods
There are four methods available to install Linux on a
system.
They are:
● CD-ROM
● Hard Drive
● Ask Method
● Kickstart

The installer called anaconda, is written in the scripting


language Python

© 2006 IIHT
Installing Linux

Topic 2 - Starting Installation

The first thing in installing Linux is booting off from the CD-
ROM.

At the bottom part of the screen there will be a prompt,


which will read as: boot:

If no key is pressed then the prompt will time out by itself


and start the graphical installation process.

There are settings that have to be configured such as


keyboard, mouse, disk partition etc

© 2006 IIHT
Installing Linux
Conclusion

Ø Summary
Linux can be installed in a system that has other operating
systems like Windows

Minimum hardware requirement has to be met for installing


Linux that includes CPU, Motherboard, Drives and Video cards

Linux can be installed by using several methods such as, CD-


ROM, Hard drive, HTTP, NFS and Kickstart

Ø Question and Answer session

© 2006 IIHT
Installing Linux

Module 2 – Creating and Managing


Users
Overview
One should log into a Linux system with a valid user
name and password granted to perform any task. In this
module we learn about the users and their roles in the Linux
system environment and utilities that can be used to create,
modify, and delete user and group accounts on a Linux
system.

Lessons covered in this module


1. The Root User
2. Creating and Managing User and Groups
3. Configuring Sudo

© 2006 IIHT
Installing Linux

© 2006 IIHT
Installing Linux

Lesson 1 – The Root User

Introduction
Root user also called super user, who has
access to all resources to which the other user
will not have. Root user can modify the ownership
and permissions of the files it does not own.

Topics covered in this lesson


1. Who is a Root User?
2. Role of Root user in System administration

© 2006 IIHT
Installing Linux

Topic 1 - Who is a root User?

Root user is a user who has access to all the commands


and files in Linux operating system

The root user is sometimes referred as super user or


system administrator or administrative user.

The root user has full access to all software and


hardware on the system.

The root user’s account is stored in the directory ‘/root’.

© 2006 IIHT
Installing Linux

Topic 2 - Role of the root User in System


Administration
System administration designates a job position
responsible for running a computer system.

Linux is a multi-user operating system identified by a user


ID and password can make use of the computer system.

In Linux, the role of the root user in system


administration includes:
· User Management
· System Maintenance
· Managing Services
continued…
· Performing Backups

© 2006 IIHT
Installing Linux

Role of root in User Management

The root user has the rights to add or create a new user
account into the system.

The root user has the rights to edit or modify and delete user
accounts.

The root user sets the password aging policy to protect a user
account.

The root user maintains the user accounts in the /home


directory

continued…
The root users can modify, delete group accounts.

© 2006 IIHT
Installing Linux

Role of root User in System


Maintenance
Linux is a complex operating system when it comes
to maintenance.

The root user should develop a test plan for each


change in the system like mounting a directory,
creating a new group.

The system administrator should communicate with


the users about the changes after doing it or in
advance.
continued…

© 2006 IIHT
Installing Linux

Role of root User in Managing


Services
Services can be controlled by GUI (graphical user interface)
and CLI (command line interface) in Linux.

It is preferred to manage services in CLI in Linux.

The system administrator manages the software installation,


upgrade of the software using Redhat Package Manger
(RPM).

The root user configures Network File System, the standard


UNIX file sharing protocol. continued…

© 2006 IIHT
Installing Linux

Role of root in Performing Backups

Data stored in a system is important because of the


time it takes to create it.

So the system administrators will plan convenient


methods to secure the data by taking backups.

The root user has to identify the important data and


allocate space accordingly for storing the data.

© 2006 IIHT
Installing Linux

Lesson -2 Creating and Managing


Users and Groups
Introduction
User account is a resource with which a
person can have access to the system or in
other words, accesses a system. A group of
users who have the same action to perform are
put into one group and a group account is
maintained.
Topics covered in this lesson
1. Creating or Adding Users
2. User Private Groups
3. Modifying Users
4. Deleting Users
5. Group Administration
© 2006 IIHT
Installing Linux

Topic 1 – Creating and Adding Users

New Users can be created or added by using the root privileges.


There are three basic methods of adding users in Linux:

· The /etc/passwd file that contains information about every


user in the system can be hand-edited to add a user.

· Use certain commands like useradd.

· Use the graphical front-end, the Red Hat User Manager

Continue
d..
© 2006 IIHT
Installing Linux

Using Commands

A new user is created or added by using the command-


line utility useradd.

The useradd command is located in the /usr/sbin


directory.

A new user is added into the system by typing:

Syntax: # useradd username


Example: # useradd jack

© 2006 IIHT
Installing Linux

Using Graphical Front-end

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continue
d..
© 2006 IIHT
Installing Linux

Using Graphical Front-end

Go to the Main Menu Button => System Settings


=> Users & Groups

Click on Add User and the do the following


instructions.

Add the user name, full name of the user, password.

Click on OK and the user gets added to the system.

© 2006 IIHT
Installing Linux

User Account Database

The account database consists of account information

Linux database has a standard file /etc/passwd for


user accounts.

The /etc/passwd file has one-line information about


every user on the system.

The /etc/passwd file consists of information on user


and system accounts.

The rights to access /etc/passwd, has to be 644.


© 2006 IIHT
Installing Linux

Topic 2 - User Private Groups

Red Hat Linux has a unique method called user private groups to
ease the management of user and groups.

Whenever a user is added to a Linux system, a user private group


will be created.

The name of the user private group is same as the username and
has the user as its only member.

This will permit the user’s umask to be set to 002 in /etc/profile.

The umask command is used in setting and finding out the


default file creation rights on the system.

© 2006 IIHT
Installing Linux

Topic 3 - Modifying User Accounts

User accounts can be modified manually and by using


a command.

Manually, the user details can be edited in


/etc/passwd file or the command, usermod is used to
modify user account details.

· The syntax is: usermod [options] username

The following options can be used:


-c <comment>

© 2006 IIHT
Installing Linux

Modifying User Accounts using


GUI
Go to the Main Menu Button => System Settings
=> Users & Groups
Right-Click on Users and select the user who has to
be modified
Make the changes and click on Ok
User Properties

© 2006 IIHT
Installing Linux

Topic 4 – Deleting Users

Go to the Main Menu Button => System Settings


=> Users & Groups
Click on Users and select the user who has to be
deleted.
Click on delete.

© 2006 IIHT
Installing Linux

Topic 4 – Deleting Users

The syntax for deleting is userdel username

For example: userdel sam deletes the user with the


username, sam.

If it is required to remove the user account along with its home


directory, then the option ‘-r’ is used.

The syntax is userdel –r username

For example: userdel –r sam will delete the user account sam
along with its home directory.

© 2006 IIHT
Installing Linux

Lab Exercises

§ In this lab you have to use useradd, usermod, and userdel


commands to add, modify and delete user account by
performing the following steps.
1. Create a user with following attributes
User login name: John
Name: John Mathew
UID: 5000
GID: IIHT
Shell: /bin/bash
2. Change password for John to 123abcABC
3. Try to login with John
4. Delete the John account so that its home directory also
removed.

© 2006 IIHT
Installing Linux

Topic 5 - Group Administration

Group Administration means managing groups

New groups are added, existing groups are modified,


group rights are set, and groups are deleted.
Groups as in the Red Hat User Manager

Continued..

© 2006 IIHT
Installing Linux

Topic 5 - Group Administration

The file /etc/group provides group account information.

New groups may be generated by manually editing the file


/etc/group or by using groupadd.
The syntax is: # groupadd groupname

To delete or remove groups, groupdel is used.


The syntax is: # groupdel groupname

To change the name of the group, groupmod can be used.


The syntax is: # groupmod –n newname oldname

© 2006 IIHT
Installing Linux

Topic 6 - Switching Accounts


In Linux, to change user without logging out, the command
su (derived from super user) is used.

The syntax for switching accounts using su command is:


su [options] username

System administrators use this command frequently to


become the root user without the user logging out.

When the account is switched, the password of the account


has to be given unless you are logged in as root.

© 2006 IIHT
Installing Linux

Topic 7 - Password Aging Policies


Password aging means that after certain time, generally 90 days,
the user will be asked to replace his password with a new one.

As a method to secure passwords, password aging technique is


used by system administrators .

Password aging prevents an intruder using the cracked password


only for a certain amount of time.

There are two methods to set password aging.

One way is to use the command chage and the other using the
graphical application User Manager.

© 2006 IIHT
Installing Linux

Using command chage

First method is the use of chage command

The maximum period of time-of-validity of a password can be


set before the system prompts the user to change his
password.

The time given for password changes is usually guided by the


security policy of an organization.

The minimum period of time also has to be set for a password


to be in use.

The syntax is # chage [options] username

© 2006 IIHT
Installing Linux

Using Graphical User Manager

Password Aging Policy


Click to edit Master text styles
Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Using Graphical User Manager

Use the graphical User Manager application to create


password aging policies for a user.

· Go to the Main Menu Button => System Settings


=> Users & Groups

· Click on the Users tab, select the user from the user list,
and click Properties from the button menu

· Then click the Password Info tab and enter Days


before change required

© 2006 IIHT
Installing Linux

Lesson 3 - Configuring sudo

Introduction
sudo (superuser do) permits a system
administrator to grant certain users (or groups of
users) the permission to run some (or all) commands
as root while logging all commands and arguments..

Topics Covered in this Lesson


1. Sudo configuration

1. Using sudo

© 2006 IIHT
Installing Linux

Topic 1 - sudo Configuration

The command, sudo permits a user with proper permissions


to execute a command as the superuser or other user.

The file /etc/sudoers controls the sudo access.

An editor and syntax checker, visudo edits the file


/etc/sudoers.

sudo is easy to configure and is used in a straightforward


syntax.

sudo commands use a basic syntax.

© 2006 IIHT
Installing Linux

Topic 2 - Using sudo

The sudo utility helps in overcoming this difficulty faced while


managing a server or system by several people

The sudo utility permit users defined in the /etc/sudoers


configuration file to have temporary access

The commands can be run as user "root" or as any other user


as in the /etc/sudoers configuration file.

The privileged command to be run should first start with the


word sudo followed by the command's regular syntax.

Continued…

© 2006 IIHT
Installing Linux

Topic 2 - Using sudo

For example

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Conclusion
Ø Summary

A root user is a user who has access to all the


resources that are restricted to other users.

A new user account is managed in the Linux


database system by using command utilities or
graphical front-end.

sudo (superuser do) is a program which can be


used by normal users to execute programs as root
user
© 2006 IIHT
Installing Linux

© 2006 IIHT
Installing Linux

Module 3 – Understanding File


Listing, Ownership and Permission
Overview
In any operating system, there are files, whose
access has to be limited only to certain users like
owner of the file or users of a specific group etc. In
order to make files secure and organized, file
permissions have to be set.

Lessons Covered in this lesson


1. Understanding File Listing, Ownership and
Permission

© 2006 IIHT
Installing Linux

Lesson 1 - Understanding File


Listing, Ownership and Permission
Introduction
Linux is a multi-user system where users can assign
different access permission to their files. Access
permissions can be set per file for owner, group and
others on the basis of read (r), write (w) and execute
permissions (x).

Topics Covered in this Lesson


1. File Permissions and Access
2. Types of Access
3. Who has to Access to a File?
4. Access Control Lists

© 2006 IIHT
Installing Linux

Topic 1 – File Permissions and


Access
File permissions specifies about the details like who have
the access to file and what type of access the user has.

Each file is owned by a particular user. However, files are


also owned by a particular group, which is a defined
group of users of the system.

Types of permissions
● r – read
● w –write

x –execute

© 2006 IIHT
Installing Linux

Topic 2 - Types of Access

In Linux, every file or folder has access permissions.


There are three types of permissions.
∙ read access
∙ write access
∙ execute access

Limitations of access permissions


If the file is read only it cannot be writable and the directory
should have execution permission to open the directory.
Example: -rw-r--r--

© 2006 IIHT
Installing Linux

Default file permissions

By default the linux system assigns certain


permissions to a newly created file.

Displaying the umask


Displaying the default umask value

© 2006 IIHT
Installing Linux

Default file permissions

Changing the umask


To change the default umask use the command
Syntax
# umask <umask value>
Example: umask 004

© 2006 IIHT
Installing Linux

Textual representation of "-rwxr--


r--"
It consists of 10 characters. The first character shows the file
type.

Next 9 characters are permissions, consisting of three groups:


owner, group and others.

Each group consists of three symbols: rwx, if some permission


is denied, then a dash "-" is used instead.

Example:
-rwxr--r--

© 2006 IIHT
Installing Linux

Numeric (octal) representation

If a numeric representation is used, then it is in the octal format with


the base of 8, and digits involved are 0 to 7.

Octal format is used for the simplicity of understanding, every octal


digit combines read, write and execute permissions together.

Respective access rights for owner, group and others are the last
three digits of the numeric file permissions representation.

Here,
‘1’ stands for execute only,
‘2’ stands for write only,
‘4’ stands for read only.

© 2006 IIHT
Installing Linux

Difference in access permissions


for files and folders
Difference in access permissions for files and
folders

© 2006 IIHT
Installing Linux

Topic 3 – Who has Access to a File?

The owner and the root have the main access rights
over a file.

In the above example, the first column gives the


access permissions to the user, group and others.

The second column shows the user or owner of the


© 2006 IIHT
Installing Linux

Topic 4 - Access Control Lists

An access control list (ACL) is an object that


contains entries specifying the access that
individual users or groups of users have to the file.
Using the chmod command the user can set
permissions to owner, group or others.
Setting ACL using Setfacl:
setfacl - set file access control lists

© 2006 IIHT
Installing Linux

Topic 4 - Access Control Lists

Getting ACL using getfacl


The getfacl displays the file name, owner, the
group, and the Access Control List (ACL). Syntax
# getfacl <filename>
Snapshot showing getfacl

© 2006 IIHT
Installing Linux

Topic 4 - Access Control Lists

Copying ACL
The acl’s can be copied to any files, for which the
files get the same acl permissions from its source file.
Syntax
getfacl <acl filename> | setfacl --set-file= -
<filename>

© 2006 IIHT
Installing Linux

Lab Exercise
Exercise : In this lab you have to use
useradd, usermod, chmod and chgrp
commands to restrict the user to their
department directory.
Perform the following steps.
1. Create users, john, sam, tom, peter, joe,
Mathew, and steve

2. Create the following groups with the group


IDs as give below and use -g option
Group GID
----- -----
sales 10000
© 2006 IIHT
hr 10001
Installing Linux

Lab Exercise

3. Add users to the following group by using usermod command


with –G option
a. add john, sam to sales group
b. add tom and peter to hr group
c. add joe and mathew to web group
d. add steve to all group

4. Login as each user and use the id command to verify that


they are in the appropriate groups

5. Create a directory called /depts with a sales, hr, and web


directory with in the /depts directory.

© 2006 IIHT
Installing Linux

Lab Exercise

6. Change group ownership of each directory to the group that


matches with it.

7. Set the permission on the /depts directory to 755 and each


subdirectory to 770.

8. Set the sgid bit on each departmental directory so that files


created within those directory owned by the appropriate group.

9. Check by logging in as each user and creating or altering files


in each of the directories. Only Steve should be able to enter all
directories

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary
File permissions protect user files from accessing by other
users

The file system can be accessed by the owner and has the
control over the attributes and access to a file

A file attribute contains the basic and extended permissions


that control access to the file

Ø Question and Answer Session

© 2006 IIHT
Installing Linux

Module 4 – Configuring Disk


Devices
Overview
This module deals with making partitions using fdisk,
implementing RAID and Logical Volume Management.
RAID is implemented in Linux systems to provide data
redundancy. Logical Volume Management for making
the file system management easy

Lessons in this module


1. Partitioning Using fdisk
2. Implementing RAID
3. LVM for Linux

© 2006 IIHT
Installing Linux

Lesson 1 – Partitioning using fdisk

Introduction
Partitioning is done using several utilities. One
such utility is fdisk used for performing disk
partitions. It is a tool that permits modifying the
partitions already made on a hard drive. fdisk is
the conventional tool for managing partitions.

Topics Covered in this Lesson


1. Partition a disk by using fdisk

© 2006 IIHT
Installing Linux

Topic 1 – Partition a disk using


fdisk
fdisk is the utility used to partition a hard disk.
While partitioning a disk, if fdisk is chosen; the next
screen will prompt you to select a drive to partition
using fdisk

© 2006 IIHT
Installing Linux

List of fdisk commands

list of the fdisk commands

© 2006 IIHT
Installing Linux

Creating Partition
Creating partition can be started by running the
command n.

© 2006 IIHT
Installing Linux

Creating Partition

nning partprobe, run fdisk -1 to check the partitions.

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Hex code (type L to list codes)

Running t command will give the range of partition


numbers and type whichever partition has to be
changed.

© 2006 IIHT
Installing Linux

Hardware Browser
The details of the partitions are done using the
hardware browser. Hardware browser can be seen
by typing hwbrowser at a shell prompt.
Otherwise click on Main Menu =>System Tools
=> Hardware Browser

© 2006 IIHT
Installing Linux

Lesson 2 – Implementing RAID

Introduction
RAID, an acronym for Redundant Array of Independent
Disks or Redundant Array of Inexpensive Disks is a
method of combining several physical disks to make a
virtual disk. It is implemented in the system to increase
performance, speed and increase the size and to
provide data redundancy.

Topics Covered in this Lesson


1. What is RAID?
2. Various RAID levels
3. Implementation of RAID

© 2006 IIHT
Installing Linux

Topic 1 - What is RAID?

RAID is an acronym for Redundant Array of Inexpensive


Disks or Redundant Array of Independent Disks.

It is called an array of independent disks because even if


one disk gets damaged the data can be retrieved from other

The function of the other disks does not get affected.

It is a method of creating one virtual disk by putting


together several physical disks.

© 2006 IIHT
Installing Linux

Topic 2 - Various Levels of RAID

There are various levels of RAID as listed below


∙ RAID Level 0
∙ RAID Level 1
∙ RAID Level 2
∙ RAID Level 3
∙ RAID Level 4
∙ RAID Level 5
∙ RAID Level 6
∙ RAID Level 7
∙ RAID Level 0+1
∙ RAID Level 1+0

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

The RAID virtual device should be created using the


command mkraid in Enterprise Linux 3 and mdadm
in Enterprise Linux
For example, consider Implementing RAID level 5

Continued…

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…
© 2006 IIHT
Installing Linux

Topic 3 – Implementing RAID

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Corrupting one of the partitions in


the RAID device
Click to edit Master text styles
Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Adding the partition to the RAID


array

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise Software RAID

Configure the lab by performing the following instructions:


1. Create three partitions 100M each and partition type (0*fd)
2. Create a software raid with the help of these partitions
3. Create one directory test0 and mount your raid partition under
this directory
4. Give entry in fstab file so that your RAID partition gets mounted
at the boot time
5. Try to remove one of the three partitions and then add new
partition to it

© 2006 IIHT
Installing Linux

Lesson 3 – LVM for Linux

Introduction
Linux has support for Logical Volumes that makes
the file system management easy. The Linux Logical
Volume Management will introduce an abstraction
layer between the physical disk and the file system.

Topics covered in this lesson


1. Logical Volume Management or LVM
2. Implementing LVM
3. Advanced Concepts of LVM

© 2006 IIHT
Installing Linux

Topic 1 - Logic Volume


Management or LVM
LVM stands for logical volume management and is a
hard disk drive partitioning scheme

There are two version of LVM for Linux and they are,
LVM1 and LVM2

The following terms are associated with LVM


∙ Physical Volume (PV
∙ Physical Extent (PE)
∙ Logical Extent (LE)
∙ Logical Volume (LV)
© 2006 IIHT
∙ Volume Group (VG)
Installing Linux

Topic 2 – Implementing LVM


The steps that have to be performed for implementing LVM are as
given below:

1. Initializing disks or disk partitions

1. Creating a volume group

1. Creating a logical volume

1. Extending a logical volume

© 2006 IIHT
Installing Linux

Topic 3 – Advanced concepts of LVM

LVM has built-in support for striping and mirroring and


can be used with hardware or software RAID to offer
configurable, fast and reliable disk storage

LVM Snapshots
∙ The built-in support for mirroring also offers the
concept of snapshots.

∙ Snapshots of immediate mirrors of logical volume


are taken onto free space within the volume group.

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise Creating Logical Volume Manager


Create LVM by performing the following
instructions:
1. Create three partitions, each with 100M size and
partition type (0*8e)
2. Create a volume group name IIHT
3. Create logical volume space 40M name data
4. Extend your logical volume up to 60M
5. Extend your volume group up to next partition
6. Remove your LVM configuration

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

fdisk is a utility to create partitions. Using fdisk, it is possible


to create a partition and also delete a partition

RAID is implemented to copy data and spread blocks of a file


across several disk drives.

LVM provides support to manage file system easily.

Ø Question and Answer Session

© 2006 IIHT
Installing Linux

Module 5 – Creating and Managing


Overview
File Systems
This module deals with the structure of the file system,
the standard types of file system in Linux. This module
also deals with the file system structure, mounting file
system and unmounting file systems and disk quotas.
Lessons covered in this module
1. File System Structure
2. ext2 and ext3 File System
3. Creating File Systems
4. Checking File Systems
5. Mounting and Unmounting File Systems
6. Disk Quotas

© 2006 IIHT
Installing Linux

Lesson 1 – File System Structure

Introduction
A file system is a data structure which interprets the
physical sector of a disc into logical directory structure.
The logical structure will help computers and users to
trace files. The file system registers the location of the
files and directories on the disc

Topics Covered in this Lesson


1. What is File System Structure
2. File System Hierarchy Standard
3. Special File Locations under Red Hat Linux Standard

© 2006 IIHT
Installing Linux

Topic 1 – What is File System Structure

The file system structure is the most basic level of


organization in an operating system.
A file system is an organization of storage space
intended to contain files in directories. Providing a
common file system structure ensures users and
programs are able to access and write files.
File Systems are divided into two categories:
Static and dynamic files.

Continued…

© 2006 IIHT
Installing Linux

The Virtual File System (VFS)

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

Continued…

© 2006 IIHT
Installing Linux

Topic 2 – File System Hierarchy


Standard
• Red Hat Enterprise Linux uses the File System
Hierarchy Standard (FHS) file system structure
Linux Directory
Structure
Click to edit Master text styles
Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Topic 3 – Special File Locations


under Red Hat Linux Standard

Red Hat Enterprise Linux has made an extension of FHS


structure slightly to contain special files.

Files related to RPM (Red Hat Package Manager) are


placed in the /var/lib/rpm directory.

The /var/spool/up2date/ directory holds files used by


Red Hat Update Agent..

The /etc/sysconfig directory is also specific to Red Hat


Enterprise Linux.

© 2006 IIHT
Installing Linux

Lesson 2 – ext2 and ext3 File


system
Introduction
Linux supports several file systems but the most
commonly used was the Second Extended or ext2 file
system. Now the ext2 file system has been replaced by
Third Extended or ext3 file system, which is a journaling
version of ext2 file system.

Topics covered in this lesson


1. Second extended or ext2 File System
2. The ext3 File System
3. ext2 and ext3 File System Attributes

© 2006 IIHT
Installing Linux

Topic 1 – Second extended or ext2


File System
In Linux, the ext2 file system or second extended file
system was the file system by default.

It supports partitions that are up to 4 terabytes or


4096 Gigabytes in size and a file of up to 2 Gigabytes
in size.
Physical layout of the ext2 File System

© 2006 IIHT
Installing Linux

The ext2 Inode


he ext2 file system, the inode is the basic building block;
y file and directory in the file system is
cribed by one and Click
only to editinode
one Master text styles
Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

ext2 Directories

In the ext2 file system, directories are special files


that are used to create and hold access paths to the
files in the file system

© 2006 IIHT
Installing Linux

Topic 2 – The ext3 File System

This is the third extended file system, ext3 is used by Linux


currently and it is a journaling file system.

Journaling file system keeps temporary data in a new location,


unrelated to the permanent data and metadata on disk.

ext3 file system is an enhanced version of the ext2 file system

There are several advantages of ext3 File system over ext2 file
system

© 2006 IIHT
Installing Linux

Topic 3 - ext2 and ext3 File System


Attributes
Besides to the UNIX-derived modes of permission, the ext2
file system structure gives a few data controls or attributes.
To enable file attributes, the following command is used:
Chattr +|-| = [attribute…] file [file….]
Some of the attributes given below may be enabled:
A
when a file is modified, its atime record is not modified.
D
the file is skipped for backup by dump.

© 2006 IIHT
Installing Linux

Lesson 3 – Creating File Systems

Introduction
File systems are created on the partitions. The partitions
have to be created before creating a file system. By
default ext2 file system is generated when the ‘make file
system’ command is used. But now ext3 is the file system
by default

Topics Covered in this Lesson


1. Creation of an ext2 File System
2. Creation of an ext3 File System
3. Conversion of ext2 to ext3 File System

© 2006 IIHT
Installing Linux

Topic 1 - Creation of an ext2 File


System
mkfs is a standard utility used in creating file systems. By
default mkfs creates ext2 file system. The command
given below will create an ext2 file system.

[root@localhost ~]# mkfs /dev/hda1

The above command when executed will create an ext2


file system on the first primary partition and on the first
IDE hard drive

© 2006 IIHT
Installing Linux

Topic 2 - Creation of an ext3 File


System
Installation of Red Hat Linux will use ext3 for all file
systems by default. After partitioning a hard disk, an
ext3 file system can be created by using the
command

[root@localhost ~]# mkfs –j ext3 /dev/hda1

This command will generate an ext3 file system on


the first partition and on the first IDE hard drive

© 2006 IIHT
Installing Linux

Topic 3 - Conversion of ext2 to ext3


File System
Converting an ext2 file system into an ext3 file system can be
done using root privileges and the below command
tune2fs –j <file system>

For example,
tune2fs –j /dev/hda7

The command df is run that will display mounted file systems.


After running the above commands, the partition type has to be
changed from ext2 to ext3 in the /etc/fstab file.

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise 1 Creating Partition


In this lab you have to create a 100M partition with
ext2 file system by using fdisk and then convert ext2
file system to ext3 file system.

© 2006 IIHT
Installing Linux

Lesson 4 – Checking File Systems

Introduction
File systems needs to be maintained and periodic
checks have to be performed on the file systems.
This is one of the tasks of the system
administrator. Linux has a utility that checks and
repairs the file system at every reboot and
performs the process quickly

Topics covered in this Lesson


1. Maintaining File Systems

© 2006 IIHT
Installing Linux

Topic 1 - Maintaining File Systems

System administrators’ tasks include maintaining


file systems periodically.

Checking File Systems


∙ The utility fsck which means ‘file system
check’ is used generally to check and repair
file system

© 2006 IIHT
Installing Linux

File System Labels


The e2label command is used to view what the ext2 label is by
indicating the raw device for the file system.

[root@localhost ~]# e2label /dev/hda2


/usr

A new label can be set using the command given below


[root@localhost ~]# e2label /dev/hda5 /iiht

After setting labels, the mount command can be used with labels
and it will mechanically trace the proper underlying device.

For example: # mount LABEL=/iiht /iiht

© 2006 IIHT
Installing Linux

Lesson 5 – Mounting and


Unmounting File Systems
Introduction
Mounting a file system is instructing the operating
system to make a file system available for use at a
particular location. That particular location is called
mount point. When the user no longer uses this file,
then that file system should be unmounted

Topics Covered in this lesson


1. Mounting File Systems
2. Unmounting File Systems

© 2006 IIHT
Installing Linux

Topic 1 – Mounting File Systems

A file system is mounted on a directory so that it is accessible to


the users

A file system is mounted on a directory so that it is accessible to


the users

Using the mount command


The basic command used
       [root@localhost ~]# mount device directory
If options are used then:
[root@localhost ~]# mount <options> device
directory

© 2006 IIHT
Installing Linux

Topic 2 – Unmounting File Systems

Linux will allow only the file systems that are not in
use to be unmounted.

The command used to unmount a file system is:


[root@localhost ~]# umount device directory
where directory is the directory to be unmounted.

Note: the command used is spelt as umount and not


unmount

© 2006 IIHT
Installing Linux

Lesson 6 – Disk Quotas

Introduction
In a multi-user system environment, it is very common to
have problems like some users utilizing disk space more
than they require. This problem can be completely
rectified by using Disk Quotas feature of Linux.

Topics Covered in this lesson


1. What are Disk Quotas?
2. Implementing Disk Quota
3. Disk Quota Settings Configuration
4. Managing Disk Quotas

© 2006 IIHT
Installing Linux

Topic 1- What are Disk Quotas?

In a multi-user environment, problems such as some users


utilizing more than required space persists and this can be
rectified by many methods.

These methods include requesting the users to utilize some


amount of space as required by them and disk quotas.

The disk quota is a successful method of Linux that permits


the system administrator to distribute amount of disk space.

Assigning disk quotas is flexible and is implemented per file


system.

© 2006 IIHT
Installing Linux

Topic 2 – Implementing Disk Quotas

Disk quotas can be established by inodes or by blocks on


user or group levels.

The procedure involved in the configuration of disk quotas


is as given below:

∙ The file system should be mounted with the


usrquota and (or) or grpquota option.
∙ Quota configuration files, aquota.user and
aquota.group
∙ Kernel support for disk quotas should be made active
∙ Allocate user and (or) or group quotas as proper
through the edquota command

© 2006 IIHT
Installing Linux

Topic 3 – Disk Quota Setting


Configuration
Disk quotas can be created, modified and eliminated by
using edquota command.

For example:
[root@localhost ~]# edquota user1

The above command will start vi editor on a transient text


file.

The values are to be modified in the proper column and


the user can exit the file after saving it

© 2006 IIHT
Installing Linux

Topic 4 – Managing Disk Quotas

Managing and checking disk usage of a file system can be done


using commands:
∙ quotacheck
∙ repquota
∙ quota

The reliability of the quota database is verified by using the


quotacheck command

The repquota command will make a summarized report of disk


quota usage on the system

The quota command is used to check quota usage on a system-


wide

© 2006 IIHT
Installing Linux

Topic 4 – Managing Disk Quotas


quota report of partition /dev/hda10

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise - Implementing Disk Quota


In this lab you have to create a partition and implement a
disk quota on that partition. You have to perform the
following steps:
Create a partition and mount that partition with usrquota
option
Enable the quota on that partition
Create a user test1 password test1
Set the (number of file ) soft and hard limit for user test1 to
3 and 5

© 2006 IIHT
Installing Linux

Conclusion
Ø Summary

File System Structure is the fundamental level of organization in


an operating system

File system is created using mkfs i.e. ‘make file system’


command.

Mount and umount commands are used to mount and unmount


file systems respectively

The disk quota is a successful method of Linux for allotting disk


space

Ø Question and Answer session

© 2006 IIHT
Installing Linux

Module 6 – File System Backup

Overview
This module deals with the causes for data loss and
data corruption, performing backups using backup
tools and restoring them. The setting up of
automation processes are discussed in this module,
by using automation tools such as at and cron.
Topics covered in this Lesson
1. Causes for Loss or Corruption of Data
2. Using Backup Tools
3. Task Automation

© 2006 IIHT
InstallingFile
Linux
system
Backup

Lesson 1 – Causes for Loss or


Corruption of Data
Introduction
In a computer, data can be lost due to several factors and
it cannot be ensured that the data would be safe without
taking proper measures. Data could be lost due to failure
in hardware, software. environmental issues and human
errors

Topics covered in this Lesson


1. Loss and Corruption of Data Caused by Hardware
2. Loss and Corruption of Data Caused by Software
3. Environmental causes for Data Loss and Corruption
4. Human Errors

© 2006
© 2006IIHT
IIHT
Limited
Installing Linux

Topic 1 - Loss and Corruption of


Data Caused by Hardware
Loss and corruption of data due to hardware is very
easy to figure out
But it is more complex to figure out the nature of
hardware failure.
It is always advisable to have spare hardware to
replace the defective hardware.
It is also good to have service contracts so that
whenever hardware problems occur.

© 2006 IIHT
Installing Linux

Topic 2 - Loss and Corruption of


Data Caused by Software
Loss of Data can happen due to two reasons:
∙ Operating system
∙ Applications

Data loss due to Operating System Failure


∙ Operating systems failure can destroy the data
that the computer was running at the time of
failure.
∙ Operating systems failure can happen from
crashes and hangs

© 2006 IIHT
Installing Linux

Topic 2 - Loss and Corruption of


Data Caused by Software
Data loss due to Application Software Failure

∙ Application software failures do not have devastating effect


on the productivity of the computer and the damage is
relatively less

∙ Based on application, a single application failure can have


an impact on a single user.

∙ But if it happens to be a server application providing


service to several client applications, then the effect of
failure would be too much.

© 2006 IIHT
Installing Linux

Topic 3 - Environmental Causes for


Data Loss and Corruption
The data will be lost sometimes despite the hardware and
software running in good condition.

This may be due to physical environment in which the system is


placed.

The environmental causes can be classified into four kinds:


∙ Building
∙ Electricity
∙ Air Conditioning and Ventilation
∙ Weather and the outside world

© 2006 IIHT
Installing Linux

Topic 4 – Human Errors

Human errors also cause computer errors that may


result in data loss.

The common kinds of human errors are:


∙ End-user Errors
∙ Operations Personnel Errors
∙ System Administration Errors
∙ Service Technician Errors

© 2006 IIHT
Installing Linux

Lesson 2 – Using Backup Tools


Introduction
In Linux, backups are about packaging and unpackaging
files as configuration files and kernels are mostly system
independent. File systems are taken as backups as
unforeseen disasters can happen and the data can be
lost.

Topics covered in this Lesson


1. Tar
2. Cpio
3. Dump and restore
4. Compression Tools

© 2006 IIHT
Installing Linux

Topic 1 - Tar

The tar utility is popular among Unix system


administrators.

To perform the backup of files use the following


command
Syntax tar –cvf <destination> < source>
Example: tar –cvf /backup/home.back /home

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise - Performing backup with tar


In this lab you have to take a backup with tar.
Create a directory name IIHT and some files named
p1, p2, p3 and p4. Take the backup of the IIHT in
newly created sam folder with name as backup.
Create one folder name John and restore your backup
in that folder.

© 2006 IIHT
Installing Linux

Topic 2 - Cpio

Cpio, a conventional Unix program can be used to back up the


file systems.

The syntax is, cpio flags [options]

Syntax for creating the cpio file


find (source file name) | cpio –(options) > (target file name)

Example: find file1 | cpio -o > file1_back.cpio

Syntax for extracting the cpio file


cat <source file name> | cpio –(options)
Example: cat file1_back.cpio | cpio –idvm

© 2006 IIHT
Installing Linux

Topic 3 – Dump and restore

dump and restore commands are the two different


programs that are included in the dump package

To backup the directory into a file use the dump


command
Syntax
dump - <dump levels> - <options> <destination
name> <source name>
Example:
dump -0 –f /home_dumps/mydumps /home
Continued..

© 2006 IIHT
Installing Linux

Usage of dump command

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

restore

The restore command is used to view and restore


the dump file.
Syntax
# restore - <options> <file name>
Example:
restore –if mydumps restoration of the
dump file

© 2006 IIHT
Installing Linux

Topic 4 - Compression Tools

Compression tools are used for performing backups.

There are several compression tools available in Linux and they


are:
● zip
● unzip
● gzip
● gunzip
● bzip2
● bunzip2

© 2006 IIHT
Installing Linux

Lesson 3 – Task Automation

Introduction
Task automation commands are required to run
during non working hours as it will not interrupt
usual business hours. The at daemon (atd) and
cron daemon (crond) can be used for scheduling
commands

Topics covered in this lesson


1. At
2. Cron

© 2006 IIHT
Installing Linux

Topic 1 - At

To run processes at a particular time, the at utility can be used.

The at daemon, atd can be used for scheduling a command to


run once in the future

There are two access control files created to identify the users,
to use the at command and they are:
● /etc/at.allow
● /etc/at.deny

© 2006 IIHT
Installing Linux

Topic 2 - Cron

Tasks can be scheduled to run without being attended through


the cron command.

Error messages or output that have not been readdressed


anywhere, are emailed to the user who did the task submission.

Tasks can be scheduled to run without being attended through


the cron command.

There are two access control files that restrict users to use cron
command and they are:
● /etc/cron.allow
● /etc/cron.deny

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

There are four different kinds of causes for data loss ,


which are hardware-related, software-related
environmental and human errors

File systems are taken as backups using tools such as


tar, cpio, dump and restore, and compression tools

The at and cron commands are used to schedule a


task.
© 2006 IIHT
Installing Linux

Module 7 – Linux Boot Loaders

Overview
A boot loader is a small program that exists in the
system and loads the operating system into the
system’s memory at system boot. This module
deals with two most popular boot loaders of
Linux, LILO and GRUB.

Lessons Covered in this module


1. Lilo Loader
2. Grand Unified Boot Loader

© 2006 IIHT
Installing Linux

Lesson 1 – Lilo Loader

Introduction
LILO or Linux Loader is a boot loader for Linux. A
boot loader is a small program that exists in the
system and loads the operating system into the
system’s memory when the system boots. Boot
loader also starts the operating system.

Topics Covered in this lesson


1. LILO, the Boot Loader
2. Configuring LILO

© 2006 IIHT
Installing Linux

Topic 1 – LILO, the Boot Loader

LILO is a flexible boot loader for Linux, which is independent of a


file system.

LILO loads itself into the computer’s memory in two stages

Stage1 – This stage, also known as primary boot loader is read


into
memory by the BIOS from the master boot record

Stage 2 - This stage, also known as secondary boot loader is


read into memory and it displays the Red Hat Linux initial screen

© 2006 IIHT
Installing Linux

Topic 2 – Configuring LILO

To install LILO, it is necessary to know the location


of /boot partition.

It is also necessary to know the location of other


installed operating systems

LILO can be installed for the first time using a shell


script named QuickInst

LILO can be uninstalled using the lilo –u command

© 2006 IIHT
Installing Linux

Lesson 2 – Grand Unified Boot


Loader
Introduction
Grand Unified Boot loader or GRUB is a boot loader
which operates like LILO and it is presently the
default boot loader. GRUB sets the user to select
the operating system or kernel to be loaded when
a system boots up. It also permits the users to
pass arguments.

Topics covered in this lesson


1. GRUB, Grand Unified Boot Loader
2. GRUB Installation and Configuration
3. GRUB and the Boot Process

© 2006 IIHT
Installing Linux

Topic 1 – GRUB, Grand Unified Boot


Loader
GRUB an acronym for Grand Unified Boot loader, is a
program or boot loader.

It lets the user to pass arguments to the kernel GRUB


will install a boot loader to the MBR

GRUB will permit to set particular instructions in the


MBR.

These instructions also include passing special


instructions to kernel when they boot or find system
parameters before system boot.

© 2006 IIHT
Installing Linux

Some of the important features of


GRUB
GRUB has the provision of a true command-based, pre-
OS environment on x86 machines.

This will help the user in being more flexible in loading


operating systems with denoted options or collecting
information about the system

GRUB will support Logical Block Addressing (LBA) mode

ext2 partitions can be read by GRUB.

© 2006 IIHT
Installing Linux

Topic 2 – GRUB Installation and


Configuration
GRUB can be installed during installation and also post installation..

GRUB Configuration

When Grub is installed two configuration files are created and they are

∙ /boot/grub/grub.conf is the configuration file of GRUB.

∙ /etc/grub.conf is a link file to /boot/grub/grub.conf and the user


can make the configuration changes here

Continued..

© 2006 IIHT
Installing Linux

Sample copy of Grub.conf file

Click to edit Master text styles


Second level
● Third level

● Fourth level

● Fifth level

© 2006 IIHT
Installing Linux

Topic 3 - GRUB and the Boot


Process
Grub gets loaded into the memory of the system in the following stages:

1. The Stage 1 or primary boot loader is read into memory by the BIOS
from the master boot recorder (MBR).

1. The Stage 1.5 boot loader is read into memory by the Stage 1 boot
loader if required.

1. The Stage 2 or secondary boot loader is read into memory.

1. The secondary boot loader will read the operating system or kernel
and the contents of /boot/sysroot/ into memory

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

LILO, the Linux loader is the boot loader for Linux which boots the
operating system whenever the system boots

The configuration file of LILO is maintained in /etc/lilo.conf file

GRUB, an acronym for Grand Unified Boot loader is the most


commonly used boot loader for Linux
Red Hat Linux has /boot/grub/grub.conf as the configuration file.

Ø Question and Answer Session

© 2006 IIHT
Installing Linux

Module 8 – Managing Software


using RPM
Overview
In Linux, Red Hat Package Manager referred as RPM
is a tool used for managing software packages and
its main function is to permit the installation and
deletion of software packages. This module deals
with the installation, verification and deletion of
software using rpm.

Lesson covered in this lesson


1. Installing Software
2. Viewing Software
3. Removing Software

© 2006 IIHT
Installing Linux

Lesson 1 – Installing Software


Introduction
Red Hat Package Manager referred as RPM is a tool
or in Linux for software package management that
is used to maintain a database of software and their
files. RPM is used to install software .

Topics covered in this lesson


1. Red Hat Package Manager
2. Installing Software through Command Line Interface
3. Installing Software through Graphical Method

© 2006 IIHT
Installing Linux

Topic 1 – Red Hat Package Manager

Red Hat Package Manager, referred as RPM is a tool in


Linux for software package management .

A RPM file comprises of all the files essential for


running a specific program, and the important scripts
to carry out the installation on its own

The RPM tool carries out common management of all


the RPM packages, which are installed on a particular
host

© 2006 IIHT
Installing Linux

Topic 2 - Installing Software


through Command Line Interface
RPM packages are installed using the –i option to the rpm command.

For example if the package, bash-3.0-18.src.rpm has to be


installed then the below command can be given.

[root@localhost ~]# bash-3.0-18.src.rpm

Conventionally –i option is also used with –v option that makes rpm


to be more verbose.

The –h option makes rpm to display progress meters as given below


# rpm -ivh evolution-2.0.4-6.src.rpm

© 2006 IIHT
Installing Linux

Topic 3 - Installing Software


through Graphical Method
To install new software using Graphical method, go to
Main Menu =>Systems and Settings=>Add or
Remove Packages
Package Management

© 2006 IIHT
Installing Linux

Topic 3 - Installing Software


through Graphical Method
Select the RPM check box that has to be updated and
click on Update
Package Details

© 2006 IIHT
Installing Linux

Topic 3 - Installing Software


through Graphical Method
This will display the Completed System
Preparation panel. Click on Continue
Completed System Preparation

© 2006 IIHT
Installing Linux

Topic 3 - Installing Software


through Graphical Method
– Updating System

© 2006 IIHT
Installing Linux

Topic 3 - Installing Software


through Graphical Method
After updating, it will ask for the disk to install the
software package. To continue with it, insert a disk
and click on OK
Disk needed to install packages

© 2006 IIHT
Installing Linux

Lesson 2 – Viewing Software

Introduction
Once the software is installed, enquiry can be
made on the software package and check
whether the RPMs are installed. This process is
querying.

Topics Covered in this lesson


1. Querying the Software Package
2. Verifying the Installed Software Package

© 2006 IIHT
Installing Linux

Topic 1- Querying the Software


Package
The enquiry of the installed software packages can be done
using the command

[root@localhost ~]# rpm –q

If the details about the software package i.e. name, version


and release number of the installed software package has
to be displayed, then the following command can be run.

[root@localhost ~]# rpm –q <software package>

© 2006 IIHT
Installing Linux

Topic 2 – Verifying the Installed


Software Package
The software package that is installed has to be checked
whether the installation has been successfully or not. So
verification is done.

The command used to verify a software package is


[root@localhost ~]# rpm –V

To verify a software package having a specific file:


[root@localhost ~]# rpm –Vf /usr/home/user1

To verify all installed software packages:


[root@localhost ~]# rpm – Va

© 2006 IIHT
Installing Linux

Graphical Method to Verify the


software package
Click on Main Menu =>Systems and
Settings=>Add/Remove Packages and click on
the software installed and click on Details.
Package Management

© 2006 IIHT
Installing Linux

Graphical Method to Verify the


software package
Check the RPMs whose check boxes are enabled.
Package Management Package
Details

© 2006 IIHT
Installing Linux

Lesson 3 – Removing Software

Introduction
Software can be removed or uninstalled using
RPM. The software, which is not in use currently,
has to be removed so that the space occupied by
it is saved for other programs. Software can be
uninstalled using RPM on a command line
interface and on a graphical interface as well.

Topics covered in this Lesson


1. Uninstalling Software using RPM

© 2006 IIHT
Installing Linux

Topic 1 – Uninstalling Software


using RPM
Software applications can be uninstalled using the -e
option to the rpm command:
]
[root@localhost ~] # rpm -e <software name>

[root@localhost ~] #

Only the name of the software package is used when


the software has to be uninstalled.

© 2006 IIHT
Installing Linux

Graphical method of Uninstalling


Software
Click on Main Menu =>Systems and
Settings=>Add or Remove Packages.
Click on Details on the software that has to be
installed.
Add/Remove Programs

© 2006 IIHT
Installing Linux

Graphical method of Uninstalling


Software
Uncheck the check boxes of the software package
and this way the software can be uninstalled from the
system.
Package Details

© 2006 IIHT
Installing Linux

Conclusion
Ø Summary

Red Hat Package Manger, RPM is helpful in the


management of software in the database

While installing the software RPM traces whether


the software required for software being installed is
in the database or not

When software is installed, it can be queried and


the details about the rpms can be seen.

Software that is not currently used has to be


removed
© 2006 IIHT or uninstalled
Installing Linux

Module 9 – Kernel Administration

Overview
The innermost layer of Linux operating system is
the kernel, which is a thin layer of software
between hardware and software applications. This
module deals with the kernel source structure,
loading and unloading of kernel modules.

Lessons covered in this module


1. The Linux Kernel Source Structure
2. Loading and Unloading Kernel Modules
3. Compiling and Building Custom Kernels

© 2006 IIHT
Installing Linux

Lesson 1 – The Linux Kernel Source


Structure
Introduction
The innermost layer of Linux operating system is the
kernel, which is a thin layer of software between
hardware and software applications. Kernel has many
directories and the structure of the Linux kernel
source has to be understood as it helps in knowing
various processes performed by the system.

Topics covered in this lesson


1. Linux Kernel Source Structure
2. Referring a Kernel Source Structure

© 2006 IIHT
Installing Linux

Topic 1 - Linux Kernel Source


Structure
Linux distributions such as Red Hat and Debian
include the Kernel sources in them.

The Linux kernel that gets installed on a Linux


system is made from the Kernel sources included in
the Linux distributions.
Linux Kernel Source

© 2006 IIHT
Installing Linux

Topic 2 - Referring a Kernel Source


Structure
To refer a Linux kernel the following subtopics will be a guide:

● System Startup and Initialization


● Memory Management
● Kernel
● PCI
● Interprocess Communication
● Interrupt Handling
● Device Drivers
● File Systems
● Network
● Modules

© 2006 IIHT
Installing Linux

Lesson 2 – Loading and Unloading


Kernel Modules
Introduction
Linux is a monolithic kernel or in other words it is a
large program in which all the functional components
of the kernel have access to all of its internal data
structures and routines. Linux kernel modules can be
loaded or unloaded into the kernel as per the
requirement.

Topics Covered in this module


1. Kernel Version
2. Loading and Unloading Kernel Modules

© 2006 IIHT
Installing Linux

Topic 1 – Kernel Version

fresh versions of the kernel are constantly made available, which


will offer better support for devices and for an efficiently running
system.

Linux kernel will have a version number that has three parts as
given below
● major number- The major number will increase when the
kernel has major changes.

● minor number- The minor number defines stability.

● revision number- The revision number will refer to the


corrected versions.

© 2006 IIHT
Installing Linux

Topic 2 - Loading and Unloading


Kernel Modules
A Linux kernel has components known as Modules that
can be loaded and added to it as required.

The modprobe command is a common command, which


calls insmod command for loading modules and rmmod
for unloading modules

modprobe command- Manual installing a module can


be done using the modprobe command and the module
name

© 2006 IIHT
Installing Linux

Lesson 3 - Compiling and Building


Custom Kernels
Introduction
A custom kernel is a kernel that is built with a
configuration file other than the given generic
configuration file.

Topics covered in this lesson


1. Building Custom Kernels
2. Compiling Custom Kernels

© 2006 IIHT
Installing Linux

Topic 1 – Building Custom Kernels

Building custom kernels involves building the kernel


file and kernel modules.

Configuring the Custom or New Kernel

∙ Configuration is the most tedious and essential


part of building a custom kernel.
∙ During configuration, the hardware, file systems
and other features that will be supported by the
kernel, are decided

Building a Custom Kernel


© 2006 IIHT
Installing Linux

Topic 2 – Compiling the Custom


Kernels
After building a custom kernel, it has to be installed
and compiled on the system.

The steps involved in compiling a custom kernel are:

1. make modules _install has to be used for


installing the kernel modules

1. make modules _install has to be used for


installing the kernel modules

© 2006
1. Verification has to be made on the custom kernel
IIHT
Installing Linux

Conclusion

Ø Summary

Kernel is the innermost core of the operating system


that is a thin layer between hardware and software
applications

The Linux kernel source structure can be referred to


know about the system functions

A kernel module is loaded whenever a kernel requires


it

A custom kernel is built by creating a new


© 2006 IIHT
Installing Linux

Module 10 – Connecting to Network

Overview
A network connection is required to communicate
with other computers when they are in a network.
Network interface cards have to be configured in a
Linux system in order to communicate with other
computers of the network. A network client is a
system that obtains service from the server.

Lessons covered in this module


1. Configuring Network Interfaces
2. Configuring Network Client Services

© 2006 IIHT
Installing Linux

Lesson 1 – Configuring Network


Interfaces
Introduction
A network connection is required to communicate with
other computers when they are in a network. This is
achieved by adding a network interface card and making
the operating system identify the Network Interface Card.

Topics covered in this lesson


1. Configuring an Ethernet Connection
2. Configuring a PPP Connection
3. Setting the Host Name

© 2006 IIHT
Installing Linux

Topic 1 - Configuring an Ethernet


Connection
Ethernet device is a type of Network Interface Card
(NIC)

Verification of the configuration of all interfaces can


be done using ifconfig command
[root@localhost ~]# ifconfig

© 2006 IIHT
Installing Linux

Network Configuration

Network configuration for obtaining Internet


connection, can be obtained through DHCP and
through Static IP address.

To set the network configuration, the user can make


use of su command to become root and run the
following command
Netconfig Network Configuration

© 2006 IIHT
Installing Linux

Static IP address Network


Configuration
Fill in the fields with relevant data in IP Address,
Netmask, Default Gateway and Primary
Nameserver as shown in the following figure. Click
on OK after all the required data is entered

© 2006 IIHT
Installing Linux

DHCP Network Configuration


If the network connection has to be DHCP then just
go to the Use dynamic IP Configuration
BOOTP/DHCP and press TAB, a * (asterisk symbol)
will appear on the space enclosed by square
brackets.

This indicates that DHCP is enabled, now click OK.

© 2006 IIHT
Installing Linux

Configuring an Ethernet
connection
To configure an ethernet connection, the steps
given below have to be followed.
To start a network administration tool, go to Main
Menu Button =>Systems and Settings
=>Network
Network Administration Tool

© 2006 IIHT
Installing Linux

Configuring an Ethernet
connection
Click the Devices tab on Network Administration
Tool as shown in the above figure
Double-click on the highlighted line as shown in the
above figure. Now the following screen appears.

© 2006 IIHT
Installing Linux

Configuring an Ethernet connection

After configuring the Ethernet device, you will see it displayed


in the device list as shown in the figure given below

After configuring the Ethernet device, select File => Save to


save the changes

© 2006 IIHT
Installing Linux

Topic 2 - Configuring PPP Interface

A point-to-point (PPP) interface is used to build direct


connection between two inodes.

There are three technologies that use PPP for


connecting computers to a network such as the
Internet and they are:
● Integrated Services Digital Network (ISDN)
● Modems
● Digital Subscriber Line (DSL)

© 2006 IIHT
Installing Linux

Configuring an ISDN Connection

An ISDN connection is an Internet connection that is


set with an ISDN modem card via a special phone line
installed by the phone company. ISDN connections
are popular in Europe.

ISDN connection is done using Network


Administration tool. To start the Network
Administration tool,

© 2006 IIHT
Installing Linux

Configuring a Modem Connection

A modem can be used to configure an Internet


connection over an existing phone line. An Internet
Service Provider (ISP) account, also called a dial-up
account is needed to establish a modem connection.

Modem connection is configured using the Network


Administration Tool

© 2006 IIHT
Installing Linux

Configuring a DSL Connection

DSL devices are becoming popular. The configuration


is similar to the Ethernet configuration and only the
difference is in permitting configure settings such as
the SSID (service set identifier) and key for the DSL
device.

DSL is configured using the Network Administration


Tool

© 2006 IIHT
Installing Linux

Topic 3 – Setting the Host Name

Network applications depend on the local host name to be


set to some reasonable value.

This setting is generally made during the boot process by


running the hostname command.

The syntax used to set the host name is:


# hostname name

Organizations will have their own authorized fully


qualified domain name (FQDNs)

© 2006 IIHT
Installing Linux

Lesson 2 - Configuring Network


Client Services
Introduction
A network client is a system that obtains service from
the server. A network client has to be configured to
avail the services such as sharing files, mail services
from the network server. To configure a network client,
a user should have root privileges or super user access.

Topics covered in this lesson


1. Configuring DNS Client Services
2. Configuring NIS Client Services
3. Configuring Mail Client Services

© 2006 IIHT
Installing Linux

Topic 1 – Configuring DNS Client


Services
Domain name recognizes one ore more IP (Internet
Protocol) addresses. Domain names are used in
URLs (uniform resource locators) to recognize
specific web pages.

The configuration is made into the DNS server


using the commands given below:
in: /etc/resolv.conf

© 2006 IIHT
Installing Linux

Topic 1 Click
– Configuring
to edit Master titleDNS
style Client
Services
/etc/hosts lists IP addresses and related hosts names
and aliases.

Add the line PEERDNS = no to the interface


configuration file to avoid the DHCP server from
updating the /etc/resolv.conf.

© 2006 IIHT
Installing Linux

Topic 2 – Configuring NIS Client


Services
Network Information Service or NIS was designed to permit
sharing files between Unix systems and Unix administrators.

A set up of NIS has two components, a NIS master server that


offers centrally administered configuration information and NIS
clients

The configuration can be done most rapidly with the use of


graphical configuration tool autoconfig

NIS clients can be created using command line interface by


manually configuring the following configuration files.
● /etc/sysconfig/network
● /etc/yp.conf
● /etc/nsswitch.conf

© 2006 IIHT
Installing Linux

Topic 2 – Configuring NIS Client


Services
Click to edit Master text styles
Second level
● Third level

● Fourth level

● Fifth level

Continue
© 2006 IIHT
d..
Installing Linux

Topic 3 – Configuring Mail Client


Services
Red Hat Linux has a default email client called
Evolution. Evolution offers all the standard email
client features that include powerful mailbox
management, user-defined filters and quick searches.
Evolution also features a flexible calendar and
scheduler that permits users to make and
authenticate group meetings and special events
online.
Start Evolution from the desktop panel go to Main
Menu =>Internet=>Email

© 2006 IIHT
Installing Linux

Topic 3 – Configuring Mail Client


Services
The first time Evolution is started, a Welcome
Screen is displayed that allows you to configure a
new email connection. Click Forward to continue.
The following screen is displayed

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

• Network Interface card such as Ethernet, is a


hardware device used in making operating
system to connect the network.

• A network client has to be configured to the


server to obtain the services from the network
server.

• Email, DNS client and NIS client are some of the


network clients configured to their corresponding
network server
© 2006 IIHT
Installing Linux

Module 11 – Linux Network


Services
Overview
In Linux, there are network services that can be
used to be connected to a network. The services
include NFS, Samba and DHCP. This module deals
with NFS, Samba and DHCP.

Lessons covered in this module


1. Linux Network Services

© 2006 IIHT
Installing Linux

Lesson 1 – Linux Network Services

Introduction
In Linux, there are network services that can be
used to be connected to a network. The services
include NFS, Samba and DHCP.

Topics covered in this lesson


1. Network File System (NFS)
2. Dynamic Host Configuration Protocol (DHCP)
3. Samba

© 2006 IIHT
Installing Linux

Topic 1 - Network File System (NFS)

NFS is a method of sharing files across Linux and


UNIX networks. It is a distributed file system that
provides local access to remote disks and file
systems. In a proper NFS installation, the operation
is totally transparent to clients using remote file
systems.
NFS has client/server architecture.
p e a r k iw i
d is k b e a s t

Illustration of exporting file systems with NFS


/ h o m

a p p le
e / u 1

/ e x p o r t s / h o m e s
/ h o m e / u 5
/ w o r k / p r o j

lim e
/ h o m e / u 2

m a n g o
/ h o m e / u 6
/ p r o je c t s

/ h o m e / u 3
/ p r o j
g u a v a p e a c h

/ h o m e / u 4 / h o m e / u 7
/ h o m e / w o r k

© 2006 IIHT
Installing Linux

NFS Server

To run an NFS server with Red Hat Linux the following services are
required. portmap, rpc.nfsd and rpc.mountd.

The NFS server software with Red Hat has three facilities, the
portmap, nfs-utils and rpc.mountd rpms:

portmap: This maps calls from other devices to the correct


RPC service

nfs: This translates NFS requests into requests on the local file
system

rpc.mountd: This is for mounting and unmounting file systems

© 2006 IIHT
Installing Linux

NFS Client

NFS is implemented in client machines as a kernel


module. Network mounts are specified using
/etc/fstab.
You can use autofs to mount NFS shared files when
required and unmount them when idle.

Screen
To mount
Picture
a shared
Illustrating
directory the
in your
Steps
local file system,
use mount.

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise

We have to configure host IIHT1 and IIHT2 as NFS server and client
so that user on IIHT2 can access host IIHT1 home directory.
Configure by performing the following steps:
1. Host IIHT1 and IIHT2 IP address are 192.168.1.1 and
192.168.1.2 respectively

2. Configure host IIHT1 as a NFS server and share home directory


in /etc/exports file

3. Configure host IIHT2 as NFS client and access IIHT2 to home


directory by using mount command.

© 2006 IIHT
Installing Linux

Topic 2 - Dynamic Host


Configuration Protocol (DHCP)
Many Networks assign IP addresses to the requesting client on
a lease for a predetermined amount of time. Here the IP
address is dynamic called Dynamic Host Configuration Protocol.

This protocol runs on network layer two and responds to DHCP


requests.

In order to request a DHCP lease on a network, you need the


dhcpcd software.

The latest version can be obtained from its home site


http://www.phystech.comldownloadldhcpcd.htm

© 2006 IIHT
Installing Linux

Configuring a dhcpd server

The first step to install a dhcp rpm if it is not


installed.
Then you should create the /etc/dhcpd.conf file.

© 2006 IIHT
Installing Linux

Topic 3 - Samba

The presence of diverse machines in the network environment is


natural and so their interoperability is critical.

SAMBA is one such advanced Windows-to-UNIX interoperability


package.

It has become so successful and practical that you can completely


replace Windows servers with Samba servers.

There are more configuration tools in system-config-samba utility.

© 2006 IIHT
Installing Linux

Lab Exercise

Exercise
Configure this lab by performing following instructions
1. HOSTA and HOSTB machines with IP address are 192.168.1.1
and 192.168.1.2 respectively

2. Configure HOSTA as a samba server

3. Create one directory name IIHT and give full permission to


everyone

4. Make an entry in /etc/samba/smb.conf file so that you can


access the Linux machine from a Windows machine

5. Access your directory name IIHT from HOSTB machine which is


windows machine

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

NFS is a method of sharing files across Linux and


UNIX networks.

DHCP is a network protocol to manage dynamic hosts


who use leased IP addresses on a time bound basis.

Samba is a network interoperability package

Red Hat supports all these and there are easy and
specific ways to configure these for efficient network
services
© 2006 IIHT management.
Installing Linux

Module 12 – Kickstart Installation

Overview
In Linux, system administrators use an automated
method of installation called kickstart installation
that helps them to save time when installing
Linux on several machines in a network. This
module deals with the kickstart installation along
with configuration of kickstart.

Lessons covered in this module


1. Kickstart Installation

© 2006 IIHT
Installing Linux

Lesson 1 – Kickstart Installation

Introduction
Red Hat Linux has one installation method that is
an automation method of installation called
Kickstart installation. This type of installation
helps system administrator when they have to
install Linux in several machines on a network.

Topics covered in this lesson


1. What is Kickstart Installation?
2. Kickstart Configuration

© 2006 IIHT
Installing Linux

Topic 1 – What is Kickstart


Installation?
Red Hat has developed Kickstart installation method, an automated
method for installing Red Hat Linux on the systems.

Kickstart files are placed on single server system and individual


computers read these Kickstart files while Linux is being installed.

Using a single Kickstart file for installing Red Hat Linux on multiple
machines is supported by Kickstart installation method

Kickstart installations can be carried out with the use of a CD-ROM,


a local hard drive, FTP or HTTP.

© 2006 IIHT
Installing Linux

Topic 2 – Kickstart Configuration

Kickstart can be configured using command line interface


and graphical tool, kickstart configurator.

Analysis of Kickstart Configuration through


Command Line Interface

∙ When Red Hat Linux is installed, the default kickstart


configuration file gets saved as anaconda-ks.cfg in
the /root directory.

∙ The file, anaconda-ks.cfg that is automatically


generated by anaconda

© 2006 IIHT
Installing Linux

Kickstart Configuration using


Graphical Tool
Kickstart configurator can be started by clicking
Main Menu => System Tools => Kickstart.
This will display the Kickstart configurator as
shown in the figure given below Basic
Configuration

© 2006 IIHT
Installing Linux

Lab Exercises

Automatic Installation with Kickstart


In this lab you have to install Linux with kickstart.
For this you have to configure NFS and DHCP server.
DHCP provides the IP address to the client and the
location of kickstart file. NFS server mounts the
directory in which the installation files are located.
Your kickstart server’s IP address is 192.168.1.2.

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

Kickstart Installation is an automated installation method


developed by Red Hat Linux.

Kickstart file can be generated graphically as well as through


command line interface

There is a graphical tool called Kickstart Configurator that


can be used for creating a kickstart configuration file with all
settings

Ø Question and Answer Session

© 2006 IIHT
Installing Linux

Module 13 – Linux Security

Overview
Linux is more prone today to security loopholes
and attacks, both inside and outside the network.
In this module we learn about the various services
and their role in Linux booting process. This
module deals with iptables and TCP Wrappers.

Lessons covered in this module


1. Introduction to System Service
2. Securing Network

© 2006 IIHT
Installing Linux

Lesson 1 – Introduction to System


Service
Introduction
In Linux, system initialization i.e. starting up the
system processes whenever system boots, is
controlled and maintained by several files and
directories. All the processes run as they are
indicated in the files and certain things can be
manipulated to meet requirements.

Topics covered in this lesson


1. System Initialization
2. Chkconfig

© 2006 IIHT
Installing Linux

Topic 1 - System Initialization

The following three main steps happen each time a system


boots up to run Linux:

1. Boot hardware – On the basis of information in the


system’s read only memory, i.e. BIOS, the system examines
and starts up the hardware.

2. Start boot loader – Ideally, the BIOS examines the


master boot record on the primary hard disk to view what to
load next.

3. Boot the kernel – With an assumption that Linux is


selected to be booted, the Linux kernel will be loaded.

© 2006 IIHT
Installing Linux

System RunLevels

The Linux system is brought to a predefined working condition


when the Linux kernel runs /sbin/init.

/sbin/init reads its configuration file and begins all programs


listed in the configuration file. This predefined working
condition is known as runlevel.

Two styles of init programs, BSD-derived init programs and


System V-derived init programs are usually used

BSD-derived init programs have only one predefined runlevel

System V-style init programs are more flexible

© 2006 IIHT
Installing Linux

Predefined Runlevels
Red Hat comes with many predefined runlevels as
listed in this table

© 2006 IIHT
Installing Linux

System Startup Files

The system startup files control and manage the tasks after the
system gets booted up by the boot loader.

These files are essential for successful operation of the computer


since they regulate the processes at system boot up.

There are several system startup files and scripts as listed below:

1. The rc.sysinit script


2. The /etc/init.d and /etc/rcX.d directories
3. The /etc/rc script
4. The /etc/rc.local file

© 2006 IIHT
Installing Linux

Topic 2 - Chkconfig

The chkconfig command offers the capability to inquire the


configurations existing or to customize configuration currently on
the system.

[root@localhost ~]#chkconfig –level 345 sendmail on

The above command would configure the system to start


sendmail in runlevels 3, 4 and 5.

The present configuration of a particular daemon can be found out


by running the below command,

[root@localhost ~]# chkconfig –list daemon

© 2006 IIHT
Installing Linux

Lesson 2 – Securing Network

Introduction
In Linux, to make a network environment safe,
security has to be provided. TCP Wrapper is a tool
usually used on Linux systems to regulate and
filter connections to network services. iptables, a
firewall product also restricts unauthorized access
from accessing a network.

Topics covered in this lesson


1. iptables
2. TCP Wrappers

© 2006 IIHT
Installing Linux

Topic 1 - iptables

Firewall is a system designed to limit unauthorized access


to or from a private network.

Firewalls can be applied in both hardware and software or a


combination of both.

Firewalls are often used to avoid unauthorized Internet


users from accessing private networks connected to the
Internet and Intranet.

Earlier, a firewall package called ipchains that is now


replaced by iptables

© 2006 IIHT
Installing Linux

Starting iptables

Iptables can be started, stopped and restarted after system


boot by running the following commands:

[root@localhost ~]# service iptables start


[root@localhost ~]# service iptables stop
[root@localhost ~]# service iptables restart

The iptables can be made to get configured to start at


system boot by using the chkconfig command as given
below.

[root@localhost ~]# chkconfig iptables on

© 2006 IIHT
Installing Linux

Packet Processing in iptables

The table given below gives an overview of the


procedure for packets transmitted by the firewall

© 2006 IIHT
Installing Linux

Packet Processing in iptables

Illustration of a TCP packet from the Internet


passing through the interface of the firewall on
Network A

© 2006 IIHT
Installing Linux

Targets

The way, the rules are added to the chains of the


firewall are done using Targets Targets in
iptables

© 2006 IIHT
Installing Linux

Topic 2 – TCP Wrappers

TCP Wrapper is a tool usually used on Linux systems


to regulate and filter connections to network services.
TCP Wrappers offer wrapper daemons, which can be
installed without making changes in existing software.

Most of the TCP/IP applications depend on the client


and server model.
The TCP wrapper configurations are stored in two
files /etc/hosts.allow and /etc/hosts.deny.
Permissions are stored in /etc/hosts.allow and
denials in /etc/hosts.deny.

© 2006 IIHT
Installing Linux

Topic 2 – TCP Wrappers


Example for Blocking ssh (Secure shell)

sshd: ALL (for all)


sshd: ALL EXCEPT 192.168.10.10

Example for Blocking FTP (file transfer protocol)

vsftpd: ALL (for all)


vsftpd: ALL EXCEPT 192.168.10.10

Example for Allowing Telnet


in.telnetd, sshd: .india.com 192.168.0.8

© 2006 IIHT
Installing Linux

Lab Exercise

iptables and TCP Wrappers


In this lab we have to restrict access to the service
using iptables and TCP_wrappers. You want to block
the telnet service so that HOSTA will not be able to
telnet HOSTB. Assume that HOSTA and HOSTB have
IP address 192.168.1.1 and 192.168.1.2 respectively.

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

A Linux system can be brought into a pre-defined working


condition called runlevel that signify a particular function

There are several system startup files that control and


regulate startup processes whenever a system boots up

There are different ways to secure Linux, through Security


services, Firewall and TCP Wrapper.

Ø Question and Answer Session

© 2006 IIHT
Installing Linux

Module 14 – Setting Up a Printer

Overview
Linux servers can be used in many different roles
on a LAN. File and print servers are the most
common roles played by the servers. In this
module we learn about the print process and how
to administer and set up the printers.

Lesson covered in this module


1. Setting up a Printer

© 2006 IIHT
Installing Linux

Lesson 1 – Setting Up a Printer

Introduction
In Linux, printers are set up on a local computer and on a
network as well. Linux has advanced printing system
known as Common Unix Printing System. Printer can be
configured to share on a network.

Topics covered in this Lesson


1. Common Unix Printing System (CUPS)
2. Printer Configuration
3. Adding a IPP Printer
4. Adding a (Unix) LPD Printer
5. Adding a Samba Printer
6. Sharing Printer

© 2006 IIHT
Installing Linux

Topic 1 - Common Unix Printing


System (CUPS)
The Common Unix Printing System (CUPS) is an entirely new
and modern printing system.

It has web-based administration that helps in setting up CUPS


easily.

CUPS will support network, parallel and serial printers.

A windows system can print to a printer shared by a Linux


system through CUPS without using any other software.

CUPS printing system is relatively easy to configure than LPD


and LPRng.

© 2006 IIHT
Installing Linux

Topic 2 - Printer Configuration


Printer can be configured using graphical tool and
command line interface.

Printer configuration using command line interface

The printer is configured using the setup utility and


setting the configurations.

As explained in the mouse configuration, give the


Setup command that will take you to the Text mode
Setup Utility command line interface

Printer Configuration using Graphical Tool


© 2006 IIHT
Installing Linux

Topic 3 - Adding a IPP Printer

An IPP printer is a printer connected to different Linux


system on the same network that runs CUPS or a printer
configured on different operating system for using IPP.

By default, the Printer Configuration Tool will browse


the network for any shared IPP printers.

A new networked IPP printer can be added by clicking


the New button in the main Printer Configuration
Tool window.

© 2006 IIHT
Installing Linux

Topic 4 - Adding a Unix (LPD)


Printer
A remote Unix printer like the one connected to a
different Linux system on the same network can be
added by clicking the New button in the main
Printer Configuration Tool window.

© 2006 IIHT
Installing Linux

Topic 5 - Adding a Samba Printer

A Samba printer accessed using the SMB protocol,


can be added by clicking the New button in the main
Printer Configuration Tool window.

© 2006 IIHT
Installing Linux

Topic 6 - Sharing Printer

For configuring a printer to be shared on a network,


open the printer configuration tool as explained
above that has a printer as shown in the following
figure.

© 2006 IIHT
Installing Linux

Lab Exercise

Setting Printer
In this lab you have to set up a printer by using
graphical tool. You have to create a print queues
name IIHT and try to print a test page.

© 2006 IIHT
Installing Linux

Conclusion

Ø Summary

Linux supports Common Unix Printing System (CUPS) that


is new and modern printing system.

A printer can be configured using command line interface


and graphical tool known as Printer Configuration Tool

Printer configuration tool is used to add a local printer, an


IPP printer, a Unix printer and a Samba printer

Ø Question and Answer Session

© 2006 IIHT

You might also like