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 PackageIn 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.