| 功能 | RHEL 6 | RHEL 7 |
|---|---|---|
| 启动服务 | service foo start | systemctl start foo.service |
| 重启服务 | service foo restart | systemctl restart foo.service |
| 停止服务 | service foo stop | systemctl stop foo.service |
| 查看服务状态 | service foo status | systemctl status foo.service |
| 开机自动启动 | chkconfig foo on | systemctl enable foo.service |
| 开机不自动启动 | chkconfig foo off | systemctl disable foo.service |