windows 2012 R2 及 centos 7.X 禁用不必要服务
8.windows 2012 R2 及 centos 7.X 禁用不必要服务
React VR 技术开发群 579149907
1.windows2012 R2 可以禁用以下不必要的服务,以下禁用的服务是以win2012R2 core安装完后的服务为依据禁用的。
1.1禁用服务,此操作有一定的风险,可能会导致系统不稳定,所以先做好快照,以方便恢复。确定哪些服务处理运行状态,然后再禁用,再进行测试,以确定产品应用能够运行, 禁用服务可以使用窗口界面进行操作,也可以cmd命令行模式执行下面的命令进行:
sc.exe stop Browser #Computer Browser
sc.exe config Browser start=disabled #Computer Browser
sc.exe stop BITS #Background Intelligent Transfer Service
sc.exe config BITS start=disabled #Background Intelligent Transfer Service
sc.exe stop CertPropSvc #Certificate Propagation
sc.exe config CertPropSvc start=disabled #Certificate Propagation
sc.exe stop Spooler #Print Spooler
sc.exe config Spooler start=disabled #Print Spooler
sc.exe stop ShellHWDetection #Shell Hardware Detection
sc.exe config ShellHWDetection start=disabled #Shell Hardware Detection
sc.exe stop wuauserv #Windows Update
sc.exe config wuauserv start=disabled #Windows Update
sc.exe stop CryptSvc #Cryptographic Services
sc.exe config CryptSvc start=disabled #Cryptographic Services
sc.exe stop W32Time #Windows Time
sc.exe config W32Time start=disabled #Windows Time
sc.exe stop wmiApSrv #WMI Performance Adapters
sc.exe config wmiApSrv start=disabled #WMI Performance Adapters
sc.exe stop dot3svc #Wired AutoConfig
sc.exe config dot3svc start=disabled #Wired AutoConfig
sc.exe stop Themes #Themes
sc.exe config Themes start=disabled #Themes
sc.exe stop iphlpsvc #IPV6
sc.exe config iphlpsvc start=disabled #IPV6
sc.exe stop FontCache #FontCache
sc.exe config FontCache start=disabled #FontCache
sc.exe stop ScDeviceEnum #Smart Card Device Enumeration Service
sc.exe config ScDeviceEnum start=disabled #Smart Card Device Enumeration Service
sc.exe stop Appinfo #Application Information
sc.exe config Appinfo start= disabled #Application Information
sc.exe stop COMSysApp #COM+ System Application
sc.exe config COMSysApp start= disabled #COM+ System Application
sc.exe stop IKEEXT #IKE and AuthIP IPsec Keying Modules
sc.exe config IKEEXT start= disabled #IKE and AuthIP IPsec Keying Modules
sc.exe stop TrkWks #Distributed Link Tracking Client
sc.exe config TrkWks start= disabled #Distributed Link Tracking Client
sc.exe stop VGAuthService #VMware Alias Manager and Ticket Service
sc.exe config VGAuthService start= disabled #VMware Alias Manager and Ticket Service
sc.exe stop VMTools #VMware Tools
sc.exe config VMTools start= disabled #VMware Tools
sc.exe stop Wcmsvc #Windows Connection Manager
sc.exe config Wcmsvc start= disabled #Windows Connection Manager
windows 参考资料:https://www.ibm.com/support/knowledgecenter/en/SSCR9A_2.2.1/doc/iwd/pct_tuning_windows2012.html
https://www.marksanborn.net/howto/turn-off-unnecessary-windows-services/
- 1
win2012禁用脚本
@echo on
sc.exe stop Browser
sc.exe config Browser start= disabled
sc.exe stop BITS
sc.exe config BITS start= disabled
sc.exe stop CertPropSvc
sc.exe config CertPropSvc start= disabled
sc.exe stop Spooler
sc.exe config Spooler start= disabled
sc.exe stop ShellHWDetection
sc.exe config ShellHWDetection start= disabled
sc.exe stop wuauserv
sc.exe config wuauserv start= disabled
sc.exe stop W32Time
sc.exe config W32Time start= disabled
sc.exe stop wmiApSrv
sc.exe config wmiApSrv start= disabled
sc.exe stop dot3svc
sc.exe config dot3svc start= disabled
sc.exe stop Themes
sc.exe config Themes start= disabled
sc.exe stop iphlpsvc
sc.exe config iphlpsvc start= disabled
sc.exe stop FontCache
sc.exe config FontCache start= disabled
sc.exe stop ScDeviceEnum
sc.exe config ScDeviceEnum start= disabled
sc.exe stop Appinfo
sc.exe config Appinfo start= disabled
sc.exe stop COMSysApp
sc.exe config COMSysApp start= disabled
sc.exe stop IKEEXT
sc.exe config IKEEXT start= disabled
sc.exe stop TrkWks
sc.exe config TrkWks start= disabled
sc.exe stop VGAuthService
sc.exe config VGAuthService start= disabled
sc.exe stop VMTools
sc.exe config VMTools start= disabled
sc.exe stop Wcmsvc
sc.exe config Wcmsvc start= disabled
下载脚本:win2012.bat
2. centos 7 可以禁用以下可选不必要的服务,所禁用的服务是以centos 7.2 minimal 安装完db center后的服务为依据禁用的。
systemctl set-default multi-user.target #character interface
systemctl stop bluetooth #Network File System
systemctl disable bluetooth #Network File System
systemctl stop wpa_supplicant #WiFi Driver
systemctl disable wpa_supplicant #WiFi Driver
systemctl stop nfslock #Network File System
systemctl disable nfslock #Network File System
systemctl stop alsa-state #Soundcard driver
systemctl disable alsa-state #Soundcard driver
systemctl stop cups #printer
systemctl disable cups #printer
systemctl stop abrt-xorg #Automatic Bug Reporting Tool
systemctl disable abrt-xorg #Automatic Bug Reporting Tool
systemctl stop abrt-oops #Automatic Bug Reporting Tool
systemctl disable abrt-oops #Automatic Bug Reporting Tool
systemctl stop avahi-daemon #Zeroconf Zero configuration networking
systemctl disable avahi-daemon #Zeroconf Zero configuration networking
systemctl stop atd #Scheduling Tasks
systemctl disable atd #Scheduling Tasks
systemctl stop abrtd #automated bug reporting tool's daemon
systemctl disable abrtd #automated bug reporting tool's daemon
systemctl stop packagekit #suite of software applications for updates
systemctl disable packagekit #suite of software applications for updates
systemctl stop libstoragemgmt #storage array management
systemctl disable libstoragemgmt #storage array management
systemctl stop NetworkManager #Network Manager
systemctl disable NetworkManager #Network Manager
systemctl stop vmtoolsd #vmtoolsd
systemctl disable vmtoolsd #vmtoolsd
systemctl stop upower #upower
systemctl disable upower #upower
systemctl stop udisks2 #udisks2
systemctl disable udisks2 #udisks2
systemctl stop smartd #smartd
systemctl disable smartd #smartd
systemctl stop smartd #rtkit-daemon
systemctl disable smartd #rtkit-daemon
systemctl stop packagekit #PackageKit Daemon
systemctl disable packagekit #PackageKit Daemon
systemctl stop ModemManager #Modem Manager
systemctl disable ModemManager #Modem Manager
systemctl stop libvirtd #Virtualization daemon
systemctl disable libvirtd #Virtualization daemon
systemctl stop gssproxy #GSSAPI Proxy Daemon
systemctl disable gssproxy #GSSAPI Proxy Daemon
systemctl stop gdm #GNOME Display Manager
systemctl disable gdm #GNOME Display Manager
systemctl stop colord #Manage, Install and Generate Color Profiles
systemctl disable colord #Manage, Install and Generate Color Profiles
systemctl stop chronyd #NTP client/server
systemctl disable chronyd #NTP client/server
systemctl stop accounts-daemon #Accounts Service
systemctl disable accounts-daemon #Accounts Service
centos7禁用脚本:
!/bin/bash
SVCS="wpa_supplicant alsa-state cups abrt-xorg abrt-oops avahi-daemon atd abrtd packagekit getty@tty1 libstoragemgmt NetworkManager vmtoolsd upower udisks2 smartd rtkit-daemon packagekit ModemManager libvirtd gssproxy gdm colord chronyd accounts-daemon"
function disablesvc()
{
# echo "Stoping/Disablingservice $SVC"
if systemctl -t service |grep runn |grep $SVC; then systemctl stop $SVC ; fi
if systemctl list-unit-files --type service |grep enabled |grep $SVC; then systemctl disable $SVC; fi
}
LINUXVER=$(cat /etc/*release |tail -n 1 |awk '{ print $(NF - 1) }')
LINUXVER_MINOR=$(echo $LINUXVER |awk -F"." '{ print $NF}' )
LINUXVER=$(echo $LINUXVER |awk -F"." '{ print $1}' )
if [ $LINUXVER -eq 7 ]; then
for SVC in $SVCS
do
disablesvc $SVC
done
else
echo "Only works for Linux CentOS/RedHat 7"
fi
echo -e "\nDONE"
下载脚本:centos7.sh
参考资料:http://felipeferreira.net/index.php/2017/01/centos-7-disable-useless-services/
systemctl stop
https://blog.csdn.net/glossary95/article/details/78027799
windows 2012 R2 及 centos 7.X 禁用不必要服务的更多相关文章
- windows 2012 r2下安装sharepoint 2013错误解决
日前,我在安装sharepoint 2013时,需要预部署一些软件,我们知道运行产品准备工具“prerequisiteinstaller”后就可以自动下载安装配置这些软件,但是使用系统为windows ...
- [转载]Windows 2012 R2安装SharePoint 2013 手动安装工具软件
之前介绍过在window 2012中安装SharePoint 2013,这次,借着SharePoint 2013 sp1补丁发布之际,介绍下在window 2012 r2中安装SharePoint 2 ...
- Windows 2012 R2中安装SharePoint 2013 sp1参考
之前介绍过在window 2012中安装SharePoint 2013,这次,借着SharePoint 2013 sp1补丁发布之际,介绍下在window 2012 r2中安装SharePoint 2 ...
- windows 2012 r2企业版没有界面
windows 2012 R2系统进去以后只有CMD命令窗口,没有图形化界面,除了cmd其余的全部是黑的.在网上搜了很多,都是大同小异的解决方法,但根本解决不了.今天再这里分享的这个方法很简单,不用重 ...
- Windows 2012 R2版本下部署IIS网站
Windows 2012 R2是一个比较稳定的服务器版本,本文分享一篇在Windows 2012 R2版本下搭建IIS项目的操作流程. 1. 安装IIS Web服务器 打开远程桌面->控制面板- ...
- windows 2012 r2如何开启远程桌面
windows 2012 r2如何开启远程桌面 编写人:左丘文 2019-7-6 Windows 2012安装完成后需要开启远程桌面才可以远程连接,网上搜索了一下,有以下几个解决办法,虽说最后还是自己 ...
- Windows 2012 R2上搭建IIS管理用户的隔离模式FTP
Windows 2012 R2上搭建IIS管理用户的隔离模式FTP Windows自带的FTP现在可以提供基于非OS用户的管理,这提高了安全性.即使FTP用户名和密码泄露,也不会对操作系统造成进一步的 ...
- 在Windows 2012 R2上安装vcenter 5.5
在Windows 2012 R2上安装vCenter 5.5做个实验,发现安装的时候卡在Install Directory service了. 重启后,再装也一样. 上网查了一下,说是要装好ADLDS ...
- Windows 2012 R2 iSCSI server
Windows 2012 R2可以充当一台简单的SAN,提供iSCSI方式的连接,供客户端使用.不确定是否有人会这么使用,但至少在做实验的时候我觉得挺方便的.不用再像以前专门安装windows ...
随机推荐
- SPOJ 694 || 705 Distinct Substrings ( 后缀数组 && 不同子串的个数 )
题意 : 对于给出的串,输出其不同长度的子串的种类数 分析 : 有一个事实就是每一个子串必定是某一个后缀的前缀,换句话说就是每一个后缀的的每一个前缀都代表着一个子串,那么如何在这么多子串or后缀的前缀 ...
- [USACO17JAN]Promotion Counting 题解
前言 巨佬说:要有线段树,结果蒟蒻打了一棵树状数组... 想想啊,奶牛都开公司当老板了,我还在这里码代码,太失败了. 话说奶牛开个公司老板不应该是FarmerJohn吗? 题解 刚看到这道题的时候竟然 ...
- 解决报错:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized
Cannot create PoolableConnectionFactory (The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized . ...
- 170929-关于md5加密
在各种应用系统中,如果需要设置账户,那么就会涉及到储存用户账户信息的问题,为了保证所储存账户信息的安全,通常会采用MD5加密的方式来,进行储存.首先,简单得介绍一下,什么是MD5加密. MD5的全称是 ...
- Vue包的下载
第一步:先去官网下载Vue包:https://cn.vuejs.org/,找到教程. 第二步:Vue的包有以下引入方式(点击之后,跳转页面,直接将代码复制下来,放到新文件中,另存为即可使用Vue.js ...
- mysql5.6.36 源码安装过程
参考:http://www.linuxidc.com/Linux/2015-06/119354.htm cmake编译时,提示错误 CMake Error: The source directory ...
- OKHttp3 简介与使用
一.简介 Android系统提供了两种HTTP通信类:HttpURLConnection和HttpClient,前者对比后者十分难用. 网络请求进化:HttpURLConnection --- Apa ...
- AppStore IPv6-only 解决--看我就够了
自2016年6月1日起,苹果要求所有提交App Store的iOS应用必须支持IPv6-only环境,背景也是众所周知的,IPv4地址已基本分配完毕,同时IPv6比IPv4也更加高效,向IPv6过渡是 ...
- mysql_存储引擎层-innodb buffer pool
buffer pool 是innodb存储引擎带的一个缓存池,查询数据时,首先从内存中查询 数据如果内存中存在的话直接返回. innodb buffer pool 和 qcache 的区别:Qcach ...
- python2.7+appium第一个脚本(使用夜神模拟器)
搭建好环境后,可以开始准备脚本的编写工作 目录 1.安装夜神模拟器 2.使用uiautomatorviewer定位 3.运行第一个脚本 1.安装夜神模拟器 第一步:官网下载夜神模拟器,完成安装 双击下 ...