Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Automatisk avstängning av datorn och starta om Apache httpd tjänst demonen på förinställd tid

The core component of any websites, blogs, web services and web applications is the web server. Den centrala komponenten i alla webbplatser, bloggar, webbtjänster och webbapplikationer är webbservern. And Apache is the most popular HTTP server that powers the websites worldwide. Och Apache är den mest populära HTTP-server som driver webbplatser världen över. 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. Det är viktigt att se till att upptid och kontinuerlig drift av Apache tjänst eller demonen på servern, som om httpd tjänsten är nere, din webbplats kommer att saknar tillgång till besökarna. 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. Annat än med hjälp av övervakning tjänst, skript eller verktyg för att kontrollera om httpd demonen upp, systemadministratör också har ett val att starta om Apache tjänst regelbundet.

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. Avsluta och starta om Apache regelbundet på specifika intervall bidrar till att säkerställa att Apache Web Service alltid körs i vass villkor, utan effekterna av eventuella minnesläcka och resurs KORTKLIPPNING av beständiga anslutningar. 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. Det också se till att webbplatser ligger nere är begränsad till nästa omstart schema, ifall det är så olycklig att Apache hänger på obestämd tid och din övervakning tjänst kan inte ta upp händelsen.

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. Att lägga ned och börja Apache automatiskt, kan vi använda oss av crontab (eller schemalagd aktivitet eller Schemaläggaren i Windows Server) för att planera uppgiften vid föredrar. Simply edit the cron jobs with a root or whell user, and add in the following line: Helt enkelt redigera cron jobb med en rot eller whell användare och lägga till i följande rad:

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

Replace m, h, d, m and w with value of your preference, where they represent the following meaning: Ersätt m, h, d, m och w med värdet av din smak, där de utgör följande innebörd:

m: min (0 - 59) m: min (0 - 59)
h: hour (0 - 23) H: timme (0 - 23)
d: day of month (1 - 31) d: dagen i månaden (1 - 31)
m: month (1 - 12) m: månad (1 - 12)
w: day of week (0 - 6) (Sunday=0) w: veckodag (0 - 6) (söndag = 0)

For variables that you want to happen every time, set it as * (asterisk). För variabler som ska hända varje gång, som det som * (asterisk).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Till exempel att döda Apache daemon och börja genast på 1 AM varje natt, som den crontab linje till:

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

To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job: För att starta Apache httpd tjänst på helgen, till exempel söndag 12 kl Använd följande cronjobb:

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

You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS. Du kan mata in "man crontab" att lära sig mer om cron jobb i Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Om du vill redigera crontab jobb listan genom att ange "crontab-e" på skalet. Existing crontab will appear on a text editor, such as GNU nano. Befintliga crontab kommer att visas på en textredigerare, till exempel 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. Om så är fallet, göra nödvändiga ändringar, tryck på "Ctrl-X", följa med "Y" för att spara filen och följ av Enter tryck att acceptera standard filnamnet. The new crontab will be installed and in effect immediately. Den nya crontab kommer att installeras och i kraft omedelbart.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Observera att sökvägen till apachectl kan vara olika på olika varianter av Unix, Linux eller BSD varianter. Use one of the following command to find out where is Apache installed: Använd någon av följande kommando för att få reda på var är Apache installerat:

find / apachectl | grep apachectl find / 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. Vissa Apache får installera i / usr / sbin / apachectl, eller så kan du använda httpd eller apachectl symboliska länkarna i / etc / rc.d / init.d / apachectl eller / etc / rc.d / init.d / httpd.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. VIKTIGT: Detta är en maskin som översatt sida som tillhandahålls "i befintligt skick" utan garanti. Machine translation may be difficult to understand. Maskinöversättning kan vara svårt att förstå. Please refer to Se original English article ursprungliga engelska artikeln whenever possible. när så är möjligt.

Share and contribute or get technical support and help at Dela och bidra eller få teknisk support och hjälp vid My Digital Life Forums Mitt digitala liv forum .



Leave a Reply Lämna ett svar

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> Du kan använda dessa taggar: <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. Prenumerera på kommentarer funktionen har stängts av. To receive notification of latest comments posted, subscribe to Att få ta del av senaste kommentarer skickas, prenumerera på My Digital Life Comments RSS feed Mitt digitala liv kommentarer RSS-flöde or eller register to receive registrera dig för att få new comments in daily email digest. nya kommentarer i den dagliga e-postutskick.
Custom Search

New Articles Nya artiklar

Incoming Search Terms for the Article Inkommande söktermer för artikel

Apache shutdown Apache avstängning - -- shutdown apache kupering apache - -- restart apache auto starta apache auto - -- start apache at reboot börja apache vid omstart - -- how to start Apache service hur man startar Apache tjänst - -- apache daemon apache daemon - -- auto start apache in linux auto starta Apache i Linux - -- windows apache auto restart script Windows apache auto starta skriptet - -- apache restart apache startar - -- apache auto restart apache automatisk omstart - -- apache services down apache tjänster fastställs - -- apache service restart apache tjänst startar - -- auto shutdown search engine Automatisk avstängning sökmotor - -- centos service auto start CentOS tjänst auto start - -- centos scheduling reboot CentOS planering omstart - -- crontab centos how to edit crontab CentOS du för att redigera - -- cron job apache restart cronjobb apache startar - -- cron apache reset cron apache reset - -- freebsd 'automatic service restart' FreeBSD "automatiska tjänsten startar" - -- freebsd restart apache command FreeBSD starta apache kommandot - -- how to stop apache on shutdown hur man kan stoppa Apache om avstängning - -- how to restart httpd daemon hur man startar httpd daemon - -- how to set service auto start in reboot windows hur man ställer tjänsten automatiskt starta i omstarten fönster - -- restart jboss vms crontab starta om JBoss VMS crontab - -- scheduled apache restart windows regelbunden apache starta om Windows - -- schedule a task to restart a service schemalägga en uppgift att starta en tjänst - -- start apache daemon freebsd börja apache daemon FreeBSD - -- use logwatcher to auto restart apache använda logwatcher att automatiskt starta apache - -- apachectl shutdown apachectl avstängning - -- automatic httpd restart automatisk httpd starta - -- auto start apache centos auto starta apache CentOS - -- centos auto start service CentOS auto starta tjänsten - -- centos auto start services CentOS auto start tjänster - -- centos httpd autostart CentOS httpd autostart - -- cpanel how to shut off apache cPanel hur man ska stängas av apache - -- cron file to start a service automatically in freebsd cron-fil för att starta en tjänst automatiskt i FreeBSD - -- cron restart service cron starta tjänsten - -- cron automatic shutdown cron automatisk avstängning - -- guide linux auto start service when reboot Guide linux auto starta tjänsten när omstart - -- how to start apache services hur man startar apache tjänster - -- how to apache shutdown hur man apache avstängning - -- httpd shutdown httpd avstängning - -- apache periodically lock apache regelbundet lås - -- apache autorun on restart apache autorun på omstart - -- apachectl centos cpanel apachectl CentOS cPanel - -- centos httpd service restart CentOS httpd tjänst startar - -- centos cron reboot CentOS cron omstart - -- how to schedule a restart service in linux hur man schemalägga en omstart tjänst i linux - -- linux auto stop at shutdown linux automatiskt stopp vid avstängning av datorn - -- reload appache http service ladda appache http service - --