只要6步骤就可以让你的CentOS系统环境更加精简优化

SEO探索者团队 SEO服务&网站优化

你是不是有时感觉装的CentOS系统太过复杂,想精简优化一下?只要简单的6个步骤,就可以精简优化你的CentOS系统环境.

第一步、删除不必要的自带软件包

  1. yumremoveDeployment_Guide-en-USfingercups-libscupsypbindyumremovebluez-libsdesktop-file-utilsppprp-pppoewireless-toolsirda-utilsyumremovesendmail*samba*talk-serverfinger-serverbind*xinetdyumremovenfs-utilsnfs-utils-librdatefetchmailejectkshmkbootdiskmtoolsyumremovesyslinuxtcshstartup-notificationtalkapmdrmtdumpsetserialportmapyp-toolsyumgroupremove"MailServer""GamesandEntertainment""XWindowSystem""XSoftwareDevelopment"yumgroupremove"DevelopmentLibraries""DialupNetworkingSupport"yumgroupremove"GamesandEntertainment""SoundandVideo""Graphics""Editors"yumgroupremove"Text-basedInternet""GNOMEDesktopEnvironment""GNOMESoftwareDevelopment"

第二步、升级centos系统

yum update #更新系统 yum clean all #清理全部缓存文件

第三步、禁用seLinux

sestatus #先执行看seLinux状态,如果不是disabled,就需要执行下面步骤,否则不要执行 vi /etc/selinux/config SELINUX=disabled #禁用SeLinux SELINUX=enforcing #使用SeLinux

第四步、禁止IPV6(执行后需要reboot重启)

  1. vi/etc/modprobe.conf#打开文件,把下面两行加到最后aliasnet-pf-10offaliasipv6off

第五步、初始化防火墙

  1. touch/etc/sysconfig/iptablesiptables-Fiptables-Xiptables-Zserviceiptablessaveserviceiptablesrestart

第六步、禁止无用服务

  1. #!/bin/bashserviceacpidoffserviceatdstopserviceauditdstopserviceavahi-daemonstopserviceavahi-dnsconfdstopservicebluetoothstopserviceconmanstopservicecpuspeedstopservicecupsstopservicednsmasqstopservicedundstopservicefirstbootstopservicehiddstopservicehttpdstopserviceibmasmstopserviceip6tablesstopserviceirdastopservicekdumpstopservicelm_sensorsstopservicemcstransstopservicemessagebusstopservicemicrocode_ctlstopservicenetconsolestopservicenetfsstopservicenetplugdstopservicenfsstopservicenfslockstopservicenscdstopservicentpdstopserviceoddjobdstopservicepandstopservicepcscdstopserviceportmapstopservicepsacctstopservicerdiscstopservicerestorecondstopservicerpcgssdstopservicerpcidmapdstopservicerpcsvcgssdstopservicesaslauthdstopservicesendmailstopservicesetroubleshootstopservicesmbstopservicevncserverstopservicewinbindstopservicewpa_supplicantstopservicexfsstopserviceypbindstopserviceyum-updatesdstopchkconfigacpidoffchkconfigatdoffchkconfigauditdoffchkconfigavahi-daemonoffchkconfigavahi-dnsconfdoffchkconfigbluetoothoffchkconfigconmanoffchkconfigcpuspeedoffchkconfigcupsoffchkconfigdnsmasqoffchkconfigdundoffchkconfigfirstbootoffchkconfighiddoffchkconfighttpdoffchkconfigibmasmoffchkconfigip6tablesoffchkconfigirdaoffchkconfigkdumpoffchkconfiglm_sensorsoffchkconfigmcstransoffchkconfigmessagebusoffchkconfigmicrocode_ctloffchkconfignetconsoleoffchkconfignetfsoffchkconfignetplugdoffchkconfignfsoffchkconfignfslockoffchkconfignscdoffchkconfigntpdoffchkconfigoddjobdoffchkconfigpandoffchkconfigpcscdoffchkconfigportmapoffchkconfigpsacctoffchkconfigrdiscoffchkconfigrestorecondoffchkconfigrpcgssdoffchkconfigrpcidmapdoffchkconfigrpcsvcgssdoffchkconfigsaslauthdoffchkconfigsendmailoffchkconfigsetroubleshootoffchkconfigsmboffchkconfigvncserveroffchkconfigwinbindoffchkconfigwpa_supplicantoffchkconfigxfsoffchkconfigypbindoffchkconfigyum-updatesdoff--phpfensi.com

这样通过上述6步骤,就可以完成对centos精简和优化.

相关广告
  • 只要6步骤就可以让你的CentOS系统环境更加精简优化 只要6步骤就可以让你的CentOS系统环境更加精简优化 只要6步骤就可以让你的CentOS系统环境更加精简优化
相关阅读

只要6步骤就可以让你的CentOS系统环境更加精简优化

2019/10/10 17:46:12 | 谷歌SEO算法 | 微信公众号