<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--This is a lesson file for Pauker (http://pauker.sourceforge.net)-->
<Lesson LessonFormat="1.7">
  <Description>RHCE Flashcards
by http://systemnotes.org

Free Information.

Commands and procedures required for users of
 Redhat linux.

Designed to help prepare for an RHCE exam 
based on RHEL5.

</Description>
  <Batch>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Boot Single -- boot into single user mode.</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>at grub screen, "a", "space", "1", enter</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Network Configuration</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>system-config-network
Files
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Hostname Resolution</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/resolv.conf
/etc/hosts</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>X Window System</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/X11/xinit/xinitrc.d
/etc/X11/xorg.conf
/etc/inittab
system-config-display
/tmp and /home have enough space
Ctrl-Alt-F1 to F8
Ctrl-Alt-Backspace</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Hard Disk Commands</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>fdisk /dev/hda
partprobe
mdadm -C /dev/md0 -l 5 -n 3 /dev/hda6 /dev/hda7 /dev/hda8
mke2fs -j /dev/md0
e2label /dev/hda2 /data
 mount -t ext3 /dev/hda7 /data7</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Configure Printing</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>system-config-printer
/etc/cups/cupsd.conf
lpadmin
lpstat, lpq
reject	disable
accept	/usr/bin/enable</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Cron and at Jobs</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>copy script to /etc/cron.daily, /etc.cron.monthly, etc. or
Modify /etc/crontab: crontab -e
List cron jobs: crontab -l
Add an at job: at [-f file] TIME
View at queue: atq
Remove at jog: atrm job</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text> Install NIS or LDAP</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install ypbind, portmap
system-config-authentication
check: Enable NIS Support, or Enable LDAP Support
click: Configure NIS..., or Configure LDAP...
configure firewall, if required</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Test NIS or LDAP</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>ypwhich
nisdomainname -y
genent services
getent passwd smith
rpcinfo -p</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>NIS or LDAP Files</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/yp.conf
/etc/sysconfig/network
/etc/pam.d/system-auth
/etc/nsswitch.conf</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Configure autofs</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/auto.master
/home/guests	/etc/auto.guests	--timeout=60
/etc/auto.guests
*	-rw,soft,intr		server1:/home/guests/&amp;
service autofs restart
chkconfig portmap on
chkconfig autofs on</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text> Manage Users, and Groups</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>groupadd -g 1000 groupname
useradd username
usermod -G groupname username
(-G for primary group)</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Manage Quotas</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>quotacheck -cuf /home
quotaon /home
edquota username
quota username
repquota /home</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Filesystem Permissions</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>mkdir -p /depts/finance
chgrp sales /depts/finance
chmod 770 /depts/*
chmod g+s /depts/*
chown sam /depts/managers
ls -l /depts/</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install and Update rpms</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>rpm -ivh filenamex.i386.rpm
rpm -Uvh filenamex.i386.rpm
Verify an RPM:
rpm --import /usr/share/rhn/RPM-GPG-KEY
rpm -K /tmp/rpmversion.i386.rpm</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install from yum Repository</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/yum.conf
/etc/yum.repos.d/</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>System Bootloader</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/boot/grub/grub.conf
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/vg00/lv00  crashkernel=128M@16M
# initrd /initrd-version.img</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Implement Software RAID</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>partprobe
mdadm -C /dev/md0 -l 5 -n 3 /dev/hda6 /dev/hda7 /dev/hda8
mke2fs -j /dev/md0
/etc/fstab
mdadm --detail /dev/md0
fail, recover, add:
mdadm /dev/md0 -a /dev/sda1</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Set Kernel Run-time Parameters</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>vi /etc/sysctl.conf
xxx.xx.xxx=1
sysctl -p
sysctl -a | grep xxx</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Diagnose and Correct Boot Failures</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/rc.d/rc.sysinit
/etc/rc.d/rc adn /etc/rc.d/rc?.d
/etc/rc.d/rc.local
/boot/grub/grub.conf
filesystem
/etc/fstab
fsck /dev/hda</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Create a Logical Volume</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>First create physical volume, then volume group, then logical volume
     PV -&gt; VG -&gt; LV
pvcreate /dev/hda6 /dev/hda7 /dev/hda8
vgcreate vg0 /dev/hda6 /dev/hda7
lvcreate -L 500M -n data0 vg0
ext2online /dev/vg0/data0 </Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>SELinux</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>getenforce
setenforce 1
check context with ls -Z
chcon -R --reference /var/www/html /var/www/html/wwwnew</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Configure HTTP</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>install httpd
modify /etc/httpd/conf/httpd.conf file
service httpd restart
chkconfig httpd on
service httpd configtest</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Configure Samba Share</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install samba
vi /etc/samba/smb.conf
configure firewall</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>NFS</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Modify /etc/exports 
start nfs &amp; portmap
verify config, &amp; check mounts
exportfs -v
showmount -e localhost
rpcinfo -p localhost
service nfs reload</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Automount</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>mkdir /net
vi /etc/auto.master
start services -- portmap, autofs</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>FTP</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>install vsftpd
create incoming directory
mkdir -p /var/ftp/incoming
vi /etc/vsftpd/vsftpd.conf
start vsftpd
service vsftpd start</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Web proxy</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install squid, and start the service
 vi /etc/squid
service squid reload
Configure browser to test</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>SMTP</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install sendmail, sendmail-cf, sendmail-doc
modify /etc/mail/sendmail.mc
m4 sendmail.mc &gt; sendmail.cf (or make)
service sendmail restart</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>IMAP, IMAPS, and POP3</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>install dovecot
vi /etc/dovcot.conf
protocols = xxx
service dovecot restart
 chkconfig dovecot on</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>SSH</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/ssh/
~/.ssh/</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>DNS</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install bind, bind-utils, and caching-nameserver
vi /etc/named.conf
To verify:
  named-checkconf
  named-checkzone example.com example.com.zone
Check /etc/resolv.conf on client machines</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>NTP</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/ntp.conf
ntpstat
 service ntpd restart</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Firewall</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/etc/sysconfig/iptables
iptables -L
iptables -F
service iptables save
service iptables restart
chkconfig iptables on</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>PAM</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>/lib/security/
/etc/pam.d/</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
    <Card>
      <FrontSide Orientation="LTR" RepeatByTyping="false">
        <Text>Configure Service</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </FrontSide>
      <ReverseSide Orientation="LTR" RepeatByTyping="false">
        <Text>Install RPM
rpm -ivh servicename.rpm
Modify Configuration and Firewall
Start Service
service servicename restart
Set Service to Start on Reboot
chkconfig servicename on</Text>
        <Font Background="-1" Bold="false" Family="Dialog" Foreground="-16777216" Italic="false" Size="12"/>
      </ReverseSide>
    </Card>
  </Batch>
  <Batch/>
  <Batch/>
</Lesson>

