Home  >  Article  >  Operation and Maintenance  >  How to partition during centos installation

How to partition during centos installation

王林
王林Original
2020-03-30 13:20:2214056browse

How to partition during centos installation

Partition recommendations:

1. Necessary partitions

1. Boot partition:

Function : Boot partition, which contains the necessary kernel files for system startup. Even if the root partition is damaged, it can still boot normally. Generally, the space occupied by these files is less than 200M.

Partition suggestions: When partitioning, you can choose between 100M-500M. If the space is enough, it is recommended to divide it into 300-500M. Avoid filling this partition with redundant files that have been used for a long time.

Partition format: ext4 is recommended, change according to needs.

2. / partition (root partition):          

Function: All files start here. You can compare it to the C drive of Windows, but there are actually differences. If you have a large amount of data in the root directory (such as FTP, etc.), you can divide the space into a larger space.

Partition recommendation: 15G or above is recommended. Depending on the needs, the size of the root partition and home partition is similar to the space distribution of C drive and D drive. Wherever the main space is occupied, the larger capacity is allocated there.

Partition format: ext4 is recommended, change according to needs.

(Recommended tutorial: centos tutorial)

3. Swap partition:

Function: similar to Windows’ virtual memory, occupied when the memory is not enough The virtual memory of the hard disk is used to store temporary data, and for Linux it is the swap partition.

Partition recommendation: It is recommended to be 2 times the physical memory size. For example, if your computer has 4G of physical memory, the swap partition can be 8G.

Partition format: swap format.

2. Optional partitions

1. Home partition

Function: to store user data. The structure of HOME is generally HOME/userName/userFile , if not separated, it will default to the / directory.

Partition suggestions: If there is a lot of user data, you can increase this partition appropriately. Please refer to the "root partition" partition suggestions; generally, the main capacity of a hard disk is almost all under the Home partition and the root partition.

Partition format: ext4 is recommended, change as required

2. Var partition

Function: used to store log files, if not divided, the default is in the / directory Next

Partition suggestion: If the Linux you install is used for servers or you often do log analysis, please divide it into a var partition to avoid problems caused by the expansion and filling of log files and the root partition.

Partition format: ext4 is recommended, change according to needs.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to partition during centos installation. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn