Centos6.6系統基礎最佳化

來源:互聯網
上載者:User

Centos6.6系統基礎最佳化
網路設定:setup設定網路vi/etc/sysconfig/netwrok-scripts/ifcfg-eth0刪除HWADDR和UUID行dns:/etc/resolv.conflinux版本,核心查看cat/etc/redhat-releaseuname-runame-mSELINUX[root@lufengcentos~]#sed-i's/SELINUX=enforcing/SELINUX=disabled/'/etc/selinux/config[root@lufengcentos~]#setenforce0[root@lufengcentos~]#getenforce開機自啟動[root@lufengcentos~]#foroldboyin`chkconfig--list|grep3:on|awk'{print$1}'`;dochkconfig--level3$oldboyoff;done[root@lufengcentos~]#foroldboyincrondnetworkrsyslogsshdsysstat;dochkconfig--level3$oldboyon;done[root@lufengcentos~]#chkconfig--list|grep3:on防火牆[root@lufengcentos~]#/etc/init.d/iptablesstopiptables:SettingchainstopolicyACCEPT:filter[OK]iptables:Flushingfirewallrules:[OK]iptables:Unloadingmodules:[OK]中文字元[root@lufengcentos~]#cat/etc/sysconfig/i18nLANG="en_US.UTF-8"SYSFONT="latarcyrheb-sun16"[root@lufengcentos~]#cp/etc/sysconfig/i18n/etc/sysconfig/i18n.ori[root@lufengcentos~]#echo'LANG="zh_CN.UTF-8"'>/etc/sysconfig/i18n[root@lufengcentos~]#source/etc/sysconfig/i18n[root@lufengcentos~]#echo$LANG時間同步[root@lufengcentos~]#echo'#timesyncbylufeng@2017-3-14'>>/var/spool/cron/root[root@lufengcentos~]#echo'*/5****/usr/sbin/ntpdatetime.nist.gov'>/dev/null2>&1>>/var/spool/cron/root[root@lufengcentos~]#crontab-l#timesyncbylufeng@2017-3-14*/5****/usr/sbin/ntpdatetime.nist.gov檔案描述符設定[root@lufengcentos~]#ulimit-n1024[root@lufengcentos~]#vim/etc/security/limits.conf*-nofile65535核心最佳化[root@lufengcentos~]#vi/etc/sysctl.confnet.ipv4.tcp_syn_retries=1net.ipv4.tcp_synack_retries=1net.ipv4.tcp_keepalive_time=600net.ipv4.tcp_keepalive_probes=3net.ipv4.tcp_keepalive_intvl=15net.ipv4.tcp_retries2=5net.ipv4.tcp_fin_timeout=2net.ipv4.tcp_max_tw_buckets=36000net.ipv4.tcp_tw_recycle=1net.ipv4.tcp_tw_reuse=1net.ipv4.tcp_max_orphans=32768net.ipv4.tcp_syncookies=1net.ipv4.tcp_max_syn_backlog=16384net.ipv4.tcp_wmem=819213107216777216net.ipv4.tcp_rmem=3276813107216777216net.ipv4.tcp_mem=78643210485761572864net.ipv4.ip_local_port_range=102465000net.ipv4.ip_conntrack_max=65536net.ipv4.netfilter.ip_conntrack_max=65536net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=180net.core.somaxconn=16384net.core.netdev_max_backlog=16384[root@lufengcentos~]#sysctl-p

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.