Manage services mune yako GNU / Linux kugovera

init Linux schema

Paunenge uchishanda na services mune distroZvichienderana nerudzi rwehurongwa hwauri kushandisa (SysV init, Upstart, systemd,…), nzira iyo masevhisi anogona kumiswa, kutanga, kumiswa, kutangwazve, nezvimwe zvinogona kusiyana. Iyo poindi apo vazhinji vanokahadzika kuti zvinoitwa sei chaizvo, uye chokwadi chekuti kune akati wandei masisitimu akasiyana hazvibatsire vamwe vashandisi vasina ruzivo, vanoedza kuzviita nemirairo isiriyo.

Naizvozvo, ini ndiri kuenda kunoratidza iri nyore dzidziso iyo iyo ichave yakajeka kwauri kuti ungashanda sei mune yako distro, chero zvazvingava. Kuti uite izvi, chinhu chekutanga iwe chaunofanirwa kuve kujekesa nezvacho mhando yedhimoni rauri kushandisa. Sezvandambotaura, haasi ese ma distros anoshandisa zvakafanana kutanga system mhando. Muchokwadi, sezvamunoziva, vamwe vakapikisa iyo nyowani systemd uye vakagadzira maforogo kana zvigadzirwa kubva kune yekare SysV, sezvazviri naDevuan achienzaniswa naDebian ...

Ndinoziva sei iyo system yangu distro inoshandisa? Zvakanaka, unogona kutsvaga nekutsvaga idzi nzira, uye kana uinadzo, unenge uine iyo system mune yako distro:

  • Kuti uzive kana iwe wakarongeka: tsvaga iyo nzira / usr / lib / systemd
  • Kuti uzive kana uine Upstart: tsvaga iyi imwe nzira / usr / share / upstart
  • Kuti uzive kana uine SysV init: tsvaga iyo nzira /etc/init.d
  • heyi vamweKunyangwe iri shoma, mune izvo zviitiko, unogona kuita zvakafanana kana uchifungidzira kuti handizvo zviri pamusoro.

Imwe nzira yekuita kuti zvive nyore, nekuti yakafanana kune wese munhu, ndeyekutarisa info mu / proc nezve iyo PID = 1, ndiko kuti, yekutanga nzira kubva kunosungirirwa vamwe vese uye inoenderana chaizvo neiyi daemon yekutanga. Kuti uite izvi, chingomhanya unotevera kuraira uye zvinodzosa zita racho:

sudo stat /proc/1/exe

Iye zvino unoziva iwe system yaunayo, saka, ngatitii iyo mirairo iwe yaunogona kushandisa kubata masevhisi:

  • SysV init: /etc/init.d/ [service_demon_name] [chiito]
  • systemd: systemctl [chiito] [sevhisi_demon_name]
  • upstart: sevhisi [service_demon_name] [chiito]
  • vamwe: Kana iwe ukashandisa imwe sisitimu, iwe zvirinani utarise bhuku racho. Semuenzaniso, zvimwe zvisingawanzoitika paLinux uye mamwe maUnixes anogona kushandisa chiratidzo kubva kuSIGHUP maitiro kumisazve sevhisi: kuuraya -HUP $ (kati / var / run / [sevhisi-PID])

Iwe unofanirwa tsiva [chiito] pane izvo zvaunofanira kuita. Semuenzaniso, kana iwe uchida kutanga patsva, saka shandisa reset, kana iwe uchida kumisa kushandisa stop, kana iwe uchida kutanga kushandisa nyeredzi, nezvimwe. Uye chinja [daemon_name] neiyo daemon zita rebasa raunoda kutanga. Semuyenzaniso:

systemctl reset httpd

Ndinovimba wave nazvo zvakajeka ikozvino.


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Makomendi gumi, siya zvako

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako

  1.   CRISTIAN akadaro

    Pachine masystem ane upstart? Ini ndinofunga humwe hwekare Ubuntu.
    Zvakare kunyangwe iwe uine systemd iwe unogonazve kuve nefaira nezvimwe / init.d
    Ini ndoda kushandisa mumwe murairo senge ps kana pstree, uye kwete kushungurudza Sudo-iyi-Sudo-iyoyo.
    Reply with quote

  2.   CRISTIAN akadaro

    Iwo "sevhisi" rairo rinoshanda pane ese maitit.d uye systemd masystem

bool (chokwadi)