After adding a new server, the next step is to install the system. It is recommended to use CentOS 5.8 x86_64, everyone
There is a principle in using the server: the fewer application packages installed on the system, the more stable the server is, so we install
Try to minimize the installation when the system is selected. As for the server single-machine performance tuning, in line with the principle of stability and security, try not to
Change the original configuration of the system (CentOS's own file and memory mechanism is excellent).
-
Turn off unwanted services
The less well-known services, the less resources the system consumes. Therefore, you should turn off services that you do not need. The
recommends shutting down unwanted services, and the benefit of this is to reduce memory and CPU time consumption. The commands are as follows:
# NTSYSV
Lists the services that need to be started, and services that are not listed are closed:
Crond: Automatic Scheduled Tasks.
Network: The Scripting service for the network interface has been configured. The
sshd:openssh Server daemon.
irqbalance: Enable the Irqbalance service to improve performance and reduce power consumption. The irqbalance is used to
optimize interrupt allocation, which automatically collects system data to analyze usage patterns and puts work into the
Performance mode or Power-save mode state based on system load conditions. When in performance mode, the irqbalance will distribute the
interrupt as evenly as possible to each CPU core to take full advantage of the CPU's multicore and improve performance. At PowerSave
Mode, irqbalance allocates interrupts to the first CPU to ensure that the rest of the idle CPU sleeps
, reducing power consumption. Now the mainstream servers are dual quad core, so I suggest to keep this. The log system service for the
Syslog:linux must be started, or the cause will not be found if the machine is having problems. The
two more special services, they are iptables and SELinux. If the system has no special requirements, both
Services can be turned off, and you can either close them under command setup or use command-line operations. The
command to close all servers is as follows:
for I in ' chkconfig--list|grep 3:on|awk ' {print $} ';d o chkconfig $i off;done
-
To open the required service command as follows:
For i in Crond sshd syslog network irqbalance;do chkconfig $i on;done
This article is from the "technical Discrimination" blog, please be sure to keep this source http://emg2012.blog.51cto.com/3705315/1615361
CentOS 5.8 minimized post-installation optimization