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

How to partition during centos installation

王林
王林Original
2020-05-22 09:21:116069browse

How to partition during centos installation

The partition scheme is as follows:

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. 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, large capacity is allocated there.

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

3. Swap partition

Function: similar to the virtual memory of Windows. When the memory is not enough, it occupies the virtual memory of the hard disk to store temporary data. 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

II , Optional partition

1. Home partition

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

Partition suggestion: If there is a lot of user data, you can increase this partition appropriately. Generally, the main capacity of the hard disk is almost all under the Home partition and the root partition.

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

2. var partition

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

Partition recommendation: If the installed linux is If it is used for servers or for frequent log analysis, please divide it into var partitions to avoid problems caused by the constant expansion and filling of log files and the root partition.

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

Recommended tutorial: centos 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