Escolar Documentos
Profissional Documentos
Cultura Documentos
v1.0 2007/12/02
It is very important to study the official objectives for any exam, as that is the only way to know what
to expect. It is not meant to replace official training courses and manuals, but is meant to help students
quickly review, so they can determine where to focus their efforts and study in more detail.
This guide is based on the official redhat objectives for the RHEL5 exam see:
https://www.redhat.com/certification/rhce/prep_guide/
This guide was prepared by looking at each objective, and asking the questions:
-- What could they ask in order to test for knowledge of this objective?, or
-- What kind of troubleshooting might be required?
-- How can this requirement be met?
Note that there may be more than one answer based on what the objective is, or depending which
method is preferred to meet the objective. Some items and ideas were taken from labs in the RHCE
course book, and great care was taken to not give away any hints about what might be on the exam,
other than what the labs and official objectives lead one to infer.
Page 1 of 17
Systemnotes.org RHCE Study Guide for RHEL5
RHCT skills
Troubleshooting and System Maintenance
1) boot systems into different run levels for troubleshooting and system maintenance
system-config-network, or
vi /etc/sysconfig/network-scripts/ifcfg-eth0
check IPADDR, NETMASK, GATEWAY
ONBOOT=yes
PEERDNS=no
vi /etc/sysconfig/network
/etc/resolv.conf
/etc/hosts
Files:
/etc/X11/xinit/xinitrc.d
/etc/X11/xorg.conf
Page 2 of 17
Systemnotes.org RHCE Study Guide for RHEL5
Q: Boot to X
A: Set runlevel 5 in /etc/inittab
vi /etc/inittab
change
id:3:initdefault:
to
id:5:initdefault:
Q: X won't load
A: Check config files
A: system-config-display --reconfig
A: /tmp or /home is full
This one is a little hard to explain. It just takes some practice to understand.
Tools available:
fdisk /dev/hda
t / fd (raid)
partprobe
mdadm -C /dev/md0 -l 5 -n 3 /dev/hda6 /dev/hda7 /dev/hda8
mke2fs -j /dev/md0
Q: mount something, such as: /dev/hda7 on /data
A: make directory, mount, modify /etc/fstab
1) mkdir /data
2) mount -t ext3 /dev/hda7 /data
3) vi /etc/fstab
/data /data ext3 defaults 12
view or change label:
e2label /dev/hda2
e2label /dev/vg0/data0 /data
Page 3 of 17
Systemnotes.org RHCE Study Guide for RHEL5
3) configure printing
/etc/cups/cupsd.conf
lpadmin
lpstat, lpq
reject disable
accept /usr/bin/enable
Page 4 of 17
Systemnotes.org RHCE Study Guide for RHEL5
test:
ypwhich
nisdomainname -y
genent services
getent passwd smith
rpcinfo -p
files:
/etc/yp.conf
/etc/sysconfig/network
/etc/pam.d/system-auth
/etc/nsswitch.conf
6) configure autofs
/etc/auto.master
/home/guests /etc/auto.guests --timeout=60
/etc/auto.guests
* -rw,soft,intr server1:/home/guests/&
service autofs restart
chkconfig portmap on
chkconfig autofs on
7) add and manage users, groups, quotas, and File Access Control Lists
quotas
Q: Setup a 70kb hard block user quota for user tim on /home/tim:
A: Use a Hard Block user quota (or Soft depending on question).
1) modify /etc/fstab
change defaults to usrquota for /home
2) mount -o remount /home
3) quotacheck -cuf /home
4) quotaon /home
5) setquota -u tim 0 60 0 0 /home
or
5a) edquota tim
Page 5 of 17
Systemnotes.org RHCE Study Guide for RHEL5
*** Lab: Set a user soft block quota of 1MB for user diskhog on /blackhole,
(or hard block, hard / soft inode). Know when to use each type of quota ***
Enable quotas:
Set Quota:
block inode
h s hs
setquota -u diskhog 0 1024 0 0 /blackhole
or
edquota -u diskhog
quota -u diskhog
repquota /blackhole
Password
defaults:
/etc/login.defs
chage [options] username
Page 6 of 17
Systemnotes.org RHCE Study Guide for RHEL5
password files:
/etc/passwd
/etc/shadow
/etc/group
You may have to mount a directory over nfs, or install directly from http://
Just remember to use rpm -i, so the old kernel will still be there.
1) mkdir /server1
2) mount server1:/var/ftp/pub /server1
3) cd /server1/Redhat/RPMS
4) rpm -ivh kernel-*
5) vi /boot/grub/grub.conf
default=0
11) configure the system to update/install packages from remote repositories using yum or pup
/etc/yum.conf
/boot/grub/grub.conf
Page 7 of 17
Systemnotes.org RHCE Study Guide for RHEL5
fdisk /dev/hda
fd (raid)
partprobe
mdadm -C /dev/md0 -l 5 -n 3 /dev/hda6 /dev/hda7 /dev/hda8
mke2fs -j /dev/md0
mount
/etc/fstab
mdadm --detail /dev/md0
recover
mdadm /dev/md0 -a /dev/sda1
14) use /proc/sys and sysctl to modify and set kernel run-time parameters
Q: turn on ip forwardarding
A: 1) vi /etc/sysctl.conf
net.ipv4.ip_forward=1
2) sysctl -p
or
echo 1 > /proc/sys/net/ipv4/ip_forward
to view:
sysctl -a | grep ipv4
to find available options for ipv4:
ls /proc/sys/net/ipv4
Page 8 of 17
Systemnotes.org RHCE Study Guide for RHEL5
RHCE skills
Troubleshooting and System Maintenance
RHCEs must demonstrate the RHCT skills listed above, and should be able to:
linux rescue
2) diagnose and correct boot failures arising from bootloader, module, and filesystem errors
init
/etc/rc.d/rc.sysinit
/etc/rc.d/rc adn /etc/rc.d/rc?.d
/etc/rc.d/rc.local
grub
/boot/grub/grub.conf
filesystem
/etc/fstab
fsck /dev/hda
3) diagnose and correct problems with network services (see Installation and Configuration
below for a list of these services)
LVM -
Hint: use apropos quota, or just lvm to find commands.
Q: expand or shrink logical volume (RHCE)
A: Make sure there is enough space, and volume is online, use vgconvert if necessary
ext2online /dev/vg0/data0 120M
lvextend -L +100M /dev/vg0/data0
lvreduce -L 120M /dev/vg0/data0
vgdisplay -v vg0
pvdisplay
lvdisplay
Q: Create a logical volume
A: First create physical volume, then volume group, then logical volume
PV -> VG -> LV
pvcreate /dev/hda6 /dev/hda7 /dev/hda8
vgcreate vg0 /dev/hda6 /dev/hda7
lvcreate -L 50M -n data0 vg0
ext2online /dev/vg0/data0
lvextend -L +6M /dev/vg0/data0
Page 9 of 17
Systemnotes.org RHCE Study Guide for RHEL5
5) diagnose and correct networking services problems where SELinux contexts are interfering
with proper operation.
SELinux
getenforce
setenforce 1
check context with ls -Z
Q: Set up directory to use context of another directory
A: Use the other directory as a reference
chcon -R --reference /var/www/html /var/www/html/www1
Page 10 of 17
Systemnotes.org RHCE Study Guide for RHEL5
RHCEs must demonstrate the RHCT-level skills listed above, and they must be capable of
configuring the following network services:
1) HTTP/HTTPS
2) SMB
3) NFS
Page 11 of 17
Systemnotes.org RHCE Study Guide for RHEL5
chkconfig nfs on
chkconfig portmap on
3) verify config, & check mounts
exportfs -v
showmount -e localhost
rpcinfo -p localhost
4) restart
exportfs -r, or
service nfs reload
Q: Mount server1:/var/ftp/pub with nfs on /server1
1) mkdir /server1
2) vi /etc/fstab
192.168.2.254:/var/ftp/pub /server1 nfs soft,defaults 0 0
3) mount -a
* configure autofs
Automount
Q: Configure automount for nfs mount from nis domain on server1
A:
1) mkdir /net
2) vi /etc/auto.master
# uncomment /net line
/net /etc/auto.net
3) start services
service portmap start
service autofs start
chkconfig autofs on
chkconfig portmap on
Q: Configure automount for nfs mount of /rhome directories from nis domain on server1
A: Create base directory
1) mkdir /rhome
2) vi /etc/auto.master
# copy and modify /misc line
/rhome /etc/auto.rhome
3) vi /etc/auto.rhome
* -rw,soft.intr server1:/home/guests/&
4) start services
service portmap start
service autofs start
chkconfig autofs on
chkconfig portmap on
Page 12 of 17
Systemnotes.org RHCE Study Guide for RHEL5
4) FTP
5) Web proxy
Page 13 of 17
Systemnotes.org RHCE Study Guide for RHEL5
Useful parameters:
http_port 3128
cache_mem 8 MB
cache_dir ufs /var/spool/squid 100 16 256
acl all src 0.0.0.0/0.0.0.0
http_access allow localhost
http_access deny all
6) SMTP
Debugging:
mail -v root
mailq, mailq -Ac
sendmail -q
tail -f /var/log/maillog
Page 14 of 17
Systemnotes.org RHCE Study Guide for RHEL5
8) SSH
/etc/ssh/
~/.ssh/
Page 15 of 17
Systemnotes.org RHCE Study Guide for RHEL5
10) NTP
/etc/ntp.conf
getenforce
setenforce 1
check context with ls -Z
chcon -R --reference /var/www/html /var/www/html/www1
chkconfig servicename on
setuid?
/etc/xinet.d/
Page 16 of 17
Systemnotes.org RHCE Study Guide for RHEL5
/lib/security/
/etc/pam.d/
Page 17 of 17