centos 7 开机启动服务项优化
1.
使用 systemctl list-unit-files 可以查看启动项
systemctl list-unit-files | grep enable 过滤查看启动项如下
abrt-ccpp.service enabled abrt为auto bug report的缩写 用于bug报告 关闭
abrt-oops.service enabled ----------------------
abrt-vmcore.service enabled ----------------------
abrt-xorg.service enabled ----------------------
abrtd.service enabled ----------------------
auditd.service enabled 安全审计 保留
autovt@.service enabled 登陆相关 保留
crond.service enabled 定时任务 保留
dbus-org.freedesktop.NetworkManager.service enabled 桌面网卡管理 关闭
dbus-org.freedesktop.nm-dispatcher.service enabled ----------------------
getty@.service enabled tty控制台相关 保留
irqbalance.service enabled 优化系统中断分配 保留
kdump.service enabled 内核崩溃信息捕获 自定
microcode.service enabled 处理器稳定性增强 保留
NetworkManager-dispatcher.service enabled 网卡守护进程 关闭
NetworkManager.service enabled ----------------------
postfix.service enabled 邮件服务 关闭
rsyslog.service enabled 日志服务 保留
snmpd.service enabled snmp监控 数据抓取 保留
sshd.service enabled ssh登陆 保留
systemd-readahead-collect.service enabled 内核调用--预读取 保留
systemd-readahead-drop.service enabled ----------------------
systemd-readahead-replay.service enabled ----------------------
tuned.service enabled
default.target enabled 默认启动项 multi-user.target的软连接 保留
multi-user.target enabled 启动用户命令环境 保留
remote-fs.target enabled 集合远程文件挂载点 自定
runlevel2.target enabled 运行级别 用于兼容6的SysV 保留
runlevel3.target enabled ----------------------
runlevel4.target enabled ----------------------
关闭一下开机启动服务
systemctl disable abrt-ccpp.service
systemctl disable abrt-oops.service
systemctl disable abrt-vmcore.service
systemctl disable abrt-xorg.service
systemctl disable abrtd.service
systemctl disable accounts-daemon.service
systemctl disable atd.service
systemctl disable auditd.service
systemctl disable autovt@.service
systemctl disable avahi-daemon.service
systemctl disable bluetooth.service
systemctl disable cups.service
systemctl disable dbus-org.bluez.service
systemctl disable dbus-org.fedoraproject.FirewallD1.service
systemctl disable dbus-org.freedesktop.Avahi.service
systemctl disable dbus-org.freedesktop.ModemManager1.service
systemctl disable dbus-org.freedesktop.NetworkManager.service
systemctl disable dbus-org.freedesktop.nm-dispatcher.service
systemctl disable display-manager.service
systemctl disable dmraid-activation.service
systemctl disable firewalld.service
systemctl disable gdm.service
systemctl disable irqbalance.service
systemctl disable iscsi.service
systemctl disable ksm.service
systemctl disable ksmtuned.service
systemctl disable libstoragemgmt.service
systemctl disable libvirtd.service
systemctl disable lvm2-monitor.service
systemctl disable mcelog.service
systemctl disable mdmonitor.service
systemctl disable microcode.service
systemctl disable ModemManager.service
systemctl disable multipathd.service
systemctl disable NetworkManager-dispatcher.service
systemctl disable NetworkManager.service
systemctl disable postfix.service
systemctl disable qemu-guest-agent.service
systemctl disable rngd.service
systemctl disable rtkit-daemon.service
systemctl disable smartd.service
systemctl disable spice-vdagentd.service
systemctl disable systemd-readahead-collect.service
systemctl disable systemd-readahead-drop.service
systemctl disable systemd-readahead-replay.service
systemctl disable tuned.service
systemctl disable vgauthd.service
systemctl disable vmtoolsd.service
2.systemctl 用法:
显示服务状态:systemctl status docker.service
列出服务层级和依赖关系:systemctl list-dependencies docker.service
启动服务:systemctl start docker.service
关闭服务:systemctl stop docker.service
重启服务:systemctl restart docker.service
设置服务自启动:systemctl enable docker.service
禁止服务自启动:systemctl disable docker.service
查看服务是否自启动:systemctl is-enabled docker.service
列出系统所有服务的启动情况:systemctl list-units --type=service
列出所有自启动服务:systemctl list-unit-files|grep enabled
对应的旧指令(chkconfig、service)
显示服务状态:service docker status
列出服务层级和依赖关系:systemctl list-dependencies docker.service
启动服务:service docker start
关闭服务:service docker stop
重启服务:service docker restart
设置服务自启动:chkconfig --level 3 docker on
禁止服务自启动:chkconfig --level 3 docker off
查看服务是否自启动:chkconfig --list docker
列出系统所有服务的启动情况:chkconfig --list
centos 7 开机启动服务项优化的更多相关文章
- Ubuntu管理开机启动服务项 -- 图形界面的Boot-up Manager
有时学习时安装的服务太多,比如mysql.mongodb.redis.apache.nginx等等,它们都是默认开机启动的,如果不想让它们开机启动,用到时再自己手工启动怎么办呢? 使用sysv-rc- ...
- (转) CentOS 7添加开机启动服务/脚本
CentOS 7添加开机启动服务/脚本 原文:http://blog.csdn.net/wang123459/article/details/79063703 一.添加开机自启服务 在CentOS 7 ...
- centos 开机启动服务 systemctl
systemctl 实现开机自启服务 转载起一个好听的名字 最后发布于2018-06-26 13:49:06 阅读数 13473 收藏 展开 systemctl是RHEL 7 的服务管理工具中主要的 ...
- Redis加入Centos Linux开机启动
Redis加入Centos Linux开机启动 网上有很多redis在linux下自动启动的例子,实现的方式很多,很多都是参考一个老外流传出来启动的例子,其实直接使用是不行,而且有很多地方有一些语法错 ...
- (转)CentOS下开机启动查看管理命令:chkconfig用法
CentOS下开机启动查看管理命令:chkconfig用法 CentOS下开机启动查看管理的命令是:chkconfig 1. 开机启动列表查看: chkconfig --list 说明 ...
- Hortonworks HDP Sandbox定制(配置)开机启动服务(组件)
定制Hortonworks HDP开机启动服务能够这样做:本文原文出处: http://blog.csdn.net/bluishglc/article/details/42109253 严禁不论什么形 ...
- Centos 配置开机启动脚本启动 docker 容器
Centos 配置开机启动脚本启动 docker 容器 Intro 我们的 Centos 服务器上部署了好多个 docker 容器,因故重启的时候就会导致还得手动去手动重启这些 docker 容器,为 ...
- linux chkconfig添加开机启动服务
--add:增加所指定的系统服务,让chkconfig指令得以管理它,并同时在系统启动的叙述文件内增加相关数据: --del:删除所指定的系统服务,不再由chkconfig指令管理,并同时在系统启动的 ...
- centos 7 开机启动配置
centos 7 开机启动 1 开机启动配置文件位于/usr/lib/systemd/system/ 2 nginx的配置[Unit]Description=nginx - high performa ...
随机推荐
- NX二次开发-NXOpen读取工程图注释note1->GetText();
NX9+VS2012 #include <uf.h> #include <uf_drf.h> #include <NXOpen/Annotations_Note.hxx& ...
- Qt---QFtp上传、下载二进制文件
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFtp> #includ ...
- 转-vector与list的区别
转自:C++ vector和list的区别 数据结构的区别 vector vector与数组类似,拥有一段连续的内存空间,并且起始地址不变.便于随机访问,时间复杂度为O(1),但因为内存空间是连续的, ...
- java 读取mysql中数据 并取出
public static String url = null; public static String username = null; public static String password ...
- 2018北京网络赛 G The Mole /// 分块暴力 点线距离
题目大意: 给定n段线段 编号为1~n 接下来m个询问 给定一点 输出离该点最近的线段的最小编号(距离相等时取编号小的) 题解 大致就是 1.坐标范围为(0,2^16-1) 将坐标系划分为2^8*2^ ...
- 一个很SB的方法,来开始调一个刚启动就SB的程序
自己鼓捣的方法,累死我了... 遇到一个程序,这程序启动之后,会自动重新启动我的电脑, 我想调试它一下,但是遇到了问题, 如果我用调试器附加上去的话,电脑是不重起了,但是它启动了之后会立刻黑屏,全黑, ...
- java异常继承何类,运行时异常与一般异常的区别
一.基本概念 Throwable是所有异常的根,java.lang.ThrowableError是错误,java.lang.ErrorException是异常,java.lang.Exception ...
- VBA提取HTML文件信息
Sub test() Dim html As Object, D As Object, W As Object, arr() Set html = CreateObject("m ...
- exe4j 打包(多个jar打包)
一,自行下载exe4j 注册码: 用户名和公司名可随便填A-XVK258563F-1p4lv7mg7savA-XVK209982F-1y0i3h4ywx2h1A-XVK267351F-dpurrhny ...
- ASP.NET MVC easyUI-datagrid 的当前页合计and总合计
一.HTML代码 <table id="dg" class="easyui-datagrid" style="width: 100%; heig ...