How to optimize Linux systems?
1. Configuring the update Yum source
2. Turn off SELinux and iptables
3. Work with ordinary users and classify authorization management by sudo by command
4. Minimize the installation system, only install the required packages
5.chattr lock critical system files, lsattr view lock properties
6. Hide the version number before landing/etc/issue
7. Change remote connection ssh port, prohibit root remote login, prohibit blank password login
8. Add a descriptor for the open file/etc/secutity/limits.conf
9. Optimize Kernel/etc/sysctl.conf
10. Streamline boot entry, Sshd,network,rsyslog,crond
11. Configure synchronization System time
12. Change Character Set support Chinese
13. Regular cleanup of junk files,/var/spool/clientmquene
14. After installing the system can delete the user to the virtual user, but it is best not to delete, but comments out, there is a problem can be restored back.
Cat>>/etc/sysctl.conf<<eof
> net.ipv4.tcp_timestamps = 0
> net.ipv4.tcp_synack_retries = 2
> net.ipv4.tcp_syn_retries = 2
> net.ipv4.tcp_mem = 94500000 915000000 927000000
> Net.ipv4.tcp_max_orphans = 3276800
> Net.core.wmem_default = 8388608
> Net.core.rmem_default = 8388608
> Net.core.rmem_max = 16777216
> Net.core.wmem_max = 16777216
> net.ipv4.tcp_rmem=4096 87380 16777216
> net.ipv4.tcp_wmem=4096 65536 16777216
> Net.core.netdev_max_backlog = 32768
> net.core.somaxconn = 32768
> Net.ipv4.tcp_syncookies=1
> net.ipv4.tcp_tw_reuse = 1
> net.ipv4.tcp_tw_recycle = 1
> net.ipv4.tcp_fin_timeout=1
> net.ipv4.tcp_keepalive_time=1200
> Net.ipv4.tcp_max_syn_backlog = 65536
> net.ipv4.ip_local_port_range = 1024 65535
> EOF
This article is from the "Yi Xiaoyi" blog, make sure to keep this source http://gongxiaoyi.blog.51cto.com/7325139/1825467
How to optimize Linux systems