Linux System Installation Environment optimization
Linux new system installation requires:
Baseeditorsdevelopment-librarysdevelopment-toolsx-software-development system-tools Basic System: Basic, Performance tools, Debugging tool Development: Development tools Server: System Management Tools System Management: SNMP, System Management
1.Centos Download Yum Source
Http://mirrors.sohu.com/help/CentOS-Base-sohu.repohttp://mirrors.163.com/.help/CentOS6-Base-163.repo
2. Use the following command to update Yum to the latest
RPM--import/etc/pki/rpm-gpg/rpm-gpg-key*yum Upgrade
3. Install the necessary packages
Yum–y Install Lrzsz Systat
4. Clean up all boot-up services | Add the required boot service
Setup can configure the start-up service in the Shell graphics Terminal Ntsysv can also be configured in the Shell Terminal Graphics boot service Chkconfig–list|grep 3:on only need to start 4 services Crond, network, sshd, syslog
5. Change the SSH login configuration
Pre-change backup: cp/etc/ssh/sshd_config/etc/ssh/sshd_config.bakvi/etc/ssh/ssh_config#### #by darren#### #Port 52113 change port number p Ermit Root Login No disable root remote login permit empty Passwords No disable null password login use DNS No Do not use dnsforwardx11trusted no X graphics forwarding
6. Add a normal user to sudo management
Visudoroot all= (All) Alldarren all= (All) Add Darren All=all (All) on the root line. Darren can use sudo to get root permissions.
7. Environment variables for ordinary users
echo $PATH View environment variable VI ~/.bash_profile:/usr/local/sbin:/sbin:/usr/sbin added to environment variable path= $PATH: $HOME/bin:/home/darren/ Scripts:/usr/local/sbin:/sbin:/usr/sbinexport Pathsource ~/.bash_profile The configuration to take effect.
8. Chinese display garbled
vi/etc/sysconfig/i18n Modify the configuration file lang= "ZH_CN. GB18030 "source/etc/sysconfig/i18n make configuration file effective echo $LANG View system language
9. Increase the server file descriptor
Vi/etc/security/limits.conf End plus *-Nofile 65535tail-1/etc/security/limits.conf
10. Adjust kernel parameter file/etc/sysctl.conf
Net.ipv4.tcp_fin_timeout=2wsysctl–p making the configuration file effective
This article from "Wang Jiadong elder brother" blog, declined reprint!
Linux Installed system optimization