Theme NexT works best with JavaScript enabled
 
    
  
  
  
  
     
    
       
       
       
     
    
       
     
      
    
    
    
    
        去除文件空行和#开头的行 1 2 3 grep ^[^ grep -Ev "^$|[#;]"   file egrep -v "^$|#"   file 
 
 
修改文件最大打开数 1 2 3 4 5 6 ulimit  -n 1048576sed -i "/nofile/d"  /etc/security/limits.conf echo  "* hard nofile 1048576"  >> /etc/security/limits.confecho  "* soft nofile 1048576"  >> /etc/security/limits.confecho  "root hard nofile 1048576"  >> /etc/security/limits.confecho  "root soft nofile 1048576"  >> /etc/security/limits.conf
 
优化ssh 1 2 3 4 5 6 7 8 9 10 11 12 vim /etc/ssh/sshd_config Port 52113                  PermitRootLogin no          PermitEmptyPasswords no     UseDNS no                   GSSAPIAuthentication no     sshd -t   service sshd restart 
 
Centos常用包 1 2 3 4 5 6 7 8 9 10 yum install -y libxml2 libxml2-devel openssl \ openssl-devel bzip2 bzip2-devel libcurl \ libcurl-devel libjpeg libjpeg-devel \ libpng libpng-devel freetype freetype-devel \ gmp gmp-devel libmcrypt libmcrypt-devel \ readline readline-devel libxslt libxslt-devel  \ libicu-devel  openldap  openldap-devel \ make zlib zlib-devel gcc-c++ libtool \ pcre pcre-devel  cmake gcc  ncurses ncurses-devel \ bison bison-devel libgcrypt perl