LinuxCBT Systemd Edition Notes

November 12, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download LinuxCBT Systemd Edition Notes...

Description

 

# LinuxCBT 'systemd' Edition # Features:  1. System && Service Manager  !reedes"to.org$%i"i$So!t%are$systemd !reedes"to.org$%i"i$So!t %are$systemd   a. System   a1. system initiaiation   a(. o%er state o! mac)ine: u* do%n* susended* )y+rid* etc.   +. Service Manager   +1. ,sersace management o! daemons -services   +(. Management o! ot)er system units: devices* daemons* soc"ets* d+us* etc. /0TE: 'systemd' is an aencomassing system manager !or Linux %)ic) stands in star" contrast to tyicay* conventiona ,nix  Linux )ioso)y o! simicity o! various services* executa+es* !unctions* etc.  (. 'systemd' is /0T !or ot)er 2/ixes  excusivey a Linux management !rame%or"   a. Some orta+iity is ost* )o%ever* many Linuxseci!ic !eatures are gained  3. /e% 4/4T system  Most ma5or distros no% use: 'systemd': i.e. 6e+ian* 7ed8at and SuSE* and eventuay: ,+untu  9. rovides comre)ensive unit management: -services-daemons* devices* at)s* etc.   a. ;+straction o! ;LL imortant o+5ects on a Linux system: i.e. )ard drive* service* mount oints* etc.  . rovides !aster +oot times due to a variety o! !eatures:   a. Soc"ets are created +y 'systemd' rior to daemoninvocation: simiar to 0S?'s 'aunc)d'   +. i.e. 6Bus re@uests are @ueued unti t)e service is ready  A. Manages various !acets via 'unit' !ies -units:   a. ,nit !ies tend to end %it) a su!!ix t)at matc)es t)e aricuar o+5ect tye: i.e. '.service'   +. '.service'-daemons* '.mount'-$etc$!sta+* etc.* '.at)'* '.device'* '.soc"et'* '.target'-runeve* '.snas)ot'* '.timer'-cron* etc.  . /0TE: '.service' units reace Sys=stye 4/4T scrits . Sys= and LSB 4nitscrits comati+e /0TE: 6on't %orry i! your rogram does /0T )ave a '.service' 'systemd' o+5ect !ie* it's Sys= !ie %i +e read and rocessed 1D. Service management via: 'systemct': status  start  sto  restart  ena+e  disa+e 11. L0 o! start  sto o! daemons  incudes: 46 and Timestam  audit trai o! service )istory 1(. 7uneve contro  'targets' 7EL;CE 7uneves -D-o%ero!!s)utdo%n* 1-rescue emergency* (3-mutiuser* -re+oot 13. State contro: emergency* rescue* o%ero!!* restart* )i+ernation* susension 19. 'systemd' units  encasuation o! services* soc"ets* system state snas)ots* targets* etc. 1. Comete L0s !rom startu  s)utdo%n: interim L0s are +u!!ered to '"msg' L0 t)en !us)ed to: $dev$og 1A. araeiation o! service invocation at startu signi!icanty exedites system startu /0TE: T)e system may come u muc) @uic"er* +ut services may ta"e onger to +e 'ready' 1. Management o! 'Contro rous' -Gerne !eatures: 8ierarc)y o! a+eed rocesses: '$sys$!s$cgrous' /0TE: T)is ma"es it ossi+e to roery manage arentc)id-ren rocesses

 

1. Mount  ;utomount management (D. Service do /0T in)erit environment: H;T8 && 80ME !rom current H,SE7  more secure (1. 7emote invocation$management o! remote systems using 'systemct' via: '8 80ST'  reies on ass%ordess;,T8-SS8 /0TE: T)is* again* is /0T ossi+e %it) current: Sys= environment ((. 'systemd' rovides usersace M,C8 @uic"er +ecause o! various tric"s (3. 0ndemand -eventdrivent invocation o! services: i.e. TTIs -agetty # Boot rocess # B40S  7,B  Gerne$4/4T76  'init'-46J1  ,ser Sace B40S  7,B  Gerne$4/4T76  'systemd'-46J1  ,ser Sace -@uic"er Tas"s:  1. Evauate various startu %it) 'systemd' times* etc. /0TE: 'tty1' is a%ays sa%ned regardess o! targets: 'mutiuser'  'gra)ica' /0TE: 4n contrast to tyica 'sysvinit' startus* 'systemd' does /0T autosa%n ;LL TTIs /0TE: TTIs are saned ondemand  eventdriven-CT7L;LTF-/,M  (. K)at a+out 'init'   a. '$usr$s+in$init  ..$i+$systemd$systemd'  ointer to: 'systemd'  3. K)at a+out 'init' runeves -D..> /0TE: Sti t)ere* and oosey e@uivaent to 'systemd' targets   a. 'init >'  re+oots 'systemct re+oot' /0TE: Iou may sti ass 'init' runeve vaues on Gerne command ine: i.e. '1'  9. C)ange Boot Targets using 'systemd' notation -targets   a. 'systemd.unitJT;7ET'  i.e. 'muti.user.target'-(3  'rescue.target'-1  'emergency.target'-1  'gra)ica.target'- may +ecome your goto TTI %)en aternating +et%een targets  9. C)ange 6e!aut Target on ;LL systems to +e 'mutiuser.target'   a. 'systemct getde!aut' && 'systemct setde!aut T;7ET' /0TE: 'init /,M'  sti %or"s to ac)ieve t)e various targets # 'systemct' # Features:  1. rimary management too !or: 'systemd'  (. 7eaces various o%er management commands:   a. ')at'   +. 're+oot'   c. 'o%ero!!'   d. ')i+ernate'   e. etc. Tas"s:  1. 7e+oot  o%ero!!   a. 'systemct Rno%a re+oot Ri'  're+oot'-symin"ed to: systemct'   +. 'systemct OO o%ero!! '   c. 'systemct OO susend'  dums state to 7;M -!aster recovery t)an ')i+ername' -does not ersist across o%er outages on 80ST /0TE: t)e 80ST system to +e on in order to reserve t)e contents o! t)e'susend' susendedre@uires state /0TE: 7esumtion occurs @uic"y and o!ten %i /0T +rea" active SS8 sessions

 

  d. 'systemct OO )i+ernate'  dums t)e state to dis" -ersists across o%er outages  (. Service Management %it): 'systemct'   a. 'systemct Ristunits'  dums ;LL managed units: services* devices* at)s* mounts* soc"ets* targets* etc.   +. 'systemct istsoc"ets'  ists oaded soc"ets* ordered +y address   c. 'systemct !aied'  ists !aied units   d. 'systemct status R/;ME...R46...   s)o% runtime stats o! unit-s   d1. 'systemct ss) aac)e('  enumerates status o! +ot) services /0TE: Status returns current status and recent L0 detais   e. 'systemct s)o% R/;ME...R46...   s)o% runtime stats o! unit-s'  reveas roerties o! t)e unit-s   !. 'systemct tye service'  ists services   !1. 'systemct tye service  gre tty'  enumerates currentyoaded TTIs   g. 'systemct tye device'  ists devices   ). 'systemct tye soc"et'  ists soc"ets  3. Manage Service   a. 'systemct status -aac)e()ttd'   +. 'systemct -startstoreoadrestart -aac)e()ttd'   c. 'systemct "i -aac)e()ttd'  Ena+e Services  9. a.6isa+e 'systemct disa+e -aac)e()ttd && systemct re+oot'  con!irm   +. 'systemct ena+e -aac)e()ttd ' /0TE: Iou may sti start a disa+ed service  daemon # 7emote Contro # Features:  1. Execute systemdreated commands on remote targets  (. rovided utiities suort t)e remote otion: '8 T;7ET'  3. 7e@uires SS8 ass%ordess;,T8 setu to avoid romts er invocation /0TE: For +asic* nonrivieged tas"s using 'systemct'* setu ass%ordess;,T8 as nonrivieged i.e. 'inuxc+t'  'inuxc+t'-remote target Tas"s:  1. 'systemct 8 1(.1>.A
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF