CentOS系统安装完成后环境精简优化

逆流成河 阅读:74 2023-06-17 16:40:05 评论:0
提示:在操作这些步骤最好是在我们刚重装系统,而不是在已经运行网站中优化机器,以免出现机器问题。 删除不必要的自带软件包
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
标签:centos精简
声明

本站网络名称: 配主机

本站永久网址: www.peizhuji.com

网站侵权说明: 本站采用 CC BY-NC-SA 4.0 国际许可协议 进行许可,转载或引用本站文章应遵循相同协议。

1. 本站为转载分享站点,不提供任何上传下载服务。

所有内容均来自互联网第三方分享站点所提供的公开引用内容。

不需要任何付费即可公开阅读,部分GG仅为作为服务器维护费用。

2. 本站提供的一切软件、教程和内容信息仅限用于学习和研究目的;

不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。

3. 本站信息来自网络收集整理,版权争议与本站无关。

您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。

4. 如果您喜欢该程序和内容,请支持正版,购买注册,得到更好的正版服务。

我们非常重视版权问题,如有侵权请邮件与我们联系处理。

敬请谅解!我们会在24h内删除有争议的资源。唯一站长邮箱:1103606138@qq.com

发表评论
搜索

            小站宗旨:

不沾诡计,不为利欲熏心。

千种思量,具在体验。

万般思虑,皆为用户。

有所为有所不为,终能拨云见日。

所有资源Win10亲测运行后发布!


资源列表2.jpg

电脑DIY装机大师在线指导

2024年主流游戏设计笔记本型号

站内导航

188元开通百度网盘SVIP年度超级会员

淘宝天猫拼多多优惠券

京东商城优惠券限时领取


今日大家都在搜的词: