Recently a friend asked me, said Linux system how to optimize will be better, I think actually this topic is actually bigger, I also collected the next Linux system optimization of the article, roughly collated under, as follows:
1, close the SElinux2, close the iptables and empty the policy (set boot does not start automatically) 3, adjust the Linux default RunLevel (multi-user mode) 4, adjust the character set "Echo ' lang=" ZH_CN. UTF-8 "' >/etc/sysconfig/i18n, then source/etc/sysconfig/i18n5, set the system time-out (export tmout=50), command-line History quantity variable (HISTSIZE=50) , histfilesize=10 (the number of command variables for history files) 6, hide Linux version information 7, adjust the limit of the number of open files (default is 1024) 8, Linux server kernel parameter optimization 9, Modify the network card to eth0 (CentOS7 default is not eth0), adjust host name 10, update system 11, time settings (set with NTP time synchronization) 12, lock critical system files (such as using chattr +i/etc/passwd/etc/shadow/etc/ Group/etc/gshadow/etc/inittab) 13, clear redundant system virtual account 14, the use of unconventional SSH port (such as the default SSH port to 2222 port, prohibit the root user remote connection) 15, Turn off services not required by the system: Systemctl disable auditd.servicesystemctl Disable irqbalance.servicesystemctl disable Lvm2-monitor.servicesystemctl Disable postfix.service16, cancel DNS inverse solution 17, without root login system, log in as a normal user, through sudo authorization management
This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1910201
Linux System Optimization Summary