Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto Shutdown un restart Apache httpd Service Daemon pie Preset Time

The core component of any websites, blogs, web services and web applications is the web server. Galvenā sastāvdaļa katrā mājas lapas, blogi, Web Services un Web lietojumprogrammas ir web serveri. And Apache is the most popular HTTP server that powers the websites worldwide. Un Apache ir populārākais HTTP serveris, pilnvaras mājas lapām visā pasaulē. 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. Tas ir svarīgi nodrošināt, uptime un nepārtrauktu darbību Apache pakalpojumu vai dēmonu uz servera, kā httpd pakalpojums ir samazinājies, jūsu mājas lapa tiks unaccessible ar apmeklētājiem. 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. Kurās neizmanto monitoringu, skriptu vai lietderība, lai pārbaudītu vai httpd daemon ir izveidota, servera administrators ir arī izvēle atsākt Apache dienests periodiski.

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. Shutdown un restart Apache periodiski pēc īpaša intervāla palīdz nodrošināt to, ka Apache web pakalpojums vienmēr darbojas top notch stāvoklī, bez ievērības iespējamie atmiņas noplūde un resursu hogging pastāvīga savienojumus. 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. Tas arī nodrošinās, ka tīmekļa vietnēs dīkstāves ir ierobežots līdz nākamā restart grafika, tikai gadījumā, ja tas ir tik nelaimīgs, ka Apache karājas mūžīgi, un jūsu monitoringu nevar uzņemt incidentu.

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. Jāaizver un sākt Apache automātiski, mēs varam izmantot crontab (vai ieplānotais uzdevumu vai uzdevumu plānotāju Windows Server) grafika uzdevums laikā dod priekšroku. Simply edit the cron jobs with a root or whell user, and add in the following line: Vienkārši rediģēt cron darba vietas ar saknēm vai whell lietotājam, un pievienot šādu rindu:

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

Replace m, h, d, m and w with value of your preference, where they represent the following meaning: Aizstāt m, h, d, m un w ar vērtību jūsu preferences, ja tās ir šāda nozīme:

m: min (0 – 59) m: min (0 - 59)
h: hour (0 – 23) h: stunda (0 - 23)
d: day of month (1 – 31) d: diena (1 - 31 mēnesis)
m: month (1 – 12) m: mēnesis (1 - 12)
w: day of week (0 – 6) (Sunday=0) w: diena (0 - 6) nedēļā (svētdiena = 0)

For variables that you want to happen every time, set it as * (asterisk). Mainīgajiem, ka jūs vēlaties, lai notiktu ik laiku, iestatiet to kā * (zvaigznīte).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Piemēram, lai nogalinātu Apache dēmonu un sākt to nekavējoties pēc 1 katru nakti, kas crontab līnija:

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

To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job: Atsākt Apache httpd pakalpojumu nedēļas nogalē, piemēram, svētdiena 12 pusdienlaiks, izmantojiet šādas Cron job:

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

You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS. Jūs varat ievadīt "man crontab", lai uzzinātu vairāk par cron darbavietu Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Lai rediģētu crontab darba vietu sarakstu, vienkārši ievadiet "crontab-e" uz korpusa. Existing crontab will appear on a text editor, such as GNU nano. Esošās crontab parādīsies teksta redaktoru, piemēram, 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. Ja tas tā ir gadījumā, veikt nepieciešamās izmaiņas, nospiediet taustiņu "Ctrl-X", seko ar "Y", lai saglabātu failu, un sekot līdz Enter preses akceptēt noklusējuma faila nosaukumu. The new crontab will be installed and in effect immediately. Jauns crontab tiks uzstādīts un spēkā nekavējoties.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Ņemiet vērā, ka ceļš uz apachectl var būt atšķirīgi dažādu variantu, Unix, Linux vai BSD flavors. Use one of the following command to find out where is Apache installed: Par šādu komandu Izmantojiet vienu, lai uzzinātu, kur ir Apache uzstādīti:

find / apachectl | grep apachectl atrast / 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. Daži Apache var instalēt in / usr / sbin / apachectl, vai varat izmantot httpd vai apachectl simboliskas saites / etc / rc.d / init.d / apachectl vai / etc / rc.d / init.d / httpd.

IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: lapa mašīna iztulkot un pasniegts tàds, "kàds tas ir" bez garantijas. Machine translation may be difficult to understand. Mašīntulkošanas var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.


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> Jūs varat izmantot šos tagus: <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. Parakstīties uz komentāriem iezīme ir atspējota. To receive notification of latest comments posted, subscribe to Saņemt informāciju par jaunāko komentārus, parakstīties uz My Digital Life Comments RSS feed Mana Digital Life Comments RSS feed or vai register to receive reģistrēties, lai saņemtu new comments in daily email digest. jauni komentāri ikdienas e-pasta sagremot.
Custom Search

New Articles Jauns pants

Incoming Search Terms for the Article Ienākošo Meklēt noteikumi pants

shutdown apache shutdown apache - -- apache shutdown apache shutdown - -- restart apache service restart apache dienests - -- centos apache restart CentOS apache restart - -- cron restart apache cron restart apache - -- shutdown apache linux shutdown apache linux - -- apache daemon apache dēmons - -- apache auto restart apache auto restart - -- centos autostart service CentOS palaišana ekspluatācijā - -- apache auto start apache auto sākums - -- cron job restart apache cron darbs restart apache - -- centos auto start httpd CentOS auto sākums httpd - -- apache restart interval apache restart intervāls - -- linux apache shutdown linux apache shutdown - -- crontab restart service crontab restart dienests - -- crontab service restart crontab pakalpojumu restart - -- restart apache centos restart apache CentOS - -- restart httpd restart httpd - -- apache shutdown linux apache shutdown linux - -- crontab restart apache crontab restart apache - -- find apachectl atrast apachectl - -- freebsd restart apache FreeBSD restart apache - -- centos shutdown apache CentOS shutdown apache - -- start apache httpd sākums apache httpd - -- restart apache services restart apache pakalpojumi - -- cron job to restart apache cron darbs atsākt apache - -- cron httpd restart cron httpd restart - -- service apache restart pakalpojumu apache restart - -- how to restart apache service kā restart apache dienests - -- linux restart apache service Linux restart apache dienests - -- shutdown httpd shutdown httpd - -- cron restart service cron restart dienests - -- restart apache crontab restart apache crontab - -- centos reboot apache CentOS reboot apache - -- how to shutdown apache kā izslēgšanu apache - -- how to shutdown apache in linux kā izslēgšanu apache un Linux - -- apache daemon example apache dēmonu piemērs - -- linux shutdown apache Linux shutdown apache - -- cron apache restart cron apache restart - -- crontab apache restart crontab apache restart - -- how to shut down apache linux kā jāslēdz apache linux - -- centos autostart services CentOS palaišana pakalpojumi - -- restart apache cron restart apache cron - -- restart apache via cron restart apache via cron - -- restart httpd in freebsd restart httpd in freebsd - -- apache restart service apache restart dienests - -- freebsd apache autostart freebsd apache palaišana - -- centos autostart httpd CentOS palaišana httpd - -- centos restart apache CentOS restart apache - -- httpd shutdown httpd shutdown - --