Installed Linux optimization

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.