Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time ऑटो Shutdown और Restart अपाचे 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. और Apache 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. यह सुनिश्चित करने के लिए जरूरी है कि uptime और Apache सर्वर पर सेवा या डेमॉन के चल रहे सतत, अपनी वेबसाइट के रूप में हो अगर 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 डेमॉन ऊपर है की जांच करने के अलावा, सर्वर प्रशासक भी एक विकल्प के लिए Apache सेवा को पुनः आरंभ समय समय पर किया है.
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. बंद करने के लिए और अपाचे स्वतः शुरू, हम Windows सर्वर में crontab का प्रयोग कर (या अनुसूचित टास्क या टास्क समयबद्धक कर सकते हैं) को पसंद करते समय पर काम अनुसूची. Simply edit the cron jobs with a root or whell user, and add in the following line: बस एक जड़ या whell उपयोगकर्ता के साथ cron नौकरी संपादित करें, और निम्न पंक्ति में जोड़ें:
mhdmw /usr/local/apache/bin/apachectl restart mhdmw / स्थानीय usr / / 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). चर के लिए है कि आप हर बार होगा चाहते हैं, तो * के रूप में सेट (asterisk).
For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: उदाहरण के लिए, Apache डीमन को मारने के लिए और 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 दोपहर को पुनः आरंभ करने के लिए, निम्न क्रॉन जॉब का उपयोग करें:
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 'कवच पर ए. 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" फ़ाइल को बचाने के लिए, और ने प्रेस दर्ज करें पालन के लिए डिफ़ॉल्ट फ़ाइल नाम स्वीकार करते हैं. 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. ध्यान दें कि मार्ग Unix, Linux या बीएसडी जायके के विभिन्न संस्करण पर अलग अलग हो सकता apachectl है. 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. कुछ Apache / usr / sbin apachectl /, या आप / etc में httpd या apachectl प्रतीकात्मक लिंक का उपयोग कर सकते में स्थापित / rc.d / init.d / apachectl या / etc / rc.d / / httpd init.d / हो सकता है.
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 शुरू करो, बंद करो और Restart Crond डेमन लिनक्स में
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files शुरू अपाचे HTTPD या ओपन नहीं ऐसी कोई, mod_bwlimited mod_log_bytes या mod_bandwidth सकते फ़ाइलें के कारण विफल
- Automatically Shutdown Computer With Auto Shutdown Genius स्वतः Shutdown ऑटो Shutdown प्रतिभाशाली के साथ कंप्यूटर
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 4 Apache स्थापित वेब 2.2, 5.0 MySQL और 5 PHP के साथ 6.0 FreeBSD में सर्वर - भाग 4
- How to Disable Linux and Unix Cron Jobs (Crontab) Email Sending अक्षम Linux और यूनिक्स Cron नौकरियाँ (Crontab) ईमेल भेजने के लिए कैसे
- How to Restart (Stop or Start) cPanel Service (cpsrvd) via Telnet or SSH बंद करो (Restart या शुरू करने के लिए कैसे) cPanel सेवा (Telnet या ssh द्वारा cpsrvd)
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 Apache स्थापित वेब 2.2, 5.0 MySQL और 5 PHP के साथ 6.0 FreeBSD में सर्वर - भाग 5
- Request URL /server-status or 404 Page Not Found Apache Error अनुरोध यूआरएल / सर्वर-स्थिति या 404 पृष्ठ नहीं मिला Apache त्रुटि
- Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut Restart या Shutdown Windows (XP, 2000 और Vista) आदेश पंक्ति या एक क्लिक से शॉर्टकट
- cPanel Unable or Cannot Start or Restart POP3 Mail Service असमर्थ cPanel या नहीं शुरू कर सकते हैं या Restart पॉप 3 मेल सेवा









































