Linux server optimization

Source: Internet
Author: User
1. disable services not required by some servers, such as bluetooth and pcscd. cancel some less commonly used scheduled tasks, such as makewhatis. cron (/etc/cron. weekly and/etc/cron. in daily), which is used to generate the whatis database...

1. disable services not required by some servers

For example, bluetooth and pcscd

 

2. cancel some uncommon scheduled tasks

For example, makewhatis. cron (in/etc/cron. weekly and/etc/cron. daily) is used to generate the whatis database.

In addition, mlocate. cron (in/etc/cron. daily) is used to generate the locate database.

 

3. Disable useless tty

6 TTY is enabled by default, that is, ctrl + alt + F1--F6

Use ps-aux | grep tty to find 6 tty

Modify the/etc/inittab and find

# Run gettys in standard runlevels

1: 2345: respawn:/sbin/mingetty tty1

2: 2345: respawn:/sbin/mingetty tty2

3: 2345: respawn:/sbin/mingetty tty3

4: 2345: respawn:/sbin/mingetty tty4

5: 2345: respawn:/sbin/mingetty tty5

6: 2345: respawn:/sbin/mingetty tty6

Add the # comment before the desired tty, and then use init q to take effect immediately.

 

At this time, you can use ps-aux | grep tty to find that there is not so much .....

 

4. cancel atime

 

It is very necessary in web services, especially when a large number of small images or small files are accessed, the atime of the files is modified once every time, increasing the I/O burden, first, find the web file storage partition.

Add noatime and nodiratime to the ULTS file after the Mount parameter.

To take effect immediately, run the mount-o remount command.

This article is from the "flying bike" blog

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.