Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Automatinis išjungimas ir paleiskite Apache HTTPD Paslaugos Daemon ne tikru laiku

The core component of any websites, blogs, web services and web applications is the web server. Esminę jokių svetainių, interneto dienoraščius, interneto paslaugų ir interneto taikomųjų programų serveryje. And Apache is the most popular HTTP server that powers the websites worldwide. Ir Apache yra populiariausias HTTP serverį, kad įgaliojimai svetainių visame pasaulyje. It's important to ensure that the uptime and continuous running of Apache service or daemon on the server, as if HTTPD service is down, your website will be unaccessible to the visitors. Svarbu užtikrinti, kad veiksnumo ir nuolat veikia Apache paslaugą ar demonas serveryje, nes jei HTTPD paslauga yra neveiksnus, jūsų svetainė bus nepasiekiamas lankytojams. Other than using monitoring service, script or utility to check if the HTTPD daemon is up, server administrator also has a choice to restart the Apache service periodically. Kitos nei naudojant stebėsenos paslaugą, scenarijų ar komunalinių patikrinti, ar HTTPD demonas up, serverio administratorius turi pasirinkti paleisti Apache tarnyba periodiškai.

Shutdown and restart Apache periodically at specific interval helps to ensure that Apache web service is always running in top notch condition, without effect of possible memory leak and resource hogging by persistent connections. Išjunkite ir iš naujo paleisti Apache reguliariai ne tikram laikui padeda užtikrinti, kad Apache web paslauga visada veikia aukščiausios klasės sąlyga, be poveikio galima Atminties nutekėjimas ir išteklių Žuvo dėl nuolatinių ryšių. It also ensure that the web sites downtime is limited to the next restart schedule, just in case it's so unlucky that Apache hangs indefinitely and your monitoring service can't pick up the incident. Ji taip pat užtikrina, kad svetaines prastovos laikas ribotas iki kito naujo tvarkaraščio, tiesiog tuo atveju, tai taip nesiseka, kad Apache stringa neribotai ir savo stebėjimo tarnyba negali pasiimti incidentas.

To shutdown and start Apache automatically, we can make use of crontab (or Scheduled Task or Task Scheduler in Windows Server) to schedule the task at the time prefer. Išjungti ir paleisti Apache automatiškai, mes galime naudoti crontab (arba suplanuotų užduočių arba užduočių grafikas Windows Server), planuoti užduoties metu nori. Simply edit the cron jobs with a root or whell user, and add in the following line: Tiesiog redaguoti cron darbą su root arba whell vartotojo ir įtraukti į šią eilutę:

mhdmw /usr/local/apache/bin/apachectl restart mhdmw / usr / local / apache / bin / apachectl naujo

Replace m, h, d, m and w with value of your preference, where they represent the following meaning: Pakeisti M, H, D, M ir W su verte savo pasirinkimą, jeigu jie atstovauja šias reikšmes:

m: min (0 – 59) m: min (0 - 59)
h: hour (0 – 23) h: valanda (0 - 23)
d: day of month (1 – 31) D: mėnesio dieną (1 - 31)
m: month (1 – 12) M: Mėnuo (1 - 12)
w: day of week (0 – 6) (Sunday=0) W: Savaitės diena (0 - 6) (sekmadienis = 0)

For variables that you want to happen every time, set it as * (asterisk). Kintamiesiems, kad norite vykti kiekvieną kartą, jį kaip * (pažymėti žvaigždute).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Pavyzdžiui, jei norite žudyti Apache demonas ir paleisti jį iš karto 1 val kiekvieną naktį, nustatyti crontab linija:

0 1 * * * /usr/local/apache/bin/apachectl restart 0 1 * * * / usr / local / apache / bin / apachectl naujo

To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job: Norėdami perkrauti Apache HTTPD paslaugos savaitgalį, pavyzdžiui, sekmadienis 12 val, naudokite šiuos cron job:

0 12 * * 0 /usr/local/apache/bin/apachectl restart 0 12 * * 0 / usr / local / apache / bin / apachectl naujo

You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS. Galite įvesti "žmogus crontab" norėdami sužinoti daugiau apie cron užsakymai Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Norėdami redaguoti crontab darbą, tiesiog įrašykite "crontab-e" ant korpuso. Existing crontab will appear on a text editor, such as GNU nano. Esamos crontab pasirodys teksto redaktorių, pavyzdžiui, GNU nano. If this is the case, make the necessary changes, then press “Ctrl-X”, follow by “Y” to save the file, and follow by Enter press to accept the default file name. Jei tai yra, padaryti būtinus pakeitimus, paspauskite "Ctrl-X", po pagal "Y", kad išsaugoti failą ir vykdykite Enter spaudos priimti numatytąjį failo vardą. The new crontab will be installed and in effect immediately. Naujas crontab bus įdiegta ir įsigalioja nedelsiant.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Atkreipkite dėmesį, kad kelias į apachectl gali skirtis dėl skirtingų variantų Unix, Linux ar BSD skonių. Use one of the following command to find out where is Apache installed: Apie tokią komandą, naudokite vieną, kad sužinoti, kur yra įdiegtas Apache:

find / apachectl | grep apachectl Ieškoti / apachectl | grep apachectl
whereis apachectl whereis apachectl

Some Apache may install in /usr/sbin/apachectl, or you can use the httpd or apachectl symbolic links in /etc/rc.d/init.d/apachectl or /etc/rc.d/init.d/httpd. Kai Apache galite įdiegti į / usr / sbin / apachectl, arba galite naudoti httpd arba apachectl simbolines nuorodas / etc / rc.d / init.d / apachectl arba / etc / rc.d / init.d / httpd.

IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Automatinis vertimas gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.


Leave a Reply Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Galite naudoti šiuos žodžius: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive Registruokitės gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Gaunamus paieškos terminus straipsnis

shutdown apache išjungti Apache - -- apache shutdown Apache išjungimas - -- restart apache service perkrauti apache paslaugos - -- centos apache restart CentOS Apache restart - -- cron restart apache cron paleiskite Apache - -- shutdown apache linux uždaryti Linux Apache - -- apache daemon Apache demonas - -- apache auto restart Apache auto restart - -- centos autostart service CentOS Paleistis paslaugos - -- apache auto start Apache Auto Pradžia - -- cron job restart apache cron paleiskite Apache - -- centos auto start httpd CentOS Auto Pradžia httpd - -- apache restart interval Apache restart intervalas - -- linux apache shutdown Linux, Apache išjungimas - -- crontab restart service crontab perkrovimo - -- crontab service restart crontab paslauga naujo - -- restart apache centos perkrauti apache CentOS - -- restart httpd restart httpd - -- apache shutdown linux Apache išjungimo Linux - -- crontab restart apache crontab paleiskite Apache - -- find apachectl rasti apachectl - -- freebsd restart apache FreeBSD paleiskite Apache - -- centos shutdown apache CentOS išjungti Apache - -- start apache httpd start Apache httpd - -- restart apache services perkrauti apache paslaugos - -- cron job to restart apache cron perkrauti apache - -- cron httpd restart cron httpd restart - -- service apache restart paslaugų apache restart - -- how to restart apache service kaip paleisti Apache paslaugos - -- linux restart apache service Linux perkrauti apache paslaugos - -- shutdown httpd uždaryti httpd - -- cron restart service cron perkrovimo - -- restart apache crontab perkrauti apache crontab - -- centos reboot apache CentOS perkrauti apache - -- how to shutdown apache kaip išjungti Apache - -- how to shutdown apache in linux kaip išjungti Apache Linux - -- apache daemon example Apache demonas pavyzdys - -- linux shutdown apache Linux shutdown Apache - -- cron apache restart cron apache restart - -- crontab apache restart crontab apache restart - -- how to shut down apache linux kaip išjungti apache linux - -- centos autostart services CentOS Paleistis paslaugos - -- restart apache cron perkrauti apache cron - -- restart apache via cron perkrauti apache per cron - -- restart httpd in freebsd restart httpd FreeBSD - -- apache restart service Apache restart paslaugos - -- freebsd apache autostart FreeBSD Apache autostart - -- centos autostart httpd CentOS Paleistis httpd - -- centos restart apache CentOS paleiskite Apache - -- httpd shutdown httpd išjungimas - --