Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time إيقاف السيارات وإعادة تشغيل اباتشي 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. واباتشي هو الأكثر شعبية بين النص المتشعب الخادم ان القوى والمواقع في جميع أنحاء العالم. 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 الخدمة باستمرار ، وسوف يكون موقع الويب الخاص بك غير ممكن للزوار. 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 متروك ، مسؤول الملقم أيضا لديه خيار إعادة تشغيل الخدمة اباتشي دوريا.
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. إيقاف وإعادة تشغيل اباتشي بشكل دوري في الفترة الفاصلة محددة تساعد على كفالة اباتشي خدمة الإنترنت هي دائما في حالة تشغيل من الدرجة الأولى ، من دون تأثير من احتمال تسرب معلومات سرية الذاكرة والموارد القص من الاتصالات المستمرة. 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 (أو المهام المجدولة أو جدولة المهام في ويندوز سيرفر) لجدولة المهمة في الوقت تفضل. Simply edit the cron jobs with a root or whell user, and add in the following line: ببساطة تحرير وظيفة كرون مع جذر أو مستخدم whell ، وتضاف في السطر التالي :
mhdmw /usr/local/apache/bin/apachectl restart mhdmw / البيرة / المحلية / اباتشى / بن / apachectl إعادة تشغيل
Replace m, h, d, m and w with value of your preference, where they represent the following meaning: استبدال م ، ح ، د ، م و ث مع قيمة المفضل لديك ، حيث أنها تمثل المعنى التالي :
m: min (0 – 59) م : دقيقة (0 -- 59)
h: hour (0 – 23) ح : ساعة (0 -- 23)
d: day of month (1 – 31) د : يوم من شهر (1 -- 31)
m: month (1 – 12) م : في الشهر (1 -- 12)
w: day of week (0 – 6) (Sunday=0) ث : يوم من الأسبوع (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 * * * / البيرة / المحلية / اباتشى / بن / apachectl إعادة تشغيل
To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job: لإعادة تشغيل اباتشي HTTPD الخدمة في نهاية الأسبوع ، قبيل ظهر اليوم الأحد 12 ، استخدم ما يلي كرون العمل :
0 12 * * 0 /usr/local/apache/bin/apachectl restart 0 12 * * 0 / البيرة / المحلية / اباتشى / بن / apachectl إعادة تشغيل
You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS. يمكنك إدخال "رجل crontab" لمعرفة المزيد عن وظيفة كرون في لينوكس / يونيكس / فري / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. لتحرير crontab ظيفة قائمة ، ببساطة دخول "crontab ه" على قذيفة. 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. إذا كان هذا هو الحال ، إجراء التغييرات اللازمة ، ثم اضغط على "السيطرة العاشر" ، اتبع ب "نعم" لحفظ الملف ، ومتابعة من قبل الصحافة لقبول أدخل اسم الملف الافتراضي. 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 قد تكون مختلفة عن البديل مختلفة من يونيكس ، لينكس أو بي إس دي النكهات. Use one of the following command to find out where is Apache installed: استخدم أحد الأوامر التالية لمعرفة أين هو اباتشي مثبت :
find / apachectl | grep apachectl العثور على / apachectl | 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. بعض أباتشي قد تثبيت في / البيرة / sbin / apachectl ، أو يمكنك استخدام الروابط httpd أو apachectl رمزية في / الخ / rc.d / init.d / apachectl أو / الخ / 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. كلما كان ذلك ممكنا.
Related Articles مواد متصلة
- Start, Stop and Restart Crond Daemon in Linux بداية ، وقف وإعادة تشغيل Crond الشيطان في لينكس
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files بدءا اباتشي HTTPD فشلت بسبب لا يمكن فتح أو لا mod_log_bytes mod_bwlimited ، أو تلك mod_bandwidth ملفات
- Automatically Shutdown Computer With Auto Shutdown Genius إيقاف تشغيل الكمبيوتر تلقائيا مع إيقاف السيارات عبقرية
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 4 تثبيت خادم الويب في فري 6.0 مع اباتشي 2.2 ، 5.0 ، وماي بي اتش بي 5 -- الجزء 4
- How to Disable Linux and Unix Cron Jobs (Crontab) Email Sending كيفية تعطيل لينوكس ويونكس وظائف كرون (Crontab) إرسال البريد الإلكتروني
- How to Restart (Stop or Start) cPanel Service (cpsrvd) via Telnet or SSH كيفية إعادة تشغيل (إيقاف أو ابدأ) وحة التحكم الخدمات العامة (cpsrvd) أو عن طريق التلنت سه
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 تثبيت خادم الويب في فري 6.0 مع اباتشي 2.2 ، 5.0 ، وماي بي اتش بي 5 -- الجزء 5
- Request URL /server-status or 404 Page Not Found Apache Error طلب عنوان / الخادم حالة أو 404 صفحة غير موجودة اباتشي خطأ
- Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut إعادة تشغيل أو إيقاف تشغيل ويندوز (إكس بي ، 2000 وفيستا) من سطر الأوامر أو واحدة انقر فوق اختصار
- cPanel Unable or Cannot Start or Restart POP3 Mail Service وحة التحكم غير قادر أو لا يمكن بدء أو إعادة تشغيل خدمة بريد POP3









































