Complete RHCE doc

  • View

  • Download

Embed Size (px)


Everything you need about Red Hat Linux

Text of Complete RHCE doc

Session 1

RHCERed Hat Certified EngineerM. A. Agheli1

History Of UNIX & Linux

1957: 1957: Bell Labs found they needed an operating system which at the time was running various batch jobs. 1965: 1965: Bell Labs create Multics (Multiplexed Information and Computing Service) 1969: 1969: Summer 1969 UNIX was developed by AT&T 1975: 1975: Sixth edition of UNIX released May 1975 1985: 1985 GNU project started 1991: 1991 Linux is introduced by Linus Benedict Torvalds who was a second year student of Computer Science at the University of Helsinki 1993: 1993 NetBSD & FreeBSD released 1994: 1994 Red Hat Linux is introduced2

First Article About LinuxFrom: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) Newsgroups: comp.os.minix Subject: What would you like to see most in minix? Summary: small poll for my new operating system MessageMessage-ID: Date: 25 Aug 91 20:57:08 GMT 20:57: Organization: University of Helsinki Hello everybody out there using minix I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing 386(486) since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) fileamong other things). I've currently ported bash(1.08) and gcc(1.40),and bash(1 08) gcc(1 40),and things seem to work.This implies that I'll get something practical within a few months, andI'd like to know what features most people would want.a Any suggestions are welcome, but I won't promise I'll implement them :-) :Linus ( PS. Yes - it's free of any minix code, and it has a multi-threaded fs. multiIt is NOT protable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(. AT:3

GNU & GPLGNU Project: Focused on creating a Unix like operating systemthat could be freely distributed GPL: Global Public license(Copyleft)4

Major Linux DistributorsCaldera Linux Corel Linux Debian Linux Kondara Linux Red Hat Linux

Mandrake Linux Slackware Linux SuSE Linux Turbo Linux Vector Linux


The Advantage of Linux

Low purchase cost Open Source Software (OSS) UNIX heritage Multi User Scalability Vendor support Reliable uptime Security Logging System


The Disadvantage of Linux


learning curve Hardware support End-user applications End-


A Comparison Of Win 9x, NT, and LinuxFeature Scalability Desktop App. Support Enterprise App. Support Hardware Support Licensing Cost Network Performance Security Win 9x Poor Excellent None Excellent Good Good Poor Win NT Good Good Good Good Poor Good Good Linux Good Good Good Good Excellent Excellent Good8

Linux Filesystem Hierarchy/bin /boot /dev /etc /home /lib /mnt /proc /root /sbin /tmp /usr /var Essential Binary Files Boot Loader Files Device Files Configuration Files User Home Directories Shared Libraries and Kernel Modules Mount Point for Temporarily Mounted FS System Information Virtual File System root User Home Directory Essential System Binaries Temporary Files Shareable Files NonNon-Shareable Files9

Session 2

RHCERed Hat Certified EngineerM. A. Agheli10

Installing Linux

Hardware Requirements Harddisk Partitioning Boot Loader Install Packages X Configuration11

Overview of the Installation Process1.

Starting the installation process

Installation Mode Language Keyboard Mouse

2. 3. 4. 5.

Partitioning Boot Loader Installation Network Configuration Setting the time zone12

Overview of the Installation Process5. 6. 7. 8. 9. 10. 11.

Firewall Configuration Specifying authentication options (optional) Specifying user accounts Selecting packages Installing packages Creating a boot disk Configuration the X Windows system (optional)13

Installing Linux:Console 1 2 3 4 5 7

Consoles & Message LogsContents

Keystrokes Ctrl+Alt+F1 Ctrl+Alt+F2 Ctrl+Alt+F3 Ctrl+Alt+F4 Ctrl+Alt+F5 Ctrl+Alt+F7

Text-based installation procedure Shell prompt Messages from installation program Kernel messages Other messages, including file system creation messages Graphical installation procedure14

Configuring InstallTime Options after Installationkbdconfig mouseconfig timeconfig sndconfig netconfig authconfig ntsysv setup redhat-config- redhat-config-


Session 3

RHCERed Hat Certified EngineerM. A. Agheli16


bash (Bourne Again Shell) ash tcshSHELL

sach mcPS1 PS1 PS2 PS2

Some of Important BASH VariablesPATH

PS1, PS2 Switches\u , \h , \W , \d , \t , \s , \$ , $17

Some of Linux Commands(1)

echo cat cd clear exit

man tac touch alias reboot

help cp pwd less halt

info mv mkdir date

ls rm rmdir logout


Session 4

RHCERed Hat Certified EngineerM. A. Agheli19

BASH TAB key Features Review Pages & Commands Quoting in BASH: value value value value

`value` | 0 1 220

Redirection Operators:> stdin stdout stderr >> /proc/sys/net/ipv4/ip_forward /proc/sys/net/ipv4


Type of Routes

Static route Dynamic route


Components of Routing Rules

Destination IP Address An Interface An Optional Gateway IP Address


Routing Command

route add net net_addr netmask mask_addr interface route add host ip_addr interface route add default gateway ip_addr interface



An ExampleInternet

E B F Ceth0

Router eth1 G D

Gateway H

Related Rules

route add net netmask eth0 192.168. 255.255.255. eth0 route add net netmask 192.168.100. 255.255.255. eth1 eth1 route add net netmask eth2 10. 255.255.255. eth2 route add default gateway eth2 10. eth2


ResultDestination Gateway Genmask Flags Metric Ref Use Iface

* * * * * * *


0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

eth0 Eth1 Eth2 eth0 Eth1 Eth2 eth2 lo

U: Network link is up

H: Dest. Addr. Refers to a host

G: Gateway97

Electronic Mail


How Email Is Sent and Receivedmail1 MTA mail2 MTA





MTA : Mail Transport Agent SMTP (server-to-server) (server-toSimple Mail Transport Protocol

POP (Mail Access)Post Office Protocol

IMAP (Mail Access)Interim Mail Access Protocol MDA : Mail Delivery Agent

MUA : Mail User Agent100

Advantage of Sendmail

Older MTA Powerful MTA

Disadvantage of Sendmail

Slow High Load Environment Crypto Configuration101


Sendmail Postfix Exim Qmail


Evolution, Kmail (KDE) Balsa (GNOME) Mozilla Mail102

Required Packages

sendmail sendmail-cf sendmailimap (Config xinetd)(contains IMAP & POP3) POP3103

Sendmail Configuration

Config /etc/mail/ file /etc/mail/


Run make C /etc/mail/ /etc/mail/ Config DNS


Email Aliases

Edit /etc/aliases file /etc/aliasespostmaster: joseph

Run newaliases Command newaliases


Rejecting Email

Edit /etc/mail/access file /etc/mail/ REJECT OK

service sendmail restart


Session 16

RHCERed Hat Certified EngineerM. A. Agheli107


Where do I look? /etc/nsswitch.conf

(nameservice switch)t@localhost:~$ cat /etc/nsswitch.conf hosts: files dns



Search order determined by nsswitch.conf It is polite to have /etc/hosts first!sjh@mccoy:~$ cat /etc/hosts 127. localhost 193.62.81. mccoy 193.62.81. baker 193.62.81. packages


DNS Traversal1. 2. 3. 4.

Local files Dns server locally Item in cache? Root server, work your way down down


Resolving NamesConfiguration Files for the Local Host Name Resolution (important for testing) /etc/resolv.conf /etc/nsswitch.conf /etc/host.conf112


BIND Berkley Internet Name Daemon Dents buggy as hell (still in alpha?) Djbdns Dan Bernsteins DNS server Bernstein Banyan VINES dont go there! don


Named (name dee)


this defines a directory to store the DNS config files Contains info about what zones we serve, and where to find config files! Config file for named tells us if we are master / slave, allow or deny zone transfers, what the IPs of other master / slave servers are, etc. Contains "pointers" to the Root Servers Config for reverse-lookup to the local host/subnet reverseConfig for zone Config for reverse lookup for your zone


/127. /127.0.0:


/ /