Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto cierre y reinicie el servicio de Apache httpd demonio en tiempo preestablecido

The core component of any websites, blogs, web services and web applications is the web server. El componente básico de cualquier sitio web, blogs, servicios web y aplicaciones web es el servidor web. And Apache is the most popular HTTP server that powers the websites worldwide. Y Apache es el más popular servidor HTTP poderes que los sitios web en todo el mundo. 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 importante asegurarse de que el tiempo de actividad y funcionamiento continuo de Apache servicio o demonio en el servidor, como si el servicio httpd no responde, su sitio web se unaccessible a los visitantes. 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. Aparte de utilizar el servicio de vigilancia, el guión y la utilidad para comprobar si el demonio httpd es, el administrador del servidor también tiene una opción para reiniciar el servicio Apache periódicamente.

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. Apague y reinicie Apache periódicamente a intervalos específicos de ayuda a asegurar que el servicio web Apache se ejecuta en condiciones de primera clase, sin efecto de la posible pérdida de memoria y recursos hogging de conexiones persistentes. 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. También velarán por que los sitios en la Web el tiempo de inactividad se limita a reiniciar el próximo calendario, en caso de que tan mala suerte que Apache se bloquea indefinidamente y su servicio de monitoreo no pueden recoger el 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. Para cerrar e iniciar automáticamente Apache, podemos hacer uso de crontab (o tarea programada o Programador de tareas en Windows Server) para programar la tarea en el momento prefiere. Simply edit the cron jobs with a root or whell user, and add in the following line: Basta con editar el cron puestos de trabajo con una raíz o whell usuario, y en añadir la siguiente línea:

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: Reemplazar m, h, d, w m y con el valor de su preferencia, donde representan el siguiente significado:

m: min (0 - 59) m: min (0 - 59)
h: hour (0 - 23) h: hora (0 - 23)
d: day of month (1 - 31) d: día del mes (1 - 31)
m: month (1 - 12) m: mes (1 - 12)
w: day of week (0 - 6) (Sunday=0) w: día de la semana (0 - 6) (domingo = 0)

For variables that you want to happen every time, set it as * (asterisk). Para las variables que desea que esto ocurra cada vez, ponerlo como * (asterisco).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Por ejemplo, para matar al demonio Apache y empezar inmediatamente a 1 AM todas las noches, establezca la línea de 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: Para reiniciar Apache httpd servicio en fin de semana, como el Domingo 12 del mediodía, utiliza el siguiente tarea cron:

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. Puede introducir "man cron" para obtener más información sobre cron puestos de trabajo en Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Para editar el crontab lista de tareas, simplemente escriba "crontab-e" en el shell. Existing crontab will appear on a text editor, such as GNU nano. Existentes crontab aparecerá en un editor de texto, como 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. Si este es el caso, hacer los cambios necesarios, a continuación, pulse Ctrl-X ", le siguió la" Y "para guardar el archivo, y siga por la prensa Ingresar a aceptar el nombre de archivo por defecto. The new crontab will be installed and in effect immediately. El nuevo crontab se instalará y en efecto de inmediato.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Tenga en cuenta que el camino a apachectl puede ser diferente en diferentes variantes de Unix, Linux o BSD sabores. Use one of the following command to find out where is Apache installed: Utilice uno de los siguientes comando para saber dónde está instalado 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. Algunos Apache puede instalar en / usr / sbin / apachectl, o puede utilizar el httpd apachectl o enlaces simbólicos en / 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: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.

Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .



Leave a Reply Deja Responder

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> Puede usar estos tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Suscribirse sin comentar


Custom Search

New Articles Nuevos Artículos

Incoming Search Terms for the Article Próximos Términos de búsqueda para el artículo

restart apache reiniciar Apache - -- restart httpd reiniciar httpd - -- centos service autostart CentOS servicio automático - -- apache shutdown Apache cierre - -- apache restart reiniciar Apache - -- service apache restart reiniciar el servicio de Apache - -- how to restart apache cómo reiniciar Apache - -- restart apache service reiniciar el servicio de Apache - -- auto restart apache auto reiniciar Apache - -- crontab restart apache crontab reiniciar Apache - -- freebsd apache autostart FreeBSD Apache autostart - -- apache service restart Apache reiniciar servicio - -- service restart apache reiniciar el servicio de Apache - -- apache auto start Apache auto de inicio - -- apache automatic restart Apache rearranque automático - -- CentOS autostart httpd CentOS autostart httpd - -- apache auto restart auto reiniciar Apache - -- centos httpd autostart CentOS httpd autostart - -- start apache service iniciar Apache servicio - -- auto start apache auto de inicio de Apache - -- centos autostart services CentOS autostart servicios - -- reboot apache reiniciar Apache - -- centos apache autostart CentOS Apache autostart - -- cronjob restart apache "cronjob" reiniciar Apache - -- centos autostart service CentOS servicio automático - -- apache httpd shutdown Apache httpd shutdown - -- how to shutdown apache cómo se apaga Apache - -- shutdown httpd httpd shutdown - -- centos auto restart CentOS auto reiniciar - -- Linux Apache Memory Leak Linux Apache pérdida de memoria - -- start apache httpd iniciar Apache httpd - -- how to shutdown httpd cómo se apaga httpd - -- restart apache centos reiniciar Apache CentOS - -- cron auto restart apache Cron auto reiniciar Apache - -- starting apache service servicio a partir de Apache - -- shutdown apache cierre de Apache - -- centos auto start CentOS auto de inicio - -- schedule apache restart calendario reiniciar Apache - -- Apache restart service Apache reiniciar servicio - -- autostart httpd centos autostart httpd CentOS - -- cron restart apache Cron reiniciar Apache - -- linux shut down apache Linux Apache cerrar - -- set apache to autostart Apache para configurar automáticamente - -- start apache service+unix+usr/sbin iniciar el servicio apache + unix + usr / sbin - -- centos auto start apache CentOS auto iniciar Apache - -- httpd shutdown httpd shutdown - -- plesk cron job restart apache Plesk tarea cron reiniciar Apache - -- how to start httpd service in linux cómo poner en marcha el servicio httpd en linux - -- centos service apache CentOS servicio de Apache - -- auto start apache service iniciar Apache auto servicio - --