Basic Linux optimization and Linux Optimization

Source: Internet
Author: User

Basic Linux optimization and Linux Optimization

Summary:

Yiqing, Yijing, yizeng,Dual optimization, four settings, and seven others

Yiqing:Regularly clear logs/var/spool/clientsqueue

Yijing:Streamline startup services

Increment:Increase file descriptor

Two advantages:Linux Kernel Parameter Optimization and yum source optimization

Four settings:Set the character set of the system, set ssh logon restrictions, set the boot prompt and kernel information, and set the block size.

Seven others:File System Optimization, sync data synchronization to disk, no update timestamp, lock system key files, time synchronization, sudo centralized management, firewall shutdown and selinux

1. sync data synchronized to disk

Async sync

2. Do not update the timestamp

Noatime

3. File System Optimization: Disable the ext3 and ext4 log Functions 

Disable services that are less important to data

4. Set the block size, generally 4 K 

Mkfs-t ext3-B 4096/dev/sda1

5. Lock key files of the system

Chattr +/-I/etc/passwd

6. linux kernel optimization (Parameter Optimization)

............

7. Set the boot prompt and system information

/Etc/motd/etc/issue

8. Set up the yum source of the system and optimize the system (upgrade)

/Etc/yum. repos. d/

9. Time Synchronization. A time synchronization server ntpserver can be set up between 50-servers. 

/Usr/sbin/ntpdate time.windows.com

10. Set the character set of the system

/Etc/sysconfig/i18n

11. Use sudo tools to centralize user management 

Mongodo

12. Restrict ssh Logon Settings, such as changing the port, disabling root logon, and disabling password-free logon. 

/Etc/ssh/sshd. conf

13. Increase the file descriptor 

Echo '*-nofile 65535'>/etc/security/limits. conf

14. timed cleanup/var/spool/clientsqueue/ 

Write the script and place it in the scheduled task for regular cleanup.

15. Streamline startup services

A) setup, check the startup Service

B) Input ntsysv on the terminal

C) script writing

Cat/server/scripts/chkinfo. sh

# Setup sys start server or process

For I in 'chkconfig -- list | grep 3: on | awk' {print $1} ''; do chkconfig -- level 3 $ I off; done

/Bin/sh/server/scripts/chkinfo. sh

 

For details about the above optimization, refer to Centos production server environment to minimize the security after installation and optimize the configuration.

 

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.