Linux system partitioning methods experience sharing and advice

Source: Internet
Author: User
Tags manual web services root directory

Linux partitioning method, different people have different methods, anyway, there is no uniform method. In terms of zoning, I think it is best to score according to my own actual situation. I have been playing Linux for several years, and I have some experience in zoning.

 First, personal use

If it is personal use, there is no need to divide so many areas, divided into one area, or two districts on the line.

Divided into one area, you need a root partition on the line/, my multiple systems inside the Linux is a partition.

Divided into two districts, one/boot partition, one root partition/

Second, the server with

About the server partition, do not divide too much, suitable for their own line, there are two kinds of better methods, suitable for two different kinds of people

1, people like to use software management tools, Pacman,yum,apt-get and so on.

This kind of people like to use software with the software to install the Web server, MySQL server, mail server and so on.

The code is as follows:

/boot partition 100M, absolutely enough.

/home hard disk size *4% According to the number of user data, to increase or decrease

/USER hard disk size *6% like to use administrative tools, but there are always things to compile and install yourself.

/swap Intrinsic size *2

/var hard disk size *70% The default installed packages are basically here, as well as Web services, MySQL services, and so on, so this partition should be large enough

/tmp hard disk size *10% as a server, log files will be a lot, so take out alone. If scheduled cleanup can be reduced appropriately.

/The rest is for the root partition.

  Second, like to compile their own installation of the people

Manual Build installation Flexibility is relatively high, but if you upgrade your system, it may cause manual installations to be unavailable.

The code is as follows:

/boot partition 100M, absolutely enough.

/home hard disk size *60% For example: I want to build a Web server, build a Nginx user group and users, and then, of course, first download the source code, and then put it under the Nginx user's root directory, the installed directory under/usr/local, The code directory is also placed under the root directory of the Nginx user, not under/var, and the resulting log may also be placed under the Nginx user's root directory. So the server-related things, are placed under the user's directory, such users of this directory is very large.

/USER hard disk size *20% where the user is installed, put it under/usr/local, so this directory also needs to be a bit larger.

/swap Intrinsic size *2

/var hard disk size *10% A lot of system files are placed under/var, separate partitions, can improve the performance of the server

/The rest is for the root partition.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.