一个Linux Web服务器的分区方案

Specifying a good partition scheme in Linux的 can help when things go wrong. 如果分区失败,不会影响其他分区的数据.

以下是Web服务器的好分区方案. 下面的数字是一个10GB的硬盘驱动器。.

/boot
Contains all the files and directories to boot the Linux的 kernel. The Linux kernel and GRUB boot loader files are stored here. This needs to be large enough to fit the Linux and GRUB loader files, as well as be able to allow for any future updates.
大小: 10% (1Gb)

/
This is the root directory, where all other files appears. If a partition is not specified for other directories then they will be in this partition.
大小: 25% (2.5Gb)

/home
Contains all users data and configuration files.
大小: 25% (2.5Gb)

[swap]
Hard disk space used to help free up memory. It is 推荐 to put the swap size at least twice the size of the allocated memory.
大小: 15% (1.5Gb)

/tmp
Directory used by Linux to store temporary files. This directory is emptied at boot.
大小: 10% (1Gb)

/var
Contains files that may change in size such logs and mail boxes.
大小: 15% (1.5Gb)

Partition sizes can also be resized if they fill up. The above is a guide for initial sizes at installation.

发表评论