Recommended hard disk partitioning when installing CentOS

Source: Internet
Author: User

I have been using CentOS for a long time. However, after using CentOS for a period of time, I feel that the system partition is not very reasonable. I would like to share it with you even if I have summarized it for myself.
I. Descriptions of Common mount points
In general, in linux, there are at least two mount points:/(Root directory) andSwap (swap partition), where,/Is required;

For details, see the following:

Select the creat custom layout custom partition when installing the system
We recommend that you mount the following directories:

/Root directory to store system commands and user data 
/Boot loader static link file to store programs related to Linux Startup

/Home user directory, which stores data of common users/Tmp temporary file/Usr is the place where the software is stored in Red Hat Linux. If possible, allocate the maximum space to it./Usr/local self-installed program installed here/Var constantly changing data, some services of the server are placed below./Opt Additional Application Software Package

In general, we need at least two partitions, one SWAP partition and one "/" partition, but some common and important mount points are allocated to other partitions, so that we can manage them. Generally, one/partition, one/usr partition, one/home partition, and one/var partition. All of these can be allocated and modified according to your own needs.

Ii. Recommended System Partition Scheme
/Swap directory 8 GB # memory less than 4 GB is twice the memory size greater than 4 GB is the same as the memory size.
/Boot directory 100 M
/Root directory 30G-50G # larger forced primary Partition
/Var directory 30G-50G # It is better to store a variety of log files larger
/Usr category 50G-100G # used for Personal Configuration applications, especially when installing programs that are easy to generate large logs. If wowza tomcat is used, it is better to divide them into larger ones.
/Home 10G
/Opt 10G
/Tmp 10G

Other remaining space can be divided into a part for business applications, which can be allocated according to their own needs.
If you install a database, you can divide/data to store database files.
You can install the web service by dividing/using webroot to store webpage files, etc.

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.