Complete RHCE doc

  • View
    137

  • Download
    5

Embed Size (px)

DESCRIPTION

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 (torvalds@kruuna.helsinki.fi) 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

5

The Advantage of Linux

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

6

The Disadvantage of Linux

Steep

learning curve Hardware support End-user applications End-

7

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-

15

Session 3

RHCERed Hat Certified EngineerM. A. Agheli16

SHELL

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

18

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

91

Type of Routes

Static route Dynamic route

92

Components of Routing Rules

Destination IP Address An Interface An Optional Gateway IP Address

93

Routing Command

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

94

A

An ExampleInternet

E

192.168.1.2 B

192.168.100.2 F

192.168.1.3 Ceth0

Router 10.1.1.2eth2 eth1

192.168.100.3 G

192.168.1.4 D

Gateway 192.168.1.1 192.168.100.11 0.1.1.1

192.168.100.4 H

192.168.1.5

192.168.100.595

Related Rules

route add net 192.168.1.0 netmask 255.255.255.0 eth0 192.168. 255.255.255. eth0 route add net 192.168.100.0 netmask 255.255.255.0 192.168.100. 255.255.255. eth1 eth1 route add net 10.1.1.0 netmask 255.255.255.0 eth2 10. 255.255.255. eth2 route add default gateway 10.1.1.2 eth2 10. eth2

96

ResultDestination Gateway Genmask Flags Metric Ref Use Iface

192.168.1.1 192.168.100.1 10.1.1.1 192.168.1.0 192.168.100.0 10.1.1.0 0.0.0.0 127.0.0.0

* * * * * * 10.1.1.2 *

255.255.255.255 255.255.255.255 255.255.255.255 255.255.255.0 255.255.255.0 255.255.255.0 0.0.0.0 255.0.0.0

UH UH UH U U U UG U

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

(Sendmail)98

How Email Is Sent and Receivedmail1 MTA mail2 MTA

?user1@mail1.com user2@mail2.com

?

99

Concepts

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

MTAs

Sendmail Postfix Exim Qmail

MUAs

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

Required Packages

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

Sendmail Configuration

Config /etc/mail/sendmail.mc file /etc/mail/sendmail.mc

LOCAL_DOMAIN(example.com)dnl LOCAL_DOMAIN(example.com

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

104

Email Aliases

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

Run newaliases Command newaliases

105

Rejecting Email

Edit /etc/mail/access file /etc/mail/accessspam.com REJECT yahoo.com OK

service sendmail restart

106

Session 16

RHCERed Hat Certified EngineerM. A. Agheli107

108

Where do I look? /etc/nsswitch.conf

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

109

Files

Search order determined by nsswitch.conf It is polite to have /etc/hosts first!sjh@mccoy:~$ cat /etc/hosts 127. 127.0.0.1 localhost 193.62.81. 193.62.81.135 mccoy.tardis.ed.ac.uk mccoy 193.62.81. 193.62.81.134 baker.tardis.ed.ac.uk baker 193.62.81. 193.62.81.132 packages.tardis.ed.ac.uk packages

110

DNS Traversal1. 2. 3. 4.

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

111

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

DNS

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

113

Named (name dee)

/etc/named.conf:

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

/root.hints:

/127. /127.0.0:

/:

/ /