1.15.2011

How to install Cron on CentOS Linux?

I have a CentOS Box which was without cron package installed.When I tried running crond service it says "Unrecognized service". I thought of installing through:

#yum install cron

But that din't help. So I explored and came up with the solution as below:

[root@localhost graphs]# service crond restart
crond: unrecognized service

[root@localhostgraphs]# rpm -qa | grep cron
crontabs-1.10-8
[root@localhostgraphs]# rpmquery --whatprovides $(which crontab)
file /usr/bin/crontab is not owned by any package
[root@localhost tl_graphs]# rpmquery --whatprovides $(which crontab)
file /usr/bin/crontab is not owned by any package
[root@localhost graphs]# yum install vixie-cron
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package vixie-cron.i386 4:4.1-76.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
vixie-cron i386 4:4.1-76.el5 base 78 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 78 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): vixie-cron-4.1-76. 100% |=========================| 78 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: vixie-cron ######################### [1/1]

Installed: vixie-cron.i386 4:4.1-76.el5
Complete!
[root@localhost graphs]# service crond restart
Stopping crond: cannot stop crond: crond is not running. [FAILED]
Starting crond: [ OK ]
[root@localhost graphs]#

So I have crond service running on my CentOS.
Happy CronDing !!!

No comments:

Post a Comment