Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto Herunterfahren und Neustarten von Apache HTTPD Service-Daemon zu voreingestellten Zeit
The core component of any websites, blogs, web services and web applications is the web server. Die zentrale Komponente von Websites, Blogs, Web Services und Web-Anwendungen ist der Web-Server. And Apache is the most popular HTTP server that powers the websites worldwide. Und Apache ist der populärste HTTP-Server, der Befugnisse der Websites weltweit. 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. Es ist wichtig, um sicherzustellen, dass die Verfügbarkeit und kontinuierlichen Betrieb des Apache-Dienst oder Daemon auf dem Server, als ob HTTPD Service ist, Ihre Website wird unzugänglich auf die Besucher. 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. Andere als die Verwendung von Überwachungs-Service, Skript oder Programm, das zum überprüfen, ob der httpd-Daemon ist, Server-Administrator hat auch eine Wahl zu starten Sie den Apache-Dienst in regelmäßigen Abständen.
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. Herunterfahren und Neustarten von Apache in regelmäßigen Abständen zu spezifischen Intervall hilft sicherzustellen, dass Apache Web-Server-Dienst immer läuft in Top Notch Zustand, ohne Wirkung möglicher Speicherverlust-und Ressourcenschutz hogging von persistenten Verbindungen. 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. Darüber hinaus sicherzustellen, dass die Web-Sites Ausfallzeiten beschränkt sich auf die nächsten Neustart Zeitplan, für den Fall, es ist so unglücklich, dass Apache hängt auf unbestimmte Zeit und Ihre Begleitung Dienst kann nicht abholen den Vorfall.
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. Zum Abschalten und Apache automatisch starten, können wir nutzen, crontab (oder einen geplanten Task oder Task Scheduler in Windows Server), um die Aufgabe in der Zeit bevorzugen. Simply edit the cron jobs with a root or whell user, and add in the following line: Einfach bearbeiten Sie die cron-Jobs mit einem Root-oder whell Benutzer, und fügen Sie in der folgenden Zeile:
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: Ersetzen m, h, D, M und W mit Wert Ihrer Präferenz, wo sie die folgende Bedeutung:
m: min (0 - 59) m: min (0 - 59)
h: hour (0 - 23) h: Stunde (0 - 23)
d: day of month (1 - 31) d: Tag des Monats (1 - 31)
m: month (1 - 12) m: Monat (1 - 12)
w: day of week (0 - 6) (Sunday=0) w: Wochentag (0 - 6) (Sonntag = 0)
For variables that you want to happen every time, set it as * (asterisk). Für Variablen, die Sie wollen, geschieht jedes Mal, stellen Sie als * (Sternchen).
For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Zum Beispiel, zu töten den Apache-Dämon und starten Sie ihn sofort auf 1 Uhr jede Nacht, setzen Sie die Crontab-Zeile zu:
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: So starten Sie Apache HTTPD Dienst am Wochenende, wie Sonntag 12 Uhr, verwenden Sie den folgenden 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. Sie können Input "man crontab" Hier erfahren Sie mehr über Cron-Jobs in Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Zum Bearbeiten der crontab-Job-Liste, geben Sie einfach "crontab-e" in der Shell. Existing crontab will appear on a text editor, such as GNU nano. Vorhandene crontab erscheint in einem Texteditor, wie zum Beispiel 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. Wenn dies der Fall ist, machen die notwendigen Veränderungen, dann drücken Sie "Strg-X", folgen von "Y" um die Datei zu speichern, und folgen Sie von Enter drücken, um die ursprünglichen Dateinamen. The new crontab will be installed and in effect immediately. Die neue crontab wird installiert und sofort in Kraft.
Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Beachten Sie, dass der Pfad zum apachectl kann sich in verschiedenen Varianten von Unix-, Linux-oder BSD-Geschmacksrichtungen. Use one of the following command to find out where is Apache installed: Verwenden Sie eine der folgenden Befehl ein, um herauszufinden, wo der Apache installiert ist:
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. Einige Apache installieren können in / usr / sbin / apachectl, oder Sie können den httpd apachectl oder symbolischen Links in / etc / rc.d / init.d / apachectl oder / etc / rc.d / init.d / httpd.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. WICHTIG: Es handelt sich um eine Maschine der Seite übersetzt wird "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung ist vielleicht schwierig zu verstehen. Please refer to Bitte wenden Sie sich an original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.
Share and contribute or get technical support and help at Aktie und einen Beitrag oder erhalten technische Unterstützung und Hilfe an My Digital Life Forums Meine digitalen Lebens Foren . Werden.
Related Articles Verwandte Artikel
- Start, Stop and Restart Crond Daemon in Linux Start, Stop und Neustart Crond Daemon unter Linux
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Installation von Web-Server in FreeBSD 6,0 mit Apache 2,2, 5,0 MySQL und PHP 5 - Teil 4
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Starting Apache HTTPD scheiterte an kann nicht geöffnet werden "oder" Nein Solche mod_bwlimited, mod_log_bytes oder mod_bandwidth Dateien
- Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start Apache warnen NameVirtualHost *: 80 hat keine Fehler, wenn VirtualHosts Start
- Install mod_evasive for Apache to Prevent DDOS Attacks Installieren Sie mod_evasive für Apache zur Verhütung DDoS-Angriffen
- Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut Starten oder Herunterfahren von Windows (XP, 2000 und Vista) von der Kommandozeile aus oder One-Click-Direkt
- Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header Erhöhen Apache Web-Server-Sicherheit: Einsatz und ServerTokens ServerSignature zu deaktivieren header
- Automatically Shutdown Computer With Auto Shutdown Genius Automatisches Herunterfahren des Computers mit Auto Shutdown Genius
- cPanel WHM Failed to Receive Status Information From Apache Error cPanel WHM Fehler beim Empfangen von Statusinformationen Apache Fehler
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache-Status (WHM-Server-Status) in cPanel Webhost-Manager und Versandkosten Blank Page








