// crontab -l
[root@beihang20 script]# crontab -l
-bash: crontab: command not found
[root@beihang20 script]#
// yum install vixie-cron
[root@beihang20 script]# yum install vixie-cron
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: ftp.kddilabs.jp
* extras: mirrors.aliyun.com
* nux-dextop: li.nux.ro
* rpmforge: ftp.riken.jp
* updates: mirrors.aliyun.com
* webtatic: us-east.repo.webtatic.com
解决依赖关系
--> 执行事务检查
---> Package cronie.x86_64 0:1.4.4-15.el6 will be 安装
--> 处理依赖关系 dailyjobs,它被软件包 cronie-1.4.4-15.el6.x86_64 需要
--> 处理依赖关系 /usr/sbin/sendmail,它被软件包 cronie-1.4.4-15.el6.x86_64 需要
--> 执行事务检查
---> Package cronie-anacron.x86_64 0:1.4.4-15.el6 will be 安装
--> 处理依赖关系 crontabs,它被软件包 cronie-anacron-1.4.4-15.el6.x86_64 需要
---> Package exim.x86_64 0:4.72-7.el6 will be 安装
--> 执行事务检查
---> Package crontabs.noarch 0:1.10-33.el6 will be 安装
--> 完成依赖关系计算
依赖关系解决
===================================================================================================
软件包 架构 版本 仓库 大小
===================================================================================================
正在安装:
cronie x86_64 1.4.4-15.el6 base 74 k
为依赖而安装:
cronie-anacron x86_64 1.4.4-15.el6 base 31 k
crontabs noarch 1.10-33.el6 base 10 k
exim x86_64 4.72-7.el6 epel 1.2 M
事务概要
===================================================================================================
Install 4 Package(s)
总下载量:1.3 M
Installed size: 4.0 M
确定吗?[y/N]:y
下载软件包:
(1/4): cronie-1.4.4-15.el6.x86_64.rpm | 74 kB 00:00
(2/4): cronie-anacron-1.4.4-15.el6.x86_64.rpm | 31 kB 00:00
(3/4): crontabs-1.10-33.el6.noarch.rpm | 10 kB 00:00
(4/4): exim-4.72-7.el6.x86_64.rpm | 1.2 MB 00:01
---------------------------------------------------------------------------------------------------
总计 608 kB/s | 1.3 MB 00:02
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : exim-4.72-7.el6.x86_64 1/4
正在安装 : cronie-1.4.4-15.el6.x86_64 2/4
正在安装 : crontabs-1.10-33.el6.noarch 3/4
正在安装 : cronie-anacron-1.4.4-15.el6.x86_64 4/4
Verifying : crontabs-1.10-33.el6.noarch 1/4
Verifying : cronie-anacron-1.4.4-15.el6.x86_64 2/4
Verifying : cronie-1.4.4-15.el6.x86_64 3/4
Verifying : exim-4.72-7.el6.x86_64 4/4
已安装:
cronie.x86_64 0:1.4.4-15.el6
作为依赖被安装:
cronie-anacron.x86_64 0:1.4.4-15.el6 crontabs.noarch 0:1.10-33.el6 exim.x86_64 0:4.72-7.el6
完毕!
[root@beihang20 script]#
// service crond restart
[root@beihang20 script]# service crond restart
正在启动 crond: [确定]
[root@beihang20 script]#
// chkconfig --add crond
[root@beihang20 script]# chkconfig --add crond
[root@beihang20 script]# chkconfig --list crond
crond 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@beihang20 script]#