Showing posts with label RHCSA. Show all posts
Showing posts with label RHCSA. Show all posts

Monday, May 21, 2012

RHCSA "Cheat Sheet"

I've got the RHCSA scheduled for June 8th.Originally, I was scheduled to take the exam back in early April, but I had two classes cancelled on me. As it turns out, if the RH200 5 day class isn't booked by at least 4 people, the class and exam are cancelled. Consequently, it's best to call and book over the phone in order to see which classes are "GTR" or guaranteed to run.

In my final preperation for the RHCSA I've gone through and found some good references for a "cheat sheet," pulling from Michael Jang's RHCSA/RHCE study guide as well as this fantastic wiki: http://rhce.co/rhel6/Main_Page for those seeking their RHCSA.The RHCE portion is incomplete, but the RHCSA part is complete and only slightly outdated. It is a fantastic resource.

Between those two sources, notes from Tommasino's Hands-on Guide to the RHCSA/RHCE, and my personal knowledge, I put together this study guide based on the RE200 exam objectives as of 2012 05 15.


Objectives:

Understand and use essential tools

  • Access a shell prompt and issue commands with correct syntax.
    • Change TTY
      • ctrl+alt+F1 
        • F1-F7 are available
    • Icon on top of left of GUI
    • -Menu/Applications/System Tools/Terminal

  • Use input-output redirection (>, >>, |, 2>, etc.).
    • > overwright
    • < send into a command or file
    • >> append
    • << append into a command or file
      • cat >> hoge.txt << _end
        • cat the file
        • enter text in tot he file until _end has been met 
    • | funnel into
    • 2> redirect errors
    • 2>&1 redirect errors to std out

  • Use grep and regular expressions to analyze text.
    • grep for nocase 
      • # grep -i
    • egrep ‘^(wheel|root)’ /etc/group
    • less file | [e]grep string
    • inverted search with grep and egrep
      • grep -v ^# /etc/nsswitch.conf
        egrep -v ^# /etc/nsswitch.conf

  • Access remote systems using ssh and VNC.
    • SSH user_name@host
    • ssh with x windows pass through
      • SSH host -lX user_name
    • vncviewer remote_host

  • Log in and switch users in multiuser runlevels.
    • Runlevels 2, 3, 5
    • su - username

  • Archive, compress, unpack, and uncompress files using tar, star, gzip, and bzip2.
    • # gzip big.jpg
      # bzip2 big.jpg
      # gzip -d big.jpg.gz
      # bzip2 -d big.jpg.bz2
      # tar czvf home.tar.gz /home
      # tar xzvf home.tar.gz /home
      # yum install star
      # star -xattr -H=exustar -c -f=home.star /home/
      # star -x -f=home.star

  • Create and edit text files.
    • touch filename
    • vi filename

  • Create, delete, copy, and move files and directories.
    • touch, rm, rmdir, rm -fr, cp, mv -r, mv

  • Create hard and soft links.
    • ln source destination ## hard link
    •  ln -s source dest, 

  • List, set, and change standard ugo/rwx permissions.
    • ls -l
    • chmod +x +w +r, 
    • chmod 755 ##folders default
    • chown user.group
    • chgrp

  • Locate, read, and use system documentation including man, info, and files in /usr/share/doc.
    • man command_name
    • man -k command_name
    • search for command in the doc directory
    • ls -l /usr/share/doc | grep httpd

Note: Red Hat may use applications during the exam that are not included in Red Hat Enterprise Linux for the purpose of evaluating candidate's abilities to meet this objective.

Friday, March 16, 2012

Primer on reading Michael Jang's Red Hat Linux Certification Study Guide

I started reading Michael Jang's RHCSA/RHCE Red Hat Linux Certification Study Guide about 2 weeks  ago, then took a brief detour (3 days) to get my VM server up and running (see post - RHCSA Labs and Shuttle trouble - Just Getting Started). I'm working my way through the book and although it gets great reviews and is it's a great reference, I can't help but feel it's a tad all over the place.

For instance, The first couple of chapters have labs working through the chapter that are referenced at later points in the book (with things like "if you followed the previous lab, you should be here..."). However, it's never really clear if you're supposed to work those labs or only the ones at the end of the chapter, which seem a bit more official. I've been working both. On one hand the repetitive action is great, on the other it's starting to get a bit confusing.

Then there's the references to random sections in regards to previous and more advanced topics, which can drive one mad if you let it. Take SELinux for instance. When you are initially focusing on setting up VMs and deploying via kickstart, why not just set SELinux to permissive to allow a more clear focus on Kickstart? Instead there are random commands with no explanation other than referring to Chapter 4 and 11. Granted I know not all can be be explained at once, so why not circumvent the more advanced technology for the time being and address it with more a in depth explanation later in the book?

Well, enough ranting and besides, I really do like the book so far, sans the lab murkiness. Where this leads me is to a desire to list coherent directions on how to approach Jang's book. So, I'm going to layout how I am doing the initial 2 chapters and hope that will help keep me straight on what's going on.


Also, take note, some of the same tasks need to be done multiple times.


Chapter 1 Tasks:
  1. Read through chapter 1 without attempting exercises or labs
  2. Note drive partition suggestions (somewhat important for VM labs).
  3. Note basic installation steps
  4. Download demo of RHEL, download Scientific Linux 6 / CentOS 6 
    1. I grabbed a 30 day evaluation of RHEL (requires registration) and the flavors
  5.  Do Exercise 1.1 - Partitioning during install of RHEL (or flavor) on VM server
    1. if you setup the VM host as part of exercise 1, ignore the partitions he noted as you will need more space for VMs
    2. I'm working remotely, so setup VNC for host machine. Here's good instructions. 
  6. Follow along with noted basic installation steps
  7. If using a server to host VMs, ensure it is KVM capable Intel vmx or AMD svm
    1. #egrep "vmx|svm" /proc/cpuinfo | less
      1. in less type "/vmx" to search for vmx in the results
  8. Setup and configure default file sharing services (http & ftp) on VM host
  9.  Do Exercise 1.2 - configure Apache and vsFTP  on VM host
  10. Do Lab 1 
  11. Do Lab 2 - copy install media contents to the share directory on VM host
  12. Do Lab 3

Chapter 2 Tasks:
  1.  Ensure KVM is installed (pdf p.4-6)
  2. Ensure the KVM modules are installed correctly
    1. #lsmod | grep kvm
  3. run "virt-manager" with root privileges from a shell within the GUI
    1. The hypervisor (virt-manager) is supposed to prompt for the root password if run from a normal user, but I was unable to run it at all that way. Thus, VMM was not an option from the user's desktop menu
  4. Do Exercise 2-1 within the hypervisor
  5. Configure and create a VM (pdf p.15-19)
  6. Do Exercise 2-2 with the VM you just created (why wasn't that an exercise?)
  7. Note the VM deletion method on p.24
  8. Configure VM server to be a kickstart server (pdf p.29-31)
  9. Do Exercise 2-3
  10. Install kickstart configurator and create kickstart file with it.
    1. *Name it something different than the ks config from Exercise 2-3
  11. Configure X over SSH on VM server or one of the VMs
  12. Work through the 8 Labs. 

 The rest of the chapters are a bit more straight forward and so I won't do a layout for them.

 As another side note, Chapter 4's primer on SELinux can be well supplemented by the following:

Red Hat Enterprise Linux 6 Security-Enhanced Linux - User Guide

Linux Journal's Paranoid Penguin - Introduction to SELinux
Linux Journal's Paranoid Penguin - Introduction to SELinux, Part II

Tuesday, March 6, 2012

RHCSA Labs and Shuttle trouble - Just Getting Started.

I began studies on the RHCSA last week. If you look at my last post, I have my usual month of study plan laid out with labs, reading, CBTs, etc. Although this time I'm a bit behind.

My home VM server is a Shuttle SH67H3 with an Intel Core i7 2600 (non K version as it doesn't support vt-d), 16Gb RAM, and a couple of corsair SSDs. I was running VMware ESXi 5 on it and it was stable with a few Linux VMs. However it did not support the on board RAID as it was seen as a software or fake raid.



With the RHCSA studies, I need to lab, a lot.  Although I do a lot of the work daily in my current position, we use Xen while RHEL 6 uses KVM as default. This means the RHCSA is based on KVM, not Xen. Thus I had to reformat the Shuttle. Now, the fun part.

For install media, I usually go for a USB stick first, then if thta doesn't work, I'll  attach a SATA blu-ray burner (I don't keep a CD attached to the server). Initially, I tried the USB drives and loaded Scientific Linux 6 on the drive using dd on my Mac Pro (here's some instruction, although block size should be 256k for a quicker copy "bs=256k"). It was a no-go. Then I tried burning an ISO. Still a no-go. I removed all devices sans the DVD-Rom, tried both media again, no-go. Ok, whats happening here?

 I did some googling and found a  few notes about issues coming up with Intel's UEFI (new kind of bios). The UEFI is supposed to bring all sorts of magic, but I didn't see any in the SH67H3's BIOS. It seems UEFI can grab a list of boot devices and store it in NVRAM of which it somehow cannot be recovered with out a bios flash (don't quote me on this). Great. I'm 2 days behind in studies now and still no booting from media, old HDDs, yes. Odd.

The next few steps are the same as usual, reset the bios, switch USB ports, verify USB media on other computers, Verify DVD media, switch SATA ports, switch SATA mode, etc. By luck and good troubleshooting I ended up with the DVD drive on one of the Intel RAID SATA ports and the BIOS SATA setting set to "IDE." Bam! It worked. Ok, put everything back, SSDs on the Intel RAID, host drive on the other SATA ports, and try it again. It's a no-go! Turns out the only way to boot from the DVD was to have the drive on the Intel RAID ports. So, I got Scientific Linux 6 installed on the host drive and went to work doing the basic configs, finally.

Now to play catch-up.