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 .
Related Articles Articoli correlati
- Start, Stop and Restart Crond Daemon in Linux Start, stop e restart Crond Demone in Linux
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 4
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files A partire Apache HTTPD non riuscita a causa di Impossibile aprire o nessuna di tali mod_bwlimited, mod_log_bytes file o mod_bandwidth
- Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start Apache Avvisa NameVirtualHost *: 80 non ha alcun errore quando VirtualHosts Inizio
- Install mod_evasive for Apache to Prevent DDOS Attacks Mod_evasive per installare Apache per prevenire attacchi DDOS
- Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut Arresto o riavvio di Windows (XP, 2000 e Vista) da riga di comando o di un collegamento Fare clic su
- Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Migliorare Apache Web Server Sicurezza: ServerTokens uso e ServerSignature per disattivare header
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM non hanno ricevuto informazioni sullo stato della Apache errore
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache Stato (WHM-server-status) in cPanel webhost Manager Restituisce Bianche Page
- Automatically Shutdown Computer With Auto Shutdown Genius Arresto automaticamente computer con L'arresto auto del genio
































