Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto Shutdown and Restart Apache httpd שירות שדים בכל זמן קבוע מראש

The core component of any websites, blogs, web services and web applications is the web server. רכיב הליבה של כל אתרי אינטרנט, בלוגים, שירותי אינטרנט ויישומי אינטרנט הוא שרת אינטרנט. And Apache is the most popular HTTP server that powers the websites worldwide. ואת אפצ 'י הוא שרת ה-HTTP הפופולרי ביותר כי כוחות אתרי אינטרנט ברחבי העולם. 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. זה חשוב כדי להבטיח זמן פעולה תקינה ורציפה של מפעיל שירות אפאצ 'י או השד על השרת, כאילו שירות httpd הוא למטה, האתר שלך יהיה unaccessible למבקרים. 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. למעט באמצעות שירות ניטור, בכתב או השירות כדי לבדוק אם הוא httpd daemon של עד, מנהל השרת גם יש ברירה להפעיל מחדש את שירות אפאצ 'י מעת לעת.

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. כיבוי והפעלה מחדש אפאצ 'י תקופתי במרווח מסוים מסייעת להבטיח כי שירות האינטרנט Apache הוא תמיד פועל במצב ברמה הגבוהה ביותר, ללא השפעה של דליפת זיכרון אפשרי משאב hogging ידי קשרים מתמיד. 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. כמו כן, להבטיח כי באתרי אינטרנט השבתה מוגבלת הבא מחדש את לוח הזמנים, רק למקרה זה כל כך חסר מזל כי אפאצ 'י נתקע ללא הגבלת זמן שירות ניטור שלך לא יכול להרים את האירוע.

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. כדי הכיבוי ולהתחיל אפאצ 'י באופן אוטומטי, אנחנו יכולים לעשות שימוש של crontab (או משימות מתוזמנות או מתזמן המשימות ב-Windows Server) כדי לתזמן את המשימה בזמן מעדיף. Simply edit the cron jobs with a root or whell user, and add in the following line: פשוט לערוך את עבודות cron עם שורש או המשתמש whell, וכן להוסיף את השורה הבאה:

mhdmw /usr/local/apache/bin/apachectl restart mhdmw / usr / local / apache / bin / apachectl מחדש

Replace m, h, d, m and w with value of your preference, where they represent the following meaning: החלף מ, ש, ד, ו מ W עם ערך של העדפה שלך, שם הם מייצגים את המשמעות הבאה:

m: min (0 – 59) מ: דקות (0 - 59)
h: hour (0 – 23) ש: שעה (0 - 23)
d: day of month (1 – 31) D: יום בחודש (1 - 31)
m: month (1 – 12) מ: חודש (1 - 12)
w: day of week (0 – 6) (Sunday=0) W: יום בשבוע (0 - 6) (ראשון = 0)

For variables that you want to happen every time, set it as * (asterisk). עבור משתנים כי אתה רוצה שיקרה בכל פעם, להגדיר את זה בתור * (כוכבית).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: לדוגמה, כדי להרוג את השד אפאצ 'י להתחיל אותה מיד 1 בכל לילה, להגדיר את קו crontab ל:

0 1 * * * /usr/local/apache/bin/apachectl restart 0 1 * * * / usr / local / apache / bin / apachectl מחדש

To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job: הפעלה מחדש של אפאצ 'י שירות httpd בסופי שבוע, כגון 12 יום ראשון בצהריים, להשתמש עבודה cron הבאים:

0 12 * * 0 /usr/local/apache/bin/apachectl restart 0 12 * * 0 / usr / local / apache / bin / apachectl מחדש

You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS. אתה יכול "crontab קלט האיש" כדי ללמוד עוד על עבודות cron ב לינוקס / יוניקס / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. כדי לערוך את רשימת העבודה crontab, פשוט להזין "crontab-E" על הקליפה. Existing crontab will appear on a text editor, such as GNU nano. Crontab קיימות יופיעו על עורך טקסט, כגון ננו גנו. 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. אם זה המקרה, לבצע את השינויים הדרושים, ולאחר מכן הקש "Ctrl-X", פעל לפי "Y" לשמור את הקובץ, ופעל על ידי לחץ על ENTER כדי לקבל את שם קובץ ברירת המחדל. The new crontab will be installed and in effect immediately. Crontab חדש יותקן ולמעשה מיד.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. שים לב כי הדרך apachectl עשויים להיות שונים על גרסה אחרת של יוניקס, לינוקס או BSD טעמים. Use one of the following command to find out where is Apache installed: השתמש אחד של הפקודה הבאה כדי לגלות איפה הוא מותקן אפאצ 'י:

find / apachectl | grep apachectl מצא / 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. כמה אפאצ 'י יכול להתקין ב usr / sbin / apachectl, או שאתה יכול להשתמש בקישורים סמליים httpd apachectl או ב / etc / rc.d / init.d / apachectl או etc / rc.d / init.d / httpd.

IMPORTANT : The page is machine translated and provided "as is" without warranty. חשוב: הדף מכונת תירגם מתפרסם "כמות שהוא" ללא אחריות. Machine translation may be difficult to understand. תרגום מכונה יכול להיות קשה להבין. Please refer to נא עיין original English article המאמר המקורי באנגלית whenever possible. בכל הזדמנות אפשרית.


Leave a Reply השאירו תגובה

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> באפשרותך להשתמש בתגים אלה: <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. כדי להירשם הערות תכונה הושבת. To receive notification of latest comments posted, subscribe to כדי לקבל הודעה העדכנית של תגובות, כדי להירשם My Digital Life Comments RSS feed החיים שלי דיגיטליות תגובות RSS Feed or או register to receive הרשמה לקבלת new comments in daily email digest. תגובות חדש ב דוא"ל תקציר יומי.
Custom Search

New Articles מאמרים חדשים

Incoming Search Terms for the Article תנאי נכנסות חיפוש עבור מאמרים

shutdown apache Apache הכיבוי - -- apache shutdown כיבוי Apache - -- restart apache service הפעל מחדש את שירות apache - -- centos apache restart CentOS Apache מחדש - -- cron restart apache cron להפעיל מחדש את אפאצ 'י - -- shutdown apache linux Linux Apache הכיבוי - -- apache daemon daemon של אפאצ 'י - -- apache auto restart Apache אוטומטי מחדש - -- centos autostart service CentOS שירות autostart - -- apache auto start להתחיל אוטומטית Apache - -- cron job restart apache עבודה cron להפעיל מחדש את אפאצ 'י - -- centos auto start httpd CentOS אוטומטי להתחיל httpd - -- apache restart interval אפאצ 'י מחדש מרווח - -- linux apache shutdown Linux הכיבוי Apache - -- crontab restart service crontab מחדש שירות - -- crontab service restart שירות crontab מחדש - -- restart apache centos מחדש CentOS Apache - -- restart httpd מחדש httpd - -- apache shutdown linux Linux הכיבוי Apache - -- crontab restart apache crontab מחדש Apache - -- find apachectl למצוא apachectl - -- freebsd restart apache FreeBSD מחדש Apache - -- centos shutdown apache CentOS Apache הכיבוי - -- start apache httpd להתחיל Apache httpd - -- restart apache services הפעל מחדש את השירותים Apache - -- cron job to restart apache עבודה cron להפעיל מחדש את אפאצ 'י - -- cron httpd restart cron httpd מחדש - -- service apache restart שירות אפאצ 'י מחדש - -- how to restart apache service איך להפעיל מחדש את שירות apache - -- linux restart apache service לינוקס מחדש את שירות apache - -- shutdown httpd כיבוי httpd - -- cron restart service cron להפעיל מחדש את שירות - -- restart apache crontab מחדש crontab Apache - -- centos reboot apache CentOS Apache מחדש - -- how to shutdown apache כיצד אפאצ 'י הכיבוי - -- how to shutdown apache in linux כיצד אפאצ 'י הכיבוי ב-Linux - -- apache daemon example לדוגמה daemon של אפאצ 'י - -- linux shutdown apache Linux Apache הכיבוי - -- cron apache restart Apache cron מחדש - -- crontab apache restart Apache crontab מחדש - -- how to shut down apache linux איך לסגור Linux Apache - -- centos autostart services CentOS autostart שירותים - -- restart apache cron מחדש cron Apache - -- restart apache via cron הפעלה מחדש של אפאצ 'י באמצעות cron - -- restart httpd in freebsd מחדש httpd ב FreeBSD - -- apache restart service אפאצ 'י מחדש שירות - -- freebsd apache autostart autostart Apache FreeBSD - -- centos autostart httpd CentOS autostart httpd - -- centos restart apache CentOS מחדש Apache - -- httpd shutdown כיבוי httpd - --