windows 2012 R2 及 centos 7.X 禁用不必要服务
生活随笔
收集整理的這篇文章主要介紹了
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 Managerwindows 參考資料: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后的服務為依據禁用的。
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 禁用不必要服务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 大咖云集!畅谈人工智能应用创新方法论
- 下一篇: GEE笔记