Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Apacheのhttpdサービスの自動再起動をシャットダウンし、デーモンのプリセット時間

The core component of any websites, blogs, web services and web applications is the web server.のコアコンポーネントのすべてのウェブサイト、ブログ、 WebサービスとWebアプリケーションは、ウェブサーバーです。 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.それを確保するための重要な連続稼働時間は、 Apacheのサービスまたはデーモンを実行して、サーバー上の、 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デーモンは、サーバーの管理者には、 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の再起動をシャットダウンし、定期的に特定の間隔を確保するために役立ちますがApacheのWebサービスは、常にトップへ切り欠きの状態で実行され、メモリリークが発生する可能性の効果以上にとると資源の持続的接続されています。 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.また、ウェブサイトを確認してダウンタイムスケジュールは限られて、次の再起動し、念のためにハングアップすることはとても不幸なことApacheの監視サービスを無期限として事件をピックアップすることはできません。

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. Apacheを起動を自動的にシャットダウンして、私たちも使用できるようにcrontabに(またはスケジュールされたタスクまたはタスクスケジューラをWindowsサーバー)をスケジュールするタスクは、時間を好む。 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 /ローカル/ Apacheの/ビン/ apachectlを再起動

Replace m, h, d, m and w with value of your preference, where they represent the following meaning:置き換えるメートル、 h 、 d再生、 MとWの値の設定は、どこを表すものは、次の意味:

m: min (0 - 59)メートル:分( 0 -5 9)
h: hour (0 - 23) h :時間( 0 -2 3)
d: day of month (1 - 31) d :日の月日( 1 -3 1)
m: month (1 - 12)メートル:月日( 1 -1 2)
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:たとえば、 Apacheのデーモンを殺すと午前1時に開始してすぐに毎晩、 crontabに設定しての行を:

0 1 * * * /usr/local/apache/bin/apachectl restart 0 1 * * * / usr /ローカル/ Apacheの/ビン/ apachectlを再起動

To restart Apache HTTPD service on weekend, such as Sunday 12 noon, use the following cron job:週末のApacheのhttpdサービスを再起動するなど、日曜日12時、次のcronジョブを使用して:

0 12 * * 0 /usr/local/apache/bin/apachectl restart 0 12 * * 0 / usr /ローカル/ Apacheの/ビン/ apachectlを再起動

You can input “man crontab” to learn more about cron jobs in Linux/Unix/FreeBSD/CentOS.入力することができます"男のcrontab "のcronジョブの詳細については、 Linux / Unix版/ 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が表示されるなどのテキストエディタの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.このような場合には、必要な変更は、キーを押しては" 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やBSDのフレーバーです。 Use one of the following command to find out where is Apache installed:のいずれかを使用は、以下のコマンドを確認するにはどこにApacheのインストール:

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の5月のインストール/ usr / sbinに/ apachectlか、または使用することができますapachectl httpdあるいはシンボリックリンクを/ etc / rc.d / init.dに/ apachectl又は/ etc / rc.d / init.dに/のhttpdです。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要 :これは、機械翻訳ページで提供"現状有姿"を保証します。 Machine translation may be difficult to understand.機械翻訳を理解するのは難しいかもしれません。 Please refer toをご覧ください original English articleオリジナルの英語記事索引 whenever possible.可能な限りです。

Share and contribute or get technical support and help atを共有して貢献や技術サポートとヘルプを得る My Digital Life Forums 私のデジタルライフフォーラム .です。



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= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント


Custom Search

New Articles新しい記事

Incoming Search Terms for the Article検索用語を受信するには

restart apache Apacheの再起動 - - restart httpd 再起動のhttpd - - apache shutdown Apacheのシャットダウン - - centos service autostart CentOS版サービスを自動起動 - - apache restart Apacheを再起動 - - service apache restart サービスApacheを再起動 - - how to restart apache Apacheのを再起動する方法 - - restart apache service Apacheサービスを再起動する - - auto restart apache Apacheの自動再起動 - - crontab restart apache crontabにApacheの再起動 - - freebsd apache autostart FreeBSDのApacheの自動起動 - - apache service restart Apacheサービスを再起動する - - service restart apache Apacheのサービスを再起動 - - apache auto start Apacheの自動起動 - - apache automatic restart Apacheの自動再起動 - - CentOS autostart httpd CentOS版のhttpdの自動起動 - - apache auto restart Apacheの自動再起動 - - centos httpd autostart CentOS版のhttpdの自動起動 - - start apache service Apacheサービスを開始 - - auto start apache Apacheの自動起動 - - centos autostart services CentOS版の自動起動サービス - - reboot apache Apacheの再起動 - - centos apache autostart CentOS版Apacheの自動起動 - - cronjob restart apache Apacheのcronジョブを再起動する - - centos autostart service CentOS版の自動起動サービス - - apache httpd shutdown Apacheのシャットダウンのhttpd - - how to shutdown apache シャットダウンする方法をApacheの - - shutdown httpd シャットダウンのhttpd - - centos auto restart CentOS版の自動再起動 - - Linux Apache Memory Leak LinuxのApacheのメモリリークが発生する - - start apache httpd Apacheを起動のhttpd - - how to shutdown httpd どのようにシャットダウンのhttpd - - restart apache centos CentOS版Apacheの再起動 - - cron auto restart apache cronの自動再起動Apacheの - - starting apache service Apacheサービスを開始 - - shutdown apache Apacheのシャットダウン - - centos auto start CentOS版の自動スタート]ボタンを - - schedule apache restart スケジュールApacheを再起動 - - Apache restart service Apacheを再起動サービス - - autostart httpd centos CentOS版のhttpdの自動起動 - - cron restart apache Apacheのcronの再起動 - - linux shut down apache ApacheのLinuxのシャットダウン - - set apache to autostart Apacheを自動起動設定 - - start apache service+unix+usr/sbin UNIXのApacheサービスを開始+ + usr / sbin - - centos auto start apache CentOS版Apacheの自動起動 - - httpd shutdown シャットダウンのhttpd - - plesk cron job restart apache cronジョブのPlesk Apacheの再起動 - - how to start httpd service in linux Linuxのhttpdサービスを起動する方法 - - centos service apache CentOS版Apacheのサービス - - auto start apache service Apacheサービスを自動起動 - -