Pages

Tuesday, January 24, 2017

Red Hat Certified System Administrator Documentation part 1

physical / virtual instalation.

install on virtual machine. vmware / virtualbox


min requirement:

-1gb ram.
-optical drive
-20gb disk space
-network connection
-Red Hat 7.x instalation disk
-CentOS 7.x / Scientifi linux 7


============
minimal installation.


-software selection:
> server with GUI.



-hostname: localhost.localdomain > rhelserver.example.com


-setting root password


kdump -> coredump kernel.If server crashed, os creating server memory condition and later can be analyzed using debugger.
> disable kdump  ( klo diaktifin butuh min reserved 161 memory )



- register license?


============

- choose graphical desktop software pattern  (GNOME / KDE )
- CONFIGURE 10GB root partition.
- 1 gb swap partition.
- at least 4gb disk space unused. ( buat logical volume nanti).
- set root password.
- configure DHCP


===========

1.  Understand and use essential tools

# man -k time ( -k = keyword )

# man man-pages

# grep    // filtering utilities.

# date --help  // information option.



=======

start vim -> command mode  -> insert mode (a / i / o / ins ).

esc key -> back to command mode

:wq  // write quit /save file



command mode:
dd -> delete line
u   -> undo
ctrl+r  -> redo
v -> visual mode

gg      -> top of document
$       -> end of line
^ -> beginning of line



:%s/oldtext/newtext/g    -> find all string oldtext and subtitute newtext

//  /g -> apply globally ( more than 1 times, not only 1 times ).


--------------------------------------------------
visual mode

command mode -> v

bisa gerakin cursor sampe ketitik tertentu ( ngeblock text ).
trs delete.





=======
*globbing

using wildcards. used to match filenames


ls host*     // * -> any character.
ls ?host     // ? -> one character.
ls [hm]ost   // [hm] -> host / most.
ls [!hm]ost // any word end with ost.
ls [0-9][0-9]script // start with 2 number then script




ls *host*
ls ??st*
ls [hm]ost        // host / most
ls *[0-9]*        // that have number somewhere in their names.
ls -d [!abcd]*


==========
*piping


stdin //standard input
stdout //standard output
stderr  //standard error


<    //stdin
>    //stdout
>>   //append
2>   //stderr  redirect error to file




mail -s hi root  < .      // command doesnt have to wait for input     anymore

ls > myFile         // writing output to myFile instead of screen.


grep hi * 2> /dev/tty6

==================
*piping

ps aux   ->  too long

ps aux | less // whatever output of command 1 send to cmd 2.

ps aux | awk '{print $2}' | sort -n


ps aux  // print process
awk'{print $2}'  // print 2nd colomn
sort -n   // sort by number


=============

find / -name "*.rpm"  2> /dev/null   // send output error to /dev/null not screen



find / -name "*.rpm"  2> ~/find.error  // send output to home directory and create file find.error


find / -name "*.rpm"  >> rpm-results.txt 2> /dev/null

=============


ls > ~/file_list_list.txt
sort < ~/file_list.txt


sort < file_list.txt > file_list_sorted.txt  // di sort filenya trs masukin ke file_list_sorted.txt

1 comment: