6步骤实现CentOS系统环境精简优化
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

随着VPS主机使用的深化,蜗牛从开始使用面板工具操作VPS,再到后来的一键安装包,现在基本上能自学自用VPS管理网站/备份网站维护。但是需要深入的运维还需要时日,比如刚才看到一篇CentOS系统环境精简优化的文章还是值得分享的。但是在操作之前,最好建议在我们安装系统之后操作,而不要在有网站运行之后操作,以免系统出现问题。
第一步、删除不必要的自带软件包
yum remove Deployment_Guide-en-US finger cups-libs cups ypbindyum remove bluez-libs desktop-file-utils ppp rp-pppoe wireless-tools irda-utilsyum remove sendmail* samba* talk-server finger-server bind* xinetdyum remove nfs-utils nfs-utils-lib rdate fetchmail eject ksh mkbootdisk mtoolsyum remove syslinux tcsh startup-notification talk apmd rmt dump setserial portmap yp-toolsyum groupremove \\\"Mail Server\\\" \\\"Games and Entertainment\\\" \\\"X Window System\\\" \\\"X Software Development\\\"yum groupremove \\\"Development Libraries\\\" \\\"Dialup Networking Support\\\"yum groupremove \\\"Games and Entertainment\\\" \\\"Sound and Video\\\" \\\"Graphics\\\" \\\"Editors\\\"yum groupremove \\\"Text-based Internet\\\" \\\"GNOME Desktop Environment\\\" \\\"GNOME Software Development\\\"第二步、升级centos系统
yum update #更新系统yum clean all #清理全部缓存文件第三步、禁用seLinux
sestatus #先执行看seLinux状态,如果不是disabled,就需要执行下面步骤,否则不要执行vi /etc/selinux/configSELINUX=disabled #禁用SeLinuxSELINUX=enforcing #使用SeLinux第四步、禁止IPV6(执行后需要reboot重启)
vi /etc/modprobe.conf #打开文件,把下面两行加到最后alias net-pf-10 offalias ipv6 off第五步、初始化防火墙
touch /etc/sysconfig/iptablesiptables -Fiptables -Xiptables -Zservice iptables saveservice iptables restart第六步、禁止无用服务
#! /bin/bashservice acpid offservice atd stopservice auditd stopservice avahi-daemon stopservice avahi-dnsconfd stopservice bluetooth stopservice conman stopservice cpuspeed stopservice cups stopservice dnsmasq stopservice dund stopservice firstboot stopservice hidd stopservice httpd stopservice ibmasm stopservice ip6tables stopservice irda stopservice kdump stopservice lm_sensors stopservice mcstrans stopservice messagebus stopservice microcode_ctl stopservice netconsole stopservice netfs stopservice netplugd stopservice nfs stopservice nfslock stopservice nscd stopservice ntpd stopservice oddjobd stopservice pand stopservice pcscd stopservice portmap stopservice psacct stopservice rdisc stopservice restorecond stopservice rpcgssd stopservice rpcidmapd stopservice rpcsvcgssd stopservice saslauthd stopservice sendmail stopservice setroubleshoot stopservice smb stopservice vncserver stopservice winbind stopservice wpa_supplicant stopservice xfs stopservice ypbind stopservice yum-updatesd stopchkconfig acpid offchkconfig atd offchkconfig auditd offchkconfig avahi-daemon offchkconfig avahi-dnsconfd offchkconfig bluetooth offchkconfig conman offchkconfig cpuspeed offchkconfig cups offchkconfig dnsmasq offchkconfig dund offchkconfig firstboot offchkconfig hidd offchkconfig httpd offchkconfig ibmasm offchkconfig ip6tables offchkconfig irda offchkconfig kdump offchkconfig lm_sensors offchkconfig mcstrans offchkconfig messagebus offchkconfig microcode_ctl offchkconfig netconsole offchkconfig netfs offchkconfig netplugd offchkconfig nfs offchkconfig nfslock offchkconfig nscd offchkconfig ntpd offchkconfig oddjobd offchkconfig pand offchkconfig pcscd offchkconfig portmap offchkconfig psacct offchkconfig rdisc offchkconfig restorecond offchkconfig rpcgssd offchkconfig rpcidmapd offchkconfig rpcsvcgssd offchkconfig saslauthd offchkconfig sendmail offchkconfig setroubleshoot offchkconfig smb offchkconfig vncserver offchkconfig winbind offchkconfig wpa_supplicant offchkconfig xfs offchkconfig ypbind offchkconfig yum-updatesd off这样通过上述6步骤,就可以完成对centos精简和优化。
猜你可能想看的VPS
- 一颗红心上面有一个患字是什么成语?全球[VPS测评]
- VPS 零元购 酷番云:1 核 1G 60G 硬盘 2M 带宽 内蒙机房全球[VPS测评]
- 便宜 iON 双旦促销→洛杉矶 CN2 GT 线路 VPS 六折优惠 年全球[VPS测评]
- 双十二 raksmart→I3 独服仅$46 月 10G 口 不限买 1全球[VPS测评]
- 便宜 $4.99 月 1 核 CPU 256M 内存 15G SSD 3全球[VPS测评]
- 日本服务器 $99.5 首月 E3-1270 16GB 800GB ss日本VPS[主机]
- 云创网络→55.2 元 月 512MB 内存 10GB SSD 空间 1虚拟空间(主机)
- bootstrapTable 设置行样式(背景颜色)全球[VPS测评]
- 限时抢购 $35 年 2 核 CPU 3G 内存 40G 硬盘 5T 流全球[VPS测评]
- 滴盾双十二东莞BGP独立服务器16核32G内存500G流量G口50m带宽独立服务器[U]
- Redis、Opcache对WordPress实现内存级缓冲优化全球[VPS测评]
- whloud-鲸云数据 江西cn2 30Mbps月流量300GB 国庆特全球[VPS测评]
- idc.wiki 1核心 1G内存 15G SSD 300G上行流量 1全球[VPS测评]
- 菜单选中标记CSS3动画效果全球[VPS测评]
- 向日葵-漏洞科普:海外云服务器三种漏洞修复方法快收藏起来!全球[VPS测评]
- 跨境电商有哪些平台?十大跨境电商平台!全球[VPS测评]
- WordPress去掉分类链接中category目录的两种方法全球[VPS测评]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- 7月份,经济复苏边际趋缓,央行降息幅度先稳后升全球[VPS测评]
- 轻云互联,香港美国vps终身8.8折17元/月起,cn2直连线路,50G美国VPS[主机]
- 如何更改WHMCS默认后台路径让WHMCS系统更安全全球[VPS测评]
- 魔方云cubecloud:香港CN2VPS/美国CN2VPS终身88折/美国VPS[主机]
- 快速云:云服务器vps的区别是什么云服务器和vps哪个比较好2022-0全球[VPS测评]
- 快速云:科普云服务器服务器的概念和作用2022-08-2313:26来源全球[VPS测评]
- 常见的CN2,GIA,CIA 各个网络线路解释全球[VPS测评]
- 海量科技:香港2核2G云服务器,5M独享带宽,低至168元/月香港VPS[主机]
- 宝塔面板怎么放行端口?宝塔面板放行端口的方法全球[VPS测评]
- 尊云服务器年末钜惠活动:4核8G5M云服务器仅99元/月,1188元/年全球[VPS测评]
- 搬瓦工VPS:高端线路助力企业运营,10Gbps美国 cn2 gia,1日本VPS[主机]
- 关键路径、资金情况、政策关键数据中心的可持续发展路径在哪里?全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-143758.html











