This document was ed by and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this report form. Report 3i3n4
RHCE "Cheat Sheet" This document attempts to provide answers to all study points on the RHCE and RHCT Exam Preparation Guide in a single-page (and thus, printable) format. This is not a “brain dump” or an attempt to cheat the RH302 exam in any way. These are just my self-study notes. Use them at your own risk. Note: Study points last updated on 2009-08-11. This list may become out of date without notice (especially after I the test ). updated by Dino Conti on 2010-06-25
Table of Contents RHCE "Cheat Sheet"............................................................................................................................1 Testing Environment with Sun VirtualBox......................................................................................4 Prerequisite skills for RHCT and RHCE.........................................................................................4 use standard command line tools (e.g., ls, , mv, rm, tail, cat, etc.) to create, remove, view, and investigate files and directories............................................................................................4 use grep, sed, and awk to process text streams and files.............................................................4 use a terminal-based text editor, such as vim or nano, to modify text files................................4 use input/output redirection........................................................................................................4 understand basic principles of T/IP networking, including IP addresses, netmasks, and gateways for IPv4 and IPv6........................................................................................................5 use su to switch s.....................................................................................................5 use wd to set s.......................................................................................................5 use tar, gzip, and bzip2................................................................................................................5 configure an email client on Red Hat Enterprise Linux..............................................................5 use text and/or graphical browser to access HTTP/HTTPS URLs.............................................5 use lftp to access FTP URLs.......................................................................................................5 HELP in RHEL5.........................................................................................................................5 RHCT skills.....................................................................................................................................6 Troubleshooting and System Maintenance.................................................................................6 boot systems into different run levels for troubleshooting and system maintenance.............6 diagnose and correct misconfigured networking....................................................................6 diagnose and correct hostname resolution problems..............................................................6 configure the X Window System and a desktop environment...............................................6 add new partitions, filesystems, and swap to existing systems..............................................7 partitions............................................................................................................................7 filesystems.........................................................................................................................7 swap...................................................................................................................................8 use standard command-line tools to analyze problems and configure system.......................8 Installation and Configuration....................................................................................................8 perform network OS installation............................................................................................8 implement a custom partitioning scheme...............................................................................8 configure printing...................................................................................................................8 configure the scheduling of tasks using cron and at...............................................................9 cron....................................................................................................................................9 at/batch...............................................................................................................................9 attach system to a network directory service, such as NIS or LDAP...................................10 configure autofs....................................................................................................................10
add and manage s, groups, quotas, and File Access Control Lists................................10 s......................................................................................................................................11 groups...................................................................................................................................11 quotas...............................................................................................................................11 Access Control Lists........................................................................................................12 configure filesystem permissions for collaboration.............................................................12 install and update packages using rpm.................................................................................12 properly update the kernel package......................................................................................13 configure the system to update/install packages from remote repositories using yum or pup ..............................................................................................................................................13 create yum repository from installation DVD.................................................................13 modify the system bootloader..............................................................................................14 implement software RAID at install-time and run-time.......................................................14 use /proc/sys and sysctl to modify and set kernel run-time parameters...............................14 use scripting to automate system maintenance tasks............................................................15 configure NTP for time synchronization with a higher-stratum server................................15 RHCE skills...................................................................................................................................15 Troubleshooting and System Maintenance...............................................................................15 use the rescue environment provided by first installation CD.............................................15 diagnose and correct boot failures arising from bootloader, module, and filesystem errors15 grub errors........................................................................................................................16 kernel errors.....................................................................................................................16 diagnose and correct problems with network services (see Installation and Configuration below for a list of these services).........................................................................................16 add, remove, and resize logical volumes..............................................................................17 diagnose and correct networking services problems where SELinux contexts are interfering with proper operation...........................................................................................................17 Installation and Configuration..................................................................................................18 HTTP/HTTPS.......................................................................................................................19 install...............................................................................................................................19 selinux..............................................................................................................................19 start at boot......................................................................................................................19 basic config......................................................................................................................19 host-based security...........................................................................................................20 -based security...........................................................................................................20 service functionality..............................................................................................20 SMB......................................................................................................................................20 install...............................................................................................................................20 selinux..............................................................................................................................21 start at boot......................................................................................................................21 basic config......................................................................................................................21 host-based security...........................................................................................................22 -based security...........................................................................................................22 service functionality..............................................................................................22 NFS.......................................................................................................................................23 install...............................................................................................................................23 start at boot......................................................................................................................23 basic config......................................................................................................................23 host-based security...........................................................................................................23 -based security...........................................................................................................23 service functionality..............................................................................................23 FTP.......................................................................................................................................24
install...............................................................................................................................24 selinux..............................................................................................................................24 start at boot......................................................................................................................24 basic config......................................................................................................................24 host-based security...........................................................................................................24 -based security...........................................................................................................24 service functionality..............................................................................................24 Web proxy............................................................................................................................24 install...............................................................................................................................24 selinux..............................................................................................................................24 start at boot......................................................................................................................25 host-based security...........................................................................................................25 with blocklist.........................................................................................25 -based security...........................................................................................................25 service functionality..............................................................................................25 SMTP....................................................................................................................................26 to enable masquerading in sendmail................................................................................26 install...............................................................................................................................27 start at boot......................................................................................................................27 basic config......................................................................................................................27 host-based security...........................................................................................................28 -based security...........................................................................................................28 service functionality..............................................................................................28 IMAP, IMAPS, and POP3....................................................................................................28 install...............................................................................................................................28 start at boot......................................................................................................................28 basic config......................................................................................................................28 create custom ssl cert: .....................................................................................................28 host-based security...........................................................................................................28 -based security...........................................................................................................29 service functionality..............................................................................................29 SSH.......................................................................................................................................29 install...............................................................................................................................29 start at boot......................................................................................................................29 Generate Public / Private key pair...................................................................................29 -based security...........................................................................................................29 host-based security...........................................................................................................29 service functionality..............................................................................................29 DNS (caching name server, slave name server)...................................................................30 install...............................................................................................................................30 start at boot......................................................................................................................30 basic config......................................................................................................................30 host-based security...........................................................................................................31 -based security...........................................................................................................31 service functionality..............................................................................................31 NTP......................................................................................................................................31 install...............................................................................................................................31 start at boot......................................................................................................................31 host-based security...........................................................................................................31 -based security...........................................................................................................31 service functionality..............................................................................................31 configure hands-free installation using Kickstart.................................................................32
implement logical volumes at install-time...........................................................................32 use iptables to implement packet filtering and/or NAT........................................................32 packet filtering.................................................................................................................32 NAT.................................................................................................................................32 setup for router to internet...............................................................................................33 use PAM to implement -level restrictions......................................................................33 module documentation.....................................................................................................33 module configuration.......................................................................................................33 pam_listfile.so example...................................................................................................34 Additional Notes............................................................................................................................34 t_wrappers.............................................................................................................................34 Troubleshooting........................................................................................................................34 unable to .....................................................................................................................34
Testing Environment with Sun VirtualBox install guest additions: yum install gcc kernel-devel sh /media/VBOXADDITIONS*/VBoxLinuxAdditions-x86.run reboot
Prerequisite skills for RHCT and RHCE Candidates should possess the following skills, as they may be necessary in order to fulfill requirements of the RHCT and RHCE exams:
use standard command line tools (e.g., ls, , mv, rm, tail, cat, etc.) to create, remove, view, and investigate files and directories use grep, sed, and awk to process text streams and files use a terminal-based text editor, such as vim or nano, to modify text files use input/output redirection operator description > redirect STDOUT to a file 2> redirect STDERR to a file &> redirect all output to a file 2>&1 redirect all output to a pipe • use » to append instead of overwrite
understand basic principles of T/IP networking, including IP addresses, netmasks, and gateways for IPv4 and IPv6 use su to switch s su - <>
use wd to set s wd <>
use tar, gzip, and bzip2 # compress (tar/gzip) tar cvzf
.tgz
# extract (tar/gzip) tar xvzf
.tgz # compress (tar/bzip) tar cvjf
.tbz
# extract (tar/bzip) tar xvjf
.tbz
configure an email client on Red Hat Enterprise Linux echo "message" | mail <email> -s "subject" mail <email> -s "subject" <
use text and/or graphical browser to access HTTP/HTTPS URLs • elinks • lynx
use lftp to access FTP URLs
HELP in RHEL5 man
man -k
search for specific word in manuals
makewhatis
create manuals database
command --info /usr/share/doc/<service or package>
installed documentation
/usr/share/doc/Deployment-Guide
all the manual
System > Documentation > Deployment Guide elinks /var/www/manual/
Apache Documentation
RHCT skills Troubleshooting and System Maintenance RHCTs should be able to: boot systems into different run levels for troubleshooting and system maintenance append the desired runlevel to grub's kernel line: • 1-5 runs appropriate rc and init scripts • single only runs rc.sysinit • emergency skips all rc and init scripts diagnose and correct misconfigured networking 1. 2. 3. 4. 5. 6. 7. 8. 9.
check /etc/sysconfig/network check /etc/sysconfig/network-scripts/ifcfg-
service network restart chkconfig network on ifconfig ping
netstat -r ping <default gateway> ping 4.2.2.2
redhat network config tool: system-config-network
diagnose and correct hostname resolution problems 1. 2. 3. 4.
configure the X Window System and a desktop environment install x: yum groupinstall "x window system"
• init respawns /etc/X11/prefdm -nodaemon to keep x running in runlevel 5 • startx to start manually xfs is supposedly required for x windows (even though i can run x fine without it…):