hello
Is there any easy Tutorial of making Apache Restarting every Hour Once .
Has to be Done auto by Crontab.
Please i'm Begginer with VPS servers. and i have Centos 5.3
Printable View
hello
Is there any easy Tutorial of making Apache Restarting every Hour Once .
Has to be Done auto by Crontab.
Please i'm Begginer with VPS servers. and i have Centos 5.3
you could always toss in a bash script killall followed by apachectl, but that would probably be putting a bandage on a bigger problem.. why do you need to restart apache constantly?
Code:echo '/etc/init.d/httpd restart' > /etc/cron.hourly/httpd
I'm not Good in Just Copy Commands .. can you Excplain wht to do with this command . like i said i'm begginer.
Is ther way to do it from SIM (System Integrity Monitor) on CentOS.
How if yes?
As quantumphysics has already told you, something is very wrong if you need to restart Apache every hour...
Anyway, login to your server and paste the command samurai7 told you into the terminal window, easy :-)
http://www.rfxn.com/projects/system-integrity-monitor/
SIM will auto check service and restart as required.
Its fairly easy to install and asks a basic questions that should get you up and running.
As samurai7 says echo '/etc/init.d/httpd restart' > /etc/cron.hourly/httpd
it will create a httpd "cron" file which will be executed every hour and will restart your apache service every hour. Do not forget to do this "chmod 755 /etc/cron.hourly/httpd" so that the cron daemon can execute it.
But that is not a solution, if you need to restart your apache service every hour, than there si something wrong with your server or apache service. Why do you have to restart it? Is it hitting the memory limit, I/O, or what?
Thanks.