You are on page 1of 37

RHCE Study Notes

Systemnotes.org, RedHat Linux Flash Cards

Stuff to remember:

Look at the latest obe!ti"es for the exam.

Remember the !ommands re#uired.

$f you don%t understand a slide, take that as a


!lue that you need further study, or !onta!t us.

&ra!ti!e, 'ra!ti!e, 'ra!ti!e(



)oot Single

boot into single user mode

at grub s!reen, *a*, *s'a!e*, *+*, enter



Net,ork Configuration

system-!onfig-net,ork

Files

.et!.sys!onfig.net,ork-s!ri'ts.if!fg-eth/

.et!.sys!onfig.net,ork

Hostname Resolution

.et!.resol".!onf

.et!.hosts

0 1indo, System

.et!.0++.xinit.xinitr!.d

.et!.0++.xorg.!onf

.et!.inittab

system-!onfig-dis'lay

.tm' and .home ha"e enough s'a!e

Ctrl-2lt-F+ to F3

Ctrl-2lt-)a!ks'a!e

Hard 4isk Commands

fdisk .de".hda

'art'robe

mdadm -C .de".md/ -l 5 -n 6 .de".hda7


.de".hda8 .de".hda3

mke9fs - .de".md/

e9label .de".hda9 .data

mount -t ext6 .de".hda8 .data8



Configure &rinting

system-!onfig-'rinter

.et!.!u's.!u'sd.!onf

l'admin

l'stat, l'#

ree!t disable

a!!e't .usr.bin.enable

Cron and at :obs

!o'y s!ri't to .et!.!ron.daily, .et!.!ron.monthly,


et!. or

;odify .et!.!rontab: !rontab -e

List !ron obs: !rontab -l

2dd an at ob: at <-f file= >$;E

?ie, at #ueue: at#

Remo"e at og: atrm ob



$nstall N$S or L42&

$nstall y'bind, 'ortma'

system-!onfig-authenti!ation

!he!k: Enable N$S Su''ort, or Enable L42&


Su''ort

!li!k: Configure N$S..., or Configure L42&...

!onfigure fire,all, if re#uired



>est N$S or L42&

y',hi!h

nisdomainname -y

genent ser"i!es

getent 'ass,d smith

r'!info -'

N$S or L42& Files

.et!.y'.!onf

.et!.sys!onfig.net,ork

.et!.'am.d.system-auth

.et!.nss,it!h.!onf

Configure autofs

.et!.auto.master

.home.guests .et!.auto.guests --timeout@7/

.et!.auto.guests

A -r,,soft,intr ser"er+:.home.guests.B

ser"i!e autofs restart

!hk!onfig 'ortma' on

!hk!onfig autofs on

;anage Csers, and Drou's

grou'add -g +/// grou'name

useradd username

usermod -D grou'name username

E-D for 'rimary grou'F



;anage Guotas

#uota!he!k -!uf .home

#uotaon .home

ed#uota username

#uota username

re'#uota .home

Filesystem &ermissions

mkdir -' .de'ts.finan!e

!hgr' sales .de'ts.finan!e

!hmod 88/ .de'ts.A

!hmod gHs .de'ts.A

!ho,n sam .de'ts.managers

ls -l .de'ts.

$nstall and C'date r'ms

r'm -i"h filenamex.i637.r'm

r'm -C"h filenamex.i637.r'm

?erify an R&;:

r'm --im'ort .usr.share.rhn.R&;-D&D-IEJ

r'm -I .tm'.r'm"ersion.i637.r'm

$nstall from yum Re'ository

.et!.yum.!onf

.et!.yum.re'os.d.

System )ootloader

.boot.grub.grub.!onf

K root Ehd/,/F

K kernel ."mlinuL-"ersion ro root@.de"."g//.l"//


!rashkernel@+93;M+7;

K initrd .initrd-"ersion.img

$m'lement Soft,are R2$4

'art'robe

mdadm -C .de".md/ -l 5 -n 6 .de".hda7


.de".hda8 .de".hda3

mke9fs - .de".md/

.et!.fstab

mdadm --detail .de".md/

fail, re!o"er, add:

mdadm .de".md/ -a .de".sda+



Set Iernel Run-time &arameters

"i .et!.sys!tl.!onf

xxx.xx.xxx@+

sys!tl -'

sys!tl -a N gre' xxx



4iagnose and Corre!t )oot Failures

.et!.r!.d.r!.sysinit

.et!.r!.d.r! adn .et!.r!.d.r!O.d

.et!.r!.d.r!.lo!al

.boot.grub.grub.!onf

filesystem

.et!.fstab

fs!k .de".hda

Create a Logi!al ?olume

First !reate 'hysi!al "olume, then "olume


grou', then logi!al "olume

&? -P ?D -P L?

'"!reate .de".hda7 .de".hda8 .de".hda3

"g!reate "g/ .de".hda7 .de".hda8

l"!reate -L 5//; -n data/ "g/

ext9online .de"."g/.data/

SELinux

getenfor!e

setenfor!e +

!he!k !ontext ,ith ls -Q

!h!on -R --referen!e ."ar.,,,.html


."ar.,,,.html.,,,ne,

Configure H>>&

install htt'd

modify .et!.htt'd.!onf.htt'd.!onf file

ser"i!e htt'd restart

!hk!onfig htt'd on

ser"i!e htt'd !onfigtest



Configure Samba Share

$nstall samba

"i .et!.samba.smb.!onf

!onfigure fire,all

NFS

;odify .et!.ex'orts

start nfs B 'ortma'

"erify !onfig, B !he!k mounts

ex'ortfs -"

sho,mount -e lo!alhost

r'!info -' lo!alhost

ser"i!e nfs reload



2utomount

mkdir .net

"i .et!.auto.master

start ser"i!es -- 'ortma', autofs



F>&

install "sft'd

!reate in!oming dire!tory

mkdir -' ."ar.ft'.in!oming

"i .et!."sft'd."sft'd.!onf

start "sft'd

ser"i!e "sft'd start



1eb 'roxy

$nstall s#uid, and start the ser"i!e

"i .et!.s#uid

ser"i!e s#uid reload

Configure bro,ser to test



S;>&

$nstall sendmail, sendmail-!f, sendmail-do!

modify .et!.mail.sendmail.m!

mR sendmail.m! P sendmail.!f Eor makeF

ser"i!e sendmail restart



$;2&, $;2&S, and &S&6

install do"e!ot

"i .et!.do"!ot.!onf

'roto!ols @ xxx

ser"i!e do"e!ot restart

!hk!onfig do"e!ot on

SSH

.et!.ssh.

T..ssh.

4NS

$nstall bind, bind-utils, and !a!hing-nameser"er

"i .et!.named.!onf

>o "erify:

named-!he!k!onf

named-!he!kLone exam'le.!om
exam'le.!om.Lone

Che!k .et!.resol".!onf on !lient ma!hines



N>&

.et!.nt'.!onf

nt'stat

ser"i!e nt'd restart



Fire,all

.et!.sys!onfig.i'tables

i'tables -L

i'tables -F

ser"i!e i'tables sa"e

ser"i!e i'tables restart

!hk!onfig i'tables on

&2;

.lib.se!urity.

.et!.'am.d.

Configure Ser"i!e

$nstall R&;

r'm -i"h ser"i!ename.r'm

;odify Configuration and Fire,all


Start Ser"i!e

ser"i!e ser"i!ename restart

Set Ser"i!e to Start on Reboot

!hk!onfig ser"i!ename on

You might also like