Pages

Wednesday 12 December 2012

RHCE Preparation, How to Prepare for Red Hat Certification.

Some rights reserved by Clifford


1st Part Welcome
1.       Concentration mainly on commandline tool only
2.       GUI is not always available
3.       Command line is quicker
4.       Exam is completely hands on based
5.       RHEL6 system only to be used
6.       Rebuilds like CentOS or scientific linux may be used as well. These use the RPM’s provided by Red Hat to public downloads
7.       Open Source code is available and Rebuilds use the same code.

2nd Part Practice Requirements
1.       Compatible H/W list is available on www.redhat.com/rhel/compare
2.       For installation any 32 bit or 64 bit machine can be used with minimum 512 MB or 1 GB RAM
3.       Using Virtual Machine is fine
a.       VirtualBox
b.      VMWare Player
c.       Parallels Desktop for MAC
d.      Virt Manager built in kernel
3rd Part Basic Installation
1.       Kickstart Installation is the only method that is covered in RHCSA
2.       Basic Installation needs to be known
3.       Insert the disc after starting the computer
4.       Select Install or Upgrade an existing system
5.       Skip the check for installation media as per requirements
6.       Click next
7.       Choose Language and choose next
8.       Choose keyboard type and next
9.       Select Basic/Specialized Storage device and Next
10.   Yes Discard any data and next
11.   Hostname choose
a.       Enter host name
b.      Click configure network
c.       Choose system eth0 device
d.      Click edit
e.      Check mark connect automatically
f.        Check IP4 setting automatic DHCP
g.       Apply and close
12.   Click next
13.   Time zone select
14.   Root Password and confirm and next
15.   Installation method select use all space
16.   Check review and modify partition lay out and observe
17.   Write changes to disk select
18.   Install Bootloader to a particular location
19.   Choose Bootloader password if needed and next
20.   What type of installation needed and next
21.   System installation starts and after it ends Reboot
22.   Restart First boot screen
23.   Final configuration steps ‘Forward’
24.   Agree license Forward , Register Later
25.   No thanks I’ll connect to RHEL later
26.   Username and other details Forward
27.   System Time set
28.   Finish
4th Part KickStart Files
1.       Automated installation using kickstart
2.       Kickstart installations are performed based on files that contain instructions of how the system needs to be setup
3.       A kickstart configuration file is automatically created by the anaconda installer at the end of the RHEL installation
4.       This file is saved in the root user’s home directory called Anaconda-ks.cfg
5.       You can manually create a kickstart file manually by the system config kickstart utility
6.       Application > system tools > kickstart
7.       This application is not installed by default however its easy to get it post installation
8.       Open kick start file to view its content
# kickstart file automatically generated by anaconda
# version = DEVEL
Install cdrom  //this means installation media was cdrom
Network enable //network was enabled
Root password encrypted
Firewall started ssh port opened
Shadow password for authentication
Selinux—set to enforcing mode
Timezone -> set
Bootloader
Below this is hard drive and LVM layout
All are commented by ‘#’ reason being a new system requiring the file may not have same hard drive layout
Installation repository name RHEL
Packages section have all software info ‘@’ indicates package group
‘@’ absent indicated individual package
‘-‘ indicates package excluded from install
9.       Uncomment the drive details since we need it for the automated install later
10.   The system configuration kickstart file can be used to modify existing kickstart config file as well
11.   File > open > select anaconda-ks.cfg and fields will be automatically filled along with partition info
12.   Display configuration : if we do not include directives for installing Graphical Desktop Environment than the 1st boot service will not run after the installation has finished. In this event u will have to manually add a user to the system. By default kickstart only defines a root user, we can add a new user to kickstart file with ‘user’ directive
13.   Simplest place to specify a user is right below the root user in the kickstart file
User –name=Kenny –password=pass1234
5th Part Rhel installation from kickstart file
Network location install
1.       You can use kick start file from a:
a.       Network location
b.      Cd
c.       hard drive
d.      web location
e.      ftp server
f.        nfs server
g.       usb device
2.       basic syntax is the same
3.       modify location every time
4.       steps to install
a.        boot install media
b.      press escape key
c.       boot prompt appears
d.      boot: linux ks=nfs:192.168.75.132:/srv/nfs/ks.cfg (enter)
5.       (nfs folder needs to be shared out)
6.       installation will finish automatically press reboot at the end


6th Part Accessing terminal

1.       application > system tool > terminal
2.       steven born > bourn shell
3.       bash shell default
4.       change color edit preferences
5.       virtual/tty(teletype) console ctrl + alt + f1 to f6 while in gui
6.       enter username password n access is it
7.       while in tty console u can switch to any other console by alt+f1 to f6
8.       shift and page up and page down key to scroll up and down in the tty console
9.       to return to desktop ctrl+alt+f7
10.   all the Linux config files are in human readable format
11.   login shell for example
12.   when a login shell is started it is run from /etc/profile
13.   this scripts has users environment variables such as users path, hostname, history size, iot will also run the scripts in /etc/profile.d
14.   next the .bash_profile script in the users home directory is run this script modifies some of the environment variables stored in /etc/profile scripts
15.   next the .bash_prifile script cause the .bashrc script in the users home directory
16.   this script sets some of the local variables such as ps 1 variables which dictates how the command prompt appears
17.   a non login shell utilize the same scripts just in a different orders
18.   the 1st script that runs in the non login shell is the .bashrc script in the home directory
19.   this script in turn calls the  etc/bashrc scripts and this script calls the etc/profiel.d


7th Part Basic Commands

1.       ls- list directories
2.       ls-l long listing permission, user ownership n file size
3.       ls –lh file size in human readable
4.       ls –a hidden file and all other files with ‘.’
5.       Cd change directory cd /dir_name
6.       Cd .. to parent directory
7.       Cd -~ home directory
8.       Pwd print working directory
9.       Clear to clear screen
10.   Mkdir to make a directory
11.   Mkdir –p  subdirectory beneath a directory /name/name1/name12
12.   Rmdir to remove a directory only works on empty directory
13.   Rmdir –p whole tree provided empty
14.   Cp copy files n folder from one to another
15.   Rm to remove files n dir that has content
16.   Rm -f to not have warning before delete
17.   Rm –r to remove directory with content
18.   Mv to moves files n directory also used to rename
19.   Less to read content of file scroll using up and down using arrow key and skip page using page up and page down keys or use j and k to scroll and press q  to quit
20.   Man to print manual page associated for each command ‘/’ we can search whatever we want to search in the manual page quit by q
21.   Apropos term_name to get details of any particular term existing it will give a list of the details present about that term in any of the commands and display it. By default there will be a number associated with every page e.g number 8 is for system administration tasks number 1 shows commands available for regular users 5 for specific file formats and configuration files
22.   –help can be used with any command to see what options to be used with that command
23.   Info much like man pages but may have more info not all commands have info pages

9th Part Cat and Nano

1.       Cat is short for concatenate we can join many files into one or we can concatenate output of the terminal into a new file.
2.       Also used to show content of a file in terminal
3.       To create anew file into terminal using cat use the following syntax cat << EOF > test.txt (enter) input_your_text EOF(end of file)
4.       Cat filename.txt to read its content
5.       To combine files into new file cat file1.txt file2.txt > file3.txt
6.       NANO text editor
7.       Type nano (enter)
8.       Similar to edit text editor
9.       Type text
10.   Ctrl o to save file filename to file exit by ctrl x
11.   Nano space filename
12.   Ctrl x to exit
13.   Ctrl w for searching ctrl r to replace
14.   Ctrl g to help on nano

10TH Part Vim

1.       Improved Vi
2.       Installed and available by default
3.       Buy borrow editor lets u view contents but not modify  it. Editor mode to modify
4.       Enter vim and press enter u will get a welcome screen
5.       :help to see help to use VIM j n k to navigate
6.       :q to quit file
7.       I for insert mode
8.       Esc to normal mode
9.       Save the file esc :wq
10.   :q! close without saving
11.   Vim filename
12.   Shift+a to end of line append
13.   0 to move cursor to beginning of the line
14.   O to go beneath the beginning of the present line
15.   K to move up
16.   Yy to yank the line i.e copy
17.   P to paste
18.   U to undo
19.   Delete the 1st character by x key
20.   Vimtutor to instructions