systemd 服务管理
来源:互联网 发布:2016电脑点歌软件 编辑:程序博客网 时间:2024/06/05 13:05
systemd 服务管理
列出所有的服务:
[root@localhost ~]# systemctl list-units --all --type=service UNIT LOAD ACTIVE SUB DESCRIPTION auditd.service loaded active running Security Auditing Service brandbot.service loaded inactive dead Flexible Branding Service cpupower.service loaded inactive dead Configure CPU power related setti crond.service loaded active running Command Scheduler dbus.service loaded active running D-Bus System Message Bus● display-manager.service not-found inactive dead display-manager.service dm-event.service loaded inactive dead Device-mapper event daemon dracut-shutdown.service loaded inactive dead Restore /run/initramfs ebtables.service loaded inactive dead Ethernet Bridge Filtering tables emergency.service loaded inactive dead Emergency Shell● exim.service not-found inactive dead exim.service ......LOAD = Reflects whether the unit definition was properly loaded.ACTIVE = The high-level unit activation state, i.e. generalization of SUB.SUB = The low-level unit activation state, values depend on unit type.87 loaded units listed.To show all installed unit files use 'systemctl list-unit-files'.
服务开机启动
[root@localhost ~]# systemctl enable crond.service Created symlink from /etc/systemd/system/multi-user.target.wants/crond.service to /usr/lib/systemd/system/crond.service.
服务开机不启动
[root@localhost ~]# systemctl disable crond.service Removed symlink /etc/systemd/system/multi-user.target.wants/crond.service.
查看服务状态
[root@localhost ~]# systemctl status crond.service ● crond.service - Command Scheduler Loaded: loaded (/usr/lib/systemd/system/crond.service; disabled; vendor preset: enabled) Active: active (running) since 二 2017-12-05 08:33:57 CST; 1h 9min ago Main PID: 690 (crond) CGroup: /system.slice/crond.service └─690 /usr/sbin/crond -n12月 05 08:33:57 localhost.localdomain systemd[1]: Started Command Scheduler.12月 05 08:33:57 localhost.localdomain systemd[1]: Starting Command Scheduler...12月 05 08:33:57 localhost.localdomain crond[690]: (CRON) INFO (RANDOM_DELAY will be scaled ....)12月 05 08:33:57 localhost.localdomain crond[690]: (CRON) INFO (running with inotify support)Hint: Some lines were ellipsized, use -l to show in full.
停止/开启/重启服务
[root@localhost ~]# systemctl stop crond.service[root@localhost ~]# systemctl start crond.service[root@localhost ~]# systemctl restart crond.service
检测服务是否开机启动
[root@localhost ~]# systemctl is-enabled crond.serviceenabled[root@localhost ~]# systemctl disable crond.serviceRemoved symlink /etc/systemd/system/multi-user.target.wants/crond.service.[root@localhost ~]# systemctl is-enabled crond.servicedisabled
阅读全文
0 0
- systemd 管理服务
- systemd 服务管理
- systemd管理服务
- Linux-systemd服务管理之一 简介
- 【Linux init】systemd 服务单元管理
- [置顶]【Linux init】systemd 服务单元管理
- linux下如何使用systemctl管理systemd服务与单元
- linux下如何使用systemctl管理systemd服务与单元
- Systemd服务简介
- 系统服务chkconfig,systemd
- linux任务计划cron、chkconfig工具、systemd管理服务、unit介绍和target介绍讲解
- 编写systemd下服务脚本
- tomcat7配置systemd服务示例
- systemd命令管理linux系统
- linux学习第三十二篇:linux任务计划cron,chkconfig工具,systemd管理服务,unit介绍,target介绍
- 八周第一次课 2017.12.4 linux任务计划cron、chkconfig工具、systemd管理服务、unit介绍、target介绍
- systemd
- systemd
- Aspect报错: can't find referenced pointcut xxx
- 终结任务
- 任务计划 crontab
- Unix:signal调用类成员函数 / Linux:signal调用类成员函数
- 服务管理工具 chkconfig
- systemd 服务管理
- Java笔记13
- 895C
- Java笔记14
- 循环列子 将一个整数各个位数倒序输出
- 2017-12-9 CSDN第一天小记
- ss命令
- 微积分的实质?袁萌评知乎的谬论
- JSP自定义标签入门1.0