Auto Shutdown and Restart Apache HTTPD Service Daemon at Preset Time Auto Shutdown dan Restart Apache HTTPD Service Daemon di Preset Sisa

The core component of any websites, blogs, web services and web applications is the web server. Komponen inti dari setiap website, blog, layanan web dan aplikasi web adalah server web. And Apache is the most popular HTTP server that powers the websites worldwide. Dan Apache merupakan server HTTP paling populer yang digunakan pada situs-situs di seluruh dunia. 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. Sangat penting untuk memastikan bahwa uptime dan terus menjalankan layanan Apache atau daemon pada server, seolah-olah layanan HTTPD sedang down, website Anda akan unaccessible untuk para pengunjung. 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. Selain menggunakan layanan monitoring, script atau utilitas untuk memeriksa apakah daemon HTTPD habis, administrator server juga memiliki pilihan untuk me-restart layanan Apache secara berkala.

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. Shutdown dan restart Apache secara berkala pada selang waktu tertentu membantu untuk memastikan bahwa layanan web Apache selalu berjalan dalam kondisi kedudukan tertinggi, tanpa efek kemungkinan kebocoran memori dan sumber daya memonopoli oleh koneksi persistent. 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. Hal ini juga memastikan bahwa situs web downtime adalah terbatas pada jadwal restart berikutnya, hanya dalam kasus itu sangat beruntung bahwa Apache menggantung tanpa batas waktu dan layanan monitoring Anda tidak dapat mengambil kejadian.

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. Untuk shutdown dan memulai Apache secara otomatis, kita dapat menggunakan crontab (atau Terjadwal Tugas atau Task Scheduler di Windows Server) untuk menjadwalkan tugas pada waktu itu lebih suka. Simply edit the cron jobs with a root or whell user, and add in the following line: Cukup mengedit cron pekerjaan dengan root atau user whell, dan tambahkan baris berikut:

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: Ganti m, h, d, m dan w dengan nilai preferensi Anda, di mana mereka mewakili makna sebagai berikut:

m: min (0 – 59) m: min (0 - 59)
h: hour (0 – 23) h: jam (0 - 23)
d: day of month (1 – 31) d: hari bulan (1 - 31)
m: month (1 – 12) m: month (1 - 12)
w: day of week (0 – 6) (Sunday=0) w: hari minggu (0 - 6) (Sunday = 0)

For variables that you want to happen every time, set it as * (asterisk). Untuk variabel yang Anda inginkan terjadi setiap waktu, mengaturnya sebagai * (asterisk).

For example, to kill the Apache daemon and start it immediately at 1 AM every night, set the crontab line to: Misalnya, untuk membunuh daemon Apache dan mulai segera di 1 pagi setiap malam, mengatur baris 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: Untuk me-restart Apache HTTPD layanan pada akhir pekan, seperti Minggu 12 siang, gunakan tugas cron berikut:

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. Anda dapat memasukkan "man crontab" untuk mempelajari lebih lanjut tentang cron jobs di Linux / Unix / FreeBSD / CentOS. To edit the crontab job list, simply enter “crontab -e” on the shell. Untuk mengedit crontab daftar pekerjaan, cukup masukkan "crontab-e" pada shell. Existing crontab will appear on a text editor, such as GNU nano. Ada crontab akan muncul pada editor teks, seperti 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. Jika hal ini terjadi, membuat perubahan yang diperlukan, kemudian tekan "Ctrl-X", diikuti dengan "Y" untuk menyimpan file, dan ikuti oleh Masukkan tekan untuk menerima nama file default. The new crontab will be installed and in effect immediately. Crontab baru akan dipasang dan berlaku segera.

Note that the path to apachectl may be different on different variant of Unix, Linux or BSD flavors. Perlu diketahui bahwa jalan untuk apachectl mungkin berbeda pada berbagai varian dari Unix, Linux atau BSD rasa. Use one of the following command to find out where is Apache installed: Gunakan salah satu dari perintah berikut untuk mencari tahu di mana Apache diinstal:

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. Beberapa dapat menginstal Apache di / usr / sbin / apachectl, atau Anda dapat menggunakan apachectl httpd atau link simbolik di / etc / rc.d / init.d / apachectl atau / etc / rc.d / init.d / httpd.

IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman ini adalah mesin diterjemahkan dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Terjemahan mesin mungkin sulit untuk mengerti. Please refer to Silakan merujuk ke original English article artikel asli bahasa Inggris whenever possible. bila memungkinkan.


Leave a Reply 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> Anda dapat menggunakan tag ini: <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. Berlangganan ke fitur komentar telah dinonaktifkan. To receive notification of latest comments posted, subscribe to Untuk menerima pemberitahuan dari komentar terbaru diposting, untuk berlangganan My Digital Life Comments RSS feed My Digital Life Komentar RSS feed or atau register to receive mendaftar untuk menerima new comments in daily email digest. komentar baru di email digest harian.
Custom Search

New Articles Artikel Baru

Incoming Search Terms for the Article Cari Syarat masuk untuk Artikel

shutdown apache shutdown apache - -- apache shutdown shutdown apache - -- restart apache service layanan apache restart - -- centos apache restart CentOS apache restart - -- cron restart apache cron restart apache - -- shutdown apache linux shutdown apache linux - -- apache auto restart auto restart apache - -- apache daemon apache daemon - -- centos autostart service CentOS layanan autostart - -- apache auto start apache auto start - -- cron job restart apache tugas cron restart apache - -- centos auto start httpd CentOS auto start httpd - -- apache restart interval apache restart Interval - -- linux apache shutdown apache linux shutdown - -- crontab restart service crontab restart - -- crontab service restart layanan crontab restart - -- restart apache centos restart apache CentOS - -- restart httpd restart httpd - -- apache shutdown linux shutdown apache linux - -- crontab restart apache crontab restart apache - -- find apachectl menemukan apachectl - -- freebsd restart apache freebsd restart apache - -- centos shutdown apache CentOS shutdown apache - -- start apache httpd mulai apache httpd - -- how to shutdown apache in linux cara shutdown apache di linux - -- restart apache services layanan apache restart - -- cron job to restart apache tugas cron untuk me-restart apache - -- cron httpd restart cron httpd restart - -- service apache restart layanan apache restart - -- how to restart apache service bagaimana cara me-restart servis apache - -- linux restart apache service linux restart servis apache - -- shutdown httpd shutdown httpd - -- cron restart service cron restart - -- restart apache crontab restart apache crontab - -- centos reboot apache CentOS reboot apache - -- how to shutdown apache cara shutdown apache - -- apache daemon example contoh daemon apache - -- linux shutdown apache linux shutdown apache - -- cron apache restart cron apache restart - -- apache restart cron apache restart cron - -- crontab apache restart crontab apache restart - -- how to shut down apache linux cara menghentikan apache linux - -- centos autostart services CentOS layanan autostart - -- restart apache cron restart apache cron - -- restart apache via cron restart apache melalui cron - -- restart httpd in freebsd restart httpd di freebsd - -- apache restart service apache restart - -- freebsd apache autostart autostart apache freebsd - -- centos autostart httpd CentOS autostart httpd - -- centos restart apache CentOS restart apache - --