#!/usr/bin/env bash # 解决bash: service: command not found 错误 yum list | grep initscripts && yum install initscripts -y # 安装和启动 yum install crontabs -y && service crond start