Linux system optimization

Source: Internet
Author: User

=======================System Optimization ======================Check Hardware: Dmidecode | Grep"Product Name"Check Cpu:grep name/proc/cpuinfoTurn off firewall: Chkconfig iptables off/etc/init.d/iptables STOPVI/etc/selinux/config# selinux=enforcingselinux=disabledsed-i ' s#SELINUX =disabled#selinux=enforcing#g '/etc/selinux/configTemporary entry into force: Setenforce 0Add User: Useradd lsq2016Echo"123456" | passwd--stdin lsq2016 &&History-c#Add a user password and clear the historyAdd YumSource: http:mirrors.cnlinux.net/centos/6.2/os/x86_64/packages/#rpmDownload http:mirrors.sohu.com/Tested under: Yum install Lrzsz-y#szUpload and Download toolUpgrade the system to the latest:。。。Optimized boot-up: For ABC in ' Chkconfig--list | grep 3: On | awk ' {print '} ';d o chkconfig--level 3 $abc off;donefor ABC in Crond network Rsyslog sshd;do chkconfig--level 3 $abc On;doneChange SSHConfiguration: CP/etc/ssh/ssh_config/ETC/SSH/SSH_CONFIG.BAKVI CP/etc/ssh/ssh_config\cp/etc/ssh/ssh_config/etc/ssh/ssh_config.baksed-i ' S%port 22%port 51234%g '/etc/ssh/ssh_configsed-i ' S%permitrootlogin yes%permitrootlogin no%g '/etc/ssh/ssh_configsed-i ' s%permitemptypasswords no%permitemptypasswords yes%g '/etc/ssh/ssh_configsed-i ' S%usedns yes%usedns no%g '/etc/ssh/ssh_config/etc/init.d/sshdReload && Action/bin/truelsq2016User added to SudoInEcho"Lsq2016 all= (All) all" >>/etc/sudoers#Note Back up firstTo change the Chinese display:Echo ' lang="ZH_CN. UTF-8 "' >>/etc/sysconfig/i18nsource/etc/sysconfig/i18nServer time synchronization:Echo ' */5 * * * * * /usr/sbin/ntpdate time.windowns.com >/dev/null 2>&1 ' >> 
                                                                     
                                                                      /var/spool/cron/rootcrondtab-l 
                                                                      # Check enlarged file descriptor:Echo ' *-nofile 65535 ' >> /etc/security/ Limits.conf or Ulimit-shn 65535 add to /etc/rc.local tuning kernel tuning:/etc/sysctl.conf has only encountered time_ at present WAIT too much and the TCP window size tuning sysctl-p # takes effect          
                                                                     

Linux system optimization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.