前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >24. 日常运维 3

24. 日常运维 3

作者头像
py3study
发布2020-01-14 11:44:21
5800
发布2020-01-14 11:44:21
举报
文章被收录于专栏:python3
  1. 任务计划 /etc/crontab 任务计划配置文件
24. 日常运维 3
24. 日常运维 3

crontab -e 编辑任务计划 crontab -l(小写的L) 列出任务计划 crontab -r 删除 crontab -u [username] 指定某个用户 1-5 表示范围1到5 1,2,3 表示或者 */2 表示能被2整除的 要保证服务的启动状态 systemctl start crond.servive /var/spool/cron/[username] 用户的cron计划内容

  1. 系统管理chkconfig
24. 日常运维 3
24. 日常运维 3
24. 日常运维 3
24. 日常运维 3

--level 34 network off/on 控制network的等级3和4开关 --add [servicename] 增加一行服务,前提是在/etc/init.d/目录下有文件 --del [servicename] 删除一行服务

  1. 系统管理systemd systemctl list-units --all --type=service 列service清单
24. 日常运维 3
24. 日常运维 3

systemctl enable [servicename] 让服务开机启动 systemctl disable [servicename] 不让开机启动 systemctl status [servicename] 查看服务状态 systemctl stop [servicename] 停止服务 systemctl start [servicename] 启动服务 systemctl restart [servicename] 重启服务 systemctl is-enabled [servicename] 检查服务是否开机启动 /usr/lib/systemd/system/ 系统所有unit,分为以下类型

24. 日常运维 3
24. 日常运维 3
24. 日常运维 3
24. 日常运维 3

service 系统服务 target 多个unit组成的组 device 硬件设备 mount 文件系统挂载点 automount 自动挂载点 path 文件或路径 scope 不是由systemd启动的外部进程 slice 进程组 snapshot systemd快照 socket 进程间通信套接字 swap swap文件 timer 定时器 systemctl list-units 列出所有正在运行的unit systemctl list-units --all 列出所有 systemctl list-units --all --state=inactive 列出不在运行的unit systemctl list-units --type=service 列出在运行的service systemctl is-active [servicename] 查看某个服务是否为active target 系统为了方便管理,用target来管理unit systemctl list-unit-files --type=target systemctl list-dependencies multi-user.target 查看这个target下有什么unit systemctl get-default 获取默认target systemctl set-default multi-user.target 设置默认target 一个service属于一种类型的unit 多个unit组成了一个target 一个target里面包含了多个service

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019/07/14 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档