6步驟實現CentOS系統內容精簡最佳化

來源:互聯網
上載者:User

標籤:

6步驟實現CentOS系統內容精簡最佳化
發布時間:2014-11-03 14:59:27   編輯:AHLinux.com
第一步、刪除不必要的內建軟體包yum remove Deployment_Guide-en-US finger cups-libs cups ypbindyum remove bluez-libs desktop 

第一步、刪除不必要的內建軟體包

perl">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精簡和最佳化。

  • 本文來自:愛好Linux技術網
  • 本文連結:http://www.ahlinux.com/centos/6849.html

6步驟實現CentOS系統內容精簡最佳化

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.