CentOS系统环境精简优化详解
第一步、删除不必要的自带软件包
yum remove Deployment_Guide-en-US finger cups-libs cups ypbind
yum remove bluez-libs desktop-file-utils ppp rp-pppoe wireless-tools irda-utils
yum remove sendmail* samba* talk-server finger-server bind* xinetd
yum remove nfs-utils nfs-utils-lib rdate fetchmail eject ksh mkbootdisk mtools
yum remove syslinux tcsh startup-notification talk apmd rmt dump setserial portmap yp-tools
yum 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/config
SELINUX=disabled #禁用SeLinux
SELINUX=enforcing #使用SeLinux
第四步、禁止IPV6(执行后需要reboot重启)
vi /etc/modprobe.conf #打开文件,把下面两行加到最后
alias net-pf-10 off
alias ipv6 off
第五步、初始化防火墙
touch /etc/sysconfig/iptables
iptables -F
iptables -X
iptables -Z
service iptables save
service iptables restart
第六步、禁止无用服务
#! /bin/bash
service acpid off
service atd stop
service auditd stop
service avahi-daemon stop
service avahi-dnsconfd stop
service bluetooth stop
service conman stop
service cpuspeed stop
service cups stop
service dnsmasq stop
service dund stop
service firstboot stop
service hidd stop
service httpd stop
service ibmasm stop
service ip6tables stop
service irda stop
service kdump stop
service lm_sensors stop
service mcstrans stop
service messagebus stop
service microcode_ctl stop
service netconsole stop
service netfs stop
service netplugd stop
service nfs stop
service nfslock stop
service nscd stop
service ntpd stop
service oddjobd stop
service pand stop
service pcscd stop
service portmap stop
service psacct stop
service rdisc stop
service restorecond stop
service rpcgssd stop
service rpcidmapd stop
service rpcsvcgssd stop
service saslauthd stop
service sendmail stop
service setroubleshoot stop
service smb stop
service vncserver stop
service winbind stop
service wpa_supplicant stop
service xfs stop
service ypbind stop
service yum-updatesd stop
chkconfig acpid off
chkconfig atd off
chkconfig auditd off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig conman off
chkconfig cpuspeed off
chkconfig cups off
chkconfig dnsmasq off
chkconfig dund off
chkconfig firstboot off
chkconfig hidd off
chkconfig httpd off
chkconfig ibmasm off
chkconfig ip6tables off
chkconfig irda off
chkconfig kdump off
chkconfig lm_sensors off
chkconfig mcstrans off
chkconfig messagebus off
chkconfig microcode_ctl off
chkconfig netconsole off
chkconfig netfs off
chkconfig netplugd off
chkconfig nfs off
chkconfig nfslock off
chkconfig nscd off
chkconfig ntpd off
chkconfig oddjobd off
chkconfig pand off
chkconfig pcscd off
chkconfig portmap off
chkconfig psacct off
chkconfig rdisc off
chkconfig restorecond off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig saslauthd off
chkconfig sendmail off
chkconfig setroubleshoot off
chkconfig smb off
chkconfig vncserver off
chkconfig winbind off
chkconfig wpa_supplicant off
chkconfig xfs off
chkconfig ypbind off
chkconfig yum-updatesd off
这样通过上述6步骤,就可以完成对centos精简和优化。
相关文章
centos如何安装桌面环境?centos安装桌面环境的方法
默认最小化安装,或者因为需要,在安装系统的时候没有安装桌面组建,一些朋友不知道centos如何安装桌面环境?今天小编为大家带来了centos安装桌面环境的方法;有需要的朋友2016-12-16- 本文将为大家具体的介绍如何在CentOS系统下安装转PDF和SWF环境的方法,希望可以帮助的大家2016-11-28
- 有用户反映不知道如何在CentOS环境下添加环境变量,其实方法很简单的,下面小编就为大家介绍三种CentOS添加环境变量上网方法,希望可以帮助到大家2016-11-09
- 这篇文章主要介绍了CentOS 6.3下安装部署CHEF环境教程,Chef是由Ruby与Erlang写成的配置管理软件,它以一种纯Ruby的领域专用语言(DSL)保存系统配置“食谱(recipes)”或“做饭2014-09-10
- 这两天在整公司出问题的服务器,顺手记录了以下过程,供以后参考,也可以供大家学习参考2013-12-03
- 我们在使用Linux作为服务器的过程中,经常会对硬盘中分区如何更合理的分配而感觉疑惑,特别是刚开始接触Linux的朋友,对于服务器中硬盘空间各分区的合理分配,心中也没有底2013-06-07
- 今天小编为大家带来的是CentOS5.x系统内核优化详解;希望对大家会有帮助,有需要的朋友一起去看看吧2017-01-08
- 今天小编为大家带来的是CentOS6.X 优化字符集详解,希望会对大家带来帮助,有需要的朋友一起去看看吧2016-12-21
- 今天小编为大家带来的是Centos内存使用与优化技巧;希望对大家学习Centos会有帮助;有需要的朋友可以过来看看2016-12-07
- 很多朋友对CentOS系统基础优化不太了解,下面小编为大家带来了关于CentOS系统基础优化知识汇总;希望对大家会有帮助2016-11-01


最新评论