Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time L'arresto auto e riavviare Apache httpd daemon di servizio a tempo preimpostato

The core component of any websites, blogs, web services and web applications is the web server. Il componente centrale di qualsiasi siti web, blog, servizi web e applicazioni web è il web server. And Apache is the most popular HTTP server that powers the websites worldwide. E Apache è il più popolare server HTTP che i poteri di siti web in tutto il mondo. 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. E 'importante assicurare che i tempi di inattività e continuo funzionamento del servizio di Apache o demone sul server, come se servizio httpd è giù, il tuo sito web verrà accedere ai visitatori. 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. Altri di utilizzare il servizio di monitoraggio, script o un programma di utilità per verificare se il demone è httpd, amministratore del server ha anche una scelta di riavviare il servizio Apache periodicamente.

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. Arresto e riavviare Apache periodicamente a intervallo specifico contribuisce a far sì che Apache servizio web è sempre in esecuzione in top notch condizione, senza effetto di una possibile perdita di memoria e di risorse di monopolizzavano le connessioni persistenti. 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. E 'anche garantire che i siti Web di inattività è limitato al successivo riavvio il programma, nel caso in cui il limite è talmente sfortunato che Apache si blocca indefinitamente il monitoraggio e il vostro servizio non può riprendere l'incidente.

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. Di arresto e avvio Apache automaticamente, siamo in grado di fare uso di crontab (o operazione pianificata o di pianificazione in Windows Server) di pianificare l'operazione al momento preferisco. Simply edit the cron jobs with a root or whell user, and add in the following line: Semplicemente modificare il cron posti di lavoro con una radice o whell utente e aggiungere la seguente riga:

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: Sostituire m, h, d, m e w con valore della vostra preferenza, dove essi rappresentano il seguente significato:

m: min (0 - 59) m: min (0 - 59)
h: hour (0 - 23) h: ore (0 - 23)
d: day of month (1 - 31) d: giorno del mese (1 - 31)
m: month (1 - 12) m: mese (1 - 12)
w: day of week (0 - 6) (Sunday=0) w: giorno della settimana (0 - 6) (Domenica = 0)

For variables that you want to happen every time, set it as * (asterisk). Per le variabili che si desidera che accada ogni volta, impostarla come * (asterisco).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Ad esempio, per uccidere il demone di Apache e iniziare immediatamente a 1 AM ogni notte, impostare la linea di crontab:

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: Per riavviare il servizio httpd Apache a fine settimana, come ad esempio Domenica alle ore 12, utilizzare il seguente cronologico:

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. Potete inserire "l'uomo crontab" per saperne di più sui posti di lavoro in cron di Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Per modificare il crontab elenco di posti di lavoro, è sufficiente immettere "crontab-e" a conchiglia. Existing crontab will appear on a text editor, such as GNU nano. Crontab esistenti verranno visualizzati su un editor di testo, come ad esempio 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. Se questo è il caso, apportare le modifiche necessarie, quindi premere "Ctrl-X", seguito da "Y" per salvare il file, e seguire da premere Invio per accettare l'impostazione predefinita il nome del file. The new crontab will be installed and in effect immediately. Il nuovo crontab verranno installati e in vigore immediatamente.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Si noti che il percorso apachectl può essere diverso a diversi variante di Unix, Linux o BSD sapori. Use one of the following command to find out where is Apache installed: Utilizzare uno dei seguenti comando per sapere dove è installato Apache:

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. Alcuni di Apache può installare in / usr / sbin / apachectl, oppure potete usare la httpd o apachectl link simbolici in / etc / rc.d / init.d / apachectl o / etc / rc.d / init.d / httpd.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale inglese whenever possible. quando possibile.

Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .



Leave a Reply Lasciare una risposta

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> È possibile utilizzare questi tag: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Iscriviti senza commentare


Custom Search

New Articles Nuovi articoli

Incoming Search Terms for the Article Cerca in arrivo Condizioni per l'articolo

restart apache riavviare Apache - -- restart httpd riavviare httpd - -- apache shutdown Apache arresto - -- apache restart apache restart - -- service apache restart servizio di riavviare Apache - -- centos service autostart CentOS servizio automatico - -- apache auto restart Apache riavvio automatico - -- how to restart apache Come riavviare Apache - -- centos autostart services CentOS autostart servizi - -- shutdown httpd arresto di httpd - -- restart apache service riavviare Apache servizio - -- apache service restart servizio di riavviare Apache - -- service restart apache servizio di riavviare Apache - -- auto restart apache auto riavviare Apache - -- crontab restart apache crontab riavviare Apache - -- freebsd apache autostart FreeBSD Apache autostart - -- start apache service avvio Apache servizio - -- cronjob restart apache cronjob riavviare Apache - -- crontab apachectl crontab apachectl - -- apache auto start Apache Auto Start - -- apache automatic restart Apache riavvio automatico - -- CentOS autostart httpd CentOS autostart httpd - -- centos httpd autostart CentOS httpd autostart - -- auto start apache Auto Start Apache - -- restart apache centos riavviare Apache CentOS - -- shutdown apache Apache arresto - -- reboot apache riavviare Apache - -- schedule apache restart calendario riavviare Apache - -- autostart httpd centos autostart httpd CentOS - -- cron restart apache Cron riavviare Apache - -- centos apache autostart CentOS Apache autostart - -- centos autostart service CentOS servizio automatico - -- apache httpd shutdown httpd Apache arresto - -- how to shutdown apache come arresto di Apache - -- shutting down apache linux spegnimento Apache Linux - -- centos auto restart CentOS riavvio automatico - -- cron job restart apache job in cron di riavviare Apache - -- Linux Apache Memory Leak Linux Apache perdita di memoria - -- start apache httpd avviare httpd Apache - -- centos autostart daemon CentOS autostart demone - -- how to shutdown httpd come arresto di httpd - -- cron job to restart apache job in cron di riavviare Apache - -- cron auto restart apache Cron auto riavviare Apache - -- starting apache service a partire Apache servizio - -- stop apache service Apache fermata di servizio - -- centos auto start CentOS Auto Start - -- crontab apache restart crontab riavviare Apache - -- Apache restart service Apache restart servizio - -- linux shut down apache Linux Apache spento - -- set apache to autostart Apache per impostare autostart - --