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/bashSVCS="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

转载于:https://www.cnblogs.com/seasonzone/p/11288088.html

windows 2012 R2 及 centos 7.X 禁用不必要服务相关推荐

  1. Windows 2012 R2 搭建域控制器及win7加入域服务

    1.设置服务器 在虚拟机中安装Windows 2012 R2操作系统,设置ip.子网掩码.DNS(指向2012操作系统) 2.更改计算机名(修改完后需要重启才能显示) 3.安装域控制器与DNS服务器 ...

  2. Windows 2012 R2 中 AD DS 部署

    提示:部署AD DS(Active Directory Domain Service)过程中,林,域或终端所有操作系统,建议不要采用GHOST.虚拟机克隆模式等相同复制操作,会产生SID相同的可能概率 ...

  3. Windows 2012 R2 如何设置同时多点远程系统或3人以上同时登录系统

    Windows 2012 R2设置同一用户同时多点远程系统: Windows Server 2012R2 系统,在多人登录的情况下,默认第二个人或把第一个人踢掉,为了便于使用,将系统设置成可以多人同时 ...

  4. [教程]在Windows 2012 R2上安装Intel I217-V/I218-V网卡驱动

    [教程]在Windows 2012 R2上安装Intel I217-V/I218-V网卡驱动 由于Intel坑爹的在Server版不支持I217-V/I218-V网卡,研究了一番,终于把驱动装上咯.网 ...

  5. [转载]Windows 2012 R2安装SharePoint 2013 手动安装工具软件

    之前介绍过在window 2012中安装SharePoint 2013,这次,借着SharePoint 2013 sp1补丁发布之际,介绍下在window 2012 r2中安装SharePoint 2 ...

  6. Windows 2012 R2服务器的80端口被IIS占用的最好处理办法

    一:买了一个阿里云Windows 2012 R2服务器,因为80端口号默认被IIS使用,导致我们部署的web项目不起作用,外面的网络不能访问,这个问题我翻遍了很多博客,有很多博客都说:在防火墙里面新建 ...

  7. WAMP and WordPress Install on AWS Free Tier Windows 2012 R2

    AWS provides a 750 hours free tier on Windows machine. I am always wondering how to install wordpres ...

  8. 华为服务器安装Windows 2012 R2/Windows 2016操作系统指导书(Purley平台)

    华为服务器安装Windows 2012 R2/Windows 2016操作系统指导书(Purley平台) 华为2288H V5 安装Windows2012R2步骤详解 这款服务器支持多种方式安装操作系 ...

  9. 宝塔面板 Windows 2012 R2 使用指南(在更新中)

    第一次使用Windows系统服务器 1.安装宝塔Windows面板 For 2012 R2镜像. 从镜像市场选择 输入宝塔Windows面板 For 2012 R2进行选择,点击使用. 设置密码 2. ...

最新文章

  1. 20140725 快速排序时间复杂度 sTL入门
  2. 【ACM】奇怪的回文数
  3. 用JS的正则表达式如何判断输入框内为中文或者是英文
  4. mvn本地生成jar包放在mvn项目依赖(将jar包传到本地仓库)
  5. python 余弦距离_距离公式汇总以及Python实现
  6. 移动端python开发_python前端之移动端库、框架及自动化和优化
  7. 一文秒懂!Python字符串格式化之format方法详解
  8. 对于Python继承问题全解析 - 51CTO.COM
  9. Struts2中过滤器和拦截器的区别
  10. linux虚拟机rzsz安装(wget方法,自测可用)
  11. h5的table表格边框线问题解决方案
  12. am信号包络检波matlab,高频课程设计AM信号包络检波器
  13. 海康摄像头忘记密码,自己如何快速重置密码
  14. 身份证识别技术方案介绍
  15. 考研题目 第二章线性表
  16. 《 2021大学生就业分析报告 》
  17. 想提高跨境电商转化率?采用这几个技巧!
  18. php mysql echarts动态生成图表
  19. MindSpore论坛十月有奖活动
  20. 用了 TCP 协议,就一定不会丢包吗?

热门文章

  1. linux线程堆栈溢出检测,GCC栈溢出检测技术
  2. 为什么我加了过滤器然后就登不进去了_禁止装前置过滤器?很多业主为此与物业起争执,后才明白错怪物业...
  3. 为什么996成为中国程序员永远的痛?
  4. STM32学习开发记录:W25Q16(FLASH)——SPI
  5. 阿里联合UC推出移动搜索“神马”
  6. 牛客月赛 44 补题题解
  7. 索尼相机A卡格式化MP4视频的数据恢复案例
  8. AJAX框架衣柜设计师,9张衣柜设计,设计师真的是那么不堪吗?
  9. ubuntu的root密码设置方法
  10. 素数的随机生成:Lagrange素数定理