Installed Linux optimization
1. Change the Yum source generally I use 163
Vim/etc/yum.repos.d/centos.repo
(or you can go directly to the download. Repo this file)
(Be sure to back up the file before you modify it. bak)
2. Upgrading the System
Yum Upgrade
System self-initiated services
Crond
Iptables
Network
Sshd
Syslog
Sysstat
Minimum boot service is good
3. Change the SSH login configuration
Vim/etc/ssh/sshd_config
#Port 22
Port 10009
#PermitRootLogin Yes
Permitrootlogin No
#UseDNS Yes
Usedns No
#PermitEmptyPasswords No
Permitemptypasswords No
Service sshd Restart
4. How to use root permissions
Login with a normal account first
Su-root
Enter the root password
Switch to Root
Add a regular account to sudo management
Visudo or directly modify the file/etc/sudoer
Under Root all= (All), add the following line
Account name all= (All) all
Using the sudo command
Enter the password for this account
sudo su-root
Switch to root account
5. Command not complete question
Path modification
Modify the root path to the specified account
Echo $PATH
Vim ~/.bash_profile
SOURCE ~/.bash_profile
6. Change the Chinese display
echo "lang=" ZH_CN. UTF-8 "" >/etc/sysconfig/i18n
source/etc/sysconfig/i18n
Echo $LANG
8. Increase the file descriptor
View Ulimit-n
Modify Vim/etc/security/limit.conf
*-nofile65535
This article is from the "Romantic Laugh" blog, make sure to keep this source http://zongxuan.blog.51cto.com/6942028/1591093
Installed Linux optimization