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

Sunday, September 18, 2016

domain name registrar (organisasi yang mengatur reservasi domain name di dunia)

list domain name registrar di dunia:

registrar


cara mengecek domain name reseller:

cek domain


cara mengecek propagation dns ( dns yg telah diregisterkan telah dikenali oleh seluruh dns server di dunia )

cek propagation



Friday, September 16, 2016

bridge

bridge = menghubungkan 2 buah LAN / membagi sebuah LAN menjadi 2 buah segmen.
Tujuannya untuk mengurangi traffic agar meningkatkan performa jaringan komputer.



bridge = menghubungkan 2 buah segmen saja. Bridge hanya mengenali alamat fisik host (MAC address).

00:20:d1:c2:e7:50  -> cth mac address.   ( terdapat di NIC  adapter komputer ).

setiap host memiliki mac address yang unik. Sehingga dapat mengetahui host mana yang 1 segmen dan mana yang berbeda segmen. Jika ingin menghubungkan banyak segmen maka harus menggunakan multiport bridge (switch).



beban traffic tinggi = router
beban traffic rendah = bridge.

jika traffic terlalu tinggi dapat menyebabkan bottleneck dan mempengaruhi performa network (bridge).



===============
perbedaan bridge dan router


- bridge

  • tidak mendukung ip address. hanya mengenali MAC.
  • menghubungkan 2 buah segmen namun dalam 1 subnet.
  • tidak dapat memblock traffic dari subnet lain.
  • cocok untuk digunakan pada LAN .

- router

  • mendukung network protokol address seperti IP, IPX, AppleTalk.
  • dapat menghubungkan beberapa subnet yang menggunakan teknologi yang berbeda.
  • mampu memblock traffic antar subnet.
  • cocok digunakan pada sembarang protokol network.
  • instalasi dan konfigurasi memerlukan keahlian khusus.
  • cocok digunakan untuk internet maupun LAN.



Wednesday, September 14, 2016

cisco router documentation (2)

tegangan yang dibutuhkan: +5v / -5v.  +12v / -12v.

RAM : digunakan saat router beroperasi.
FLASH: menyimpan sistem operasi IOS.
NVRAM: menyimpan file konfigurasi secara permanen.
ROM: menyimpan data BIOS (dibaca pada saat booting).
PROCESSOR: otak pemrosesan data.
INTERFACE : perangkat tambahan untuk keperluan transfer data.


koneksi dari pc ke router menggunakan:

  • console connection 
  • modem connection 
  • telnet session   

WAN (synchronous serial port ) = DB-60 (cable).
telnet = DB-15 (cable).
Console port RJ-45 =   access langsung (console connection).  -> butuh cable rollover + adaptor RJ-45 to DB-9 (atau bisa menggunakan usb-db-9).
Console port RJ-45 (AUX) = modem connection.













cisco router documentation (1)

router:

membagi network menjadi beberapa buah subnetwork ( network-network kecil ) sehingga setiap subnetwork terisolir dari network lain sehingga berdampak positif pada performa network.

routing:
kemampuan mengetahui kemana rute perjalanan sebuah informasi (packet). Apakah ditujukan pada network satu atau ditujukan ke network yang lain. Jika paket ditujukan untuk host yang satu network maka router akan menghalangi packet-packet keluar sehingga tidak membanjiri network lain.


cisco router:

fixed.
modular.
modular access for enterprise.


fixed = interface tetap (tidak dapat diganti-ganti).
ex:

  • cisco router 700
  • cisco router 801-804,805,811,813,827
  • cisco router 1000
  • cisco router 2000
  • cisco router 2500
  • cisco router 3000


modular = interface dapat diganti sesuai kebutuhan  (digunakan untuk Wide Area Network yang lebih luas).

  • cisco router 1600
  • cisco router 1720,1750 
  • cisco router 1800,1921
  • cisco router 2500
  • cisco router 2600
  • cisco router 3600
  • cisco router 4000

modular for enterprise = interface dapat diganti-ganti sesuai kebutuhan dan menyediakan fitur tambahan.

  • cisco router 7000
  • cisco router 10000, 12000

cisco router 2500 ->  bisa modular maupun fixed.





Wednesday, September 7, 2016

vi documentation

vi ( editor used at terminal unix / linux )



command mode / insert mode

i = insert mode
esc = command mode


:w welcome.txt  = write buffer ( insert mode ) to welcome.txt  
1L,40c  ->  1 line 40 character




:q = quit


hjkl

h= left
j= down
k= up
l= right



w = word to word
b = back to word before

W= next line
B = line before

$ = end of line
^ = beginning of line
0 = the real beginning (without spaces)


gg = end of file 
G = beginning of file


{ = beginning paragraph
} = end paragraph

f a  = find “a” after word in line
F a = find a before word in line

3fa  = find the third “a” word


3jj = go 3 line down



:set number    = show number
:6   = goto line 6


c=change


x= delete
u= undo
dw = delete word
dd = delete line

2dw = delete 2 word

cw = delete word and go insert mode

cc = dd + go insert mode

2dd = delete 2 line
2cc  = delete 2 line and go inset mode



ct”  =  delete from cursor to “  and go insert mode
ci” =  find word inside quote and change it     ( almost same as ct )
ca” = find  double quote and content inside it and change

ci usually used in () or {}  to change content inside




d => delete / cut


p = paste content forward
P = paste content before

y = copy


yw =copy word
yy = copy entire line
p=paste

10p = 10x paste

14x = delete 14 character
p=paste

docker documentation

docker

docker  - > see all command list

docker search [tutorial]   -> search docker index for tutorial

docker pull learn/tutorial  ->  download image




You can think of containers as a process in a box. The box contains everything the process might need, so it has the filesystem, system libraries, shell and such, but by default none of these are running. You 'start' a container by running a process in it.



### abis didownload imagenya dirun!

docker run [image_name] [command_to_execute]

ex: docker run learn/tutorial echo “hello_world”


### install utilities like ping

docker run [image] [command]

docker run learn/tutorial  apt-get install -y ping



### save changes / commiting.  (save image with new state).

caranya ambil id dari container abs kita install ping trs di commit!

docker ps -l    ## find id of the container created by installing ping


docke commit [3 angka awal dr id] [image/namabaru]

docker commit 698 learn/ping


###coba jalanin image yg udah terinstall ping

docker run learn/ping ping google.co.id



###cara liat running container

docker ps
docker inspect [id]   -> print informasi tentang container




###docker bisa di push ke repo trus di share.

docker images   -> print smua images yg dipake
docker push learn/ping


kita cm bisa ngepush image ke namespace diri sendiri.



#### 

https://hub.docker.com/   -> free docker hub account

https://docs.docker.com/installation   -> install docker engines