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. description of common mount points generally, there are at least two mount points in the linux system:/(root directory) and swap (swap partition), where,/is required; for more information, see the following description: creatcustomlayout is selected when installing the system. it takes a long time for the author to use CentOS. However, after using it for a while, it seems that the system partition is not very reasonable. here I will summarize it for myself, share it with you.
I. descriptions of common mount points
In general, in linux, there are at least two mount points:
/(Root directory) and
Swap(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.