Setting up a RedHat Linux and Apache Web Server

Linux Installation (continued):
 
How Many Partitions and How Big?
This is probably a big source of confusion for novices, at least it was for me. The various possibilities are discussed in the RedHat installation guide, but the bottom line is that once you have made room for Linux on your disk, you minimally need only two partitions: one Swap partition, and one root partition. The swap partition should be 64MB minimum. I configure my swap partition at 100MB. Apparently, the swap size can be as large as 128MB. However, when setting it to more than 120MB, I've experienced problems with the installation process (it crashes while formatting the swap partition).
You'll need at least 150MB free, but since we are talking about a server in this discussion, I'll assume that you have lots of disk space. Despite the fact that I said that the minimum number of partitions is two, you will probably want more. I have used several different partitioning schemes on different machines.
 
My current server is partitioned as:
  Filesystem         1024-blocks  Used Available Capacity Mounted on
  /dev/hda5             995115  517964   425745     55%   /
  /dev/hda6            1981000  881312   997276     47%   /home
  /dev/hda7            1888052    9581  1780878      1%   /usr/local
  
Here, I have 436 RPMs loaded using 465MB. In this case, I followed the advice given in Paul G. Sery's book. However, as you can see, the bulk of the packages go into /usr, which on this machine is mounted in the root partition. Hence, I am left with /usr/local containing almost nothing. Just the same, this is not a major problem as Linux is very flexible and by changing mount points and perhaps a directory copy and a link or two, the currently unused space can be put to use when the need arises.
 
The partitioning scheme that I like the best and I am using on my new server (still in test mode) is as follows:
  Filesystem           1k-blocks      Used Available Use% Mounted on
  /dev/hda1              1554262     50974   1422965   3% /
  /dev/hda5              2478138    313644   2036378  13% /home
  /dev/hda6              1981000    609241   1269347  32% /usr
  
  swap                    104000
  
I like this configuration because generally speaking, the operating system is loaded on / and uses about 51MB, the 412 RPM packages that I installed are loaded on /usr and use about 600MB (I've loaded nearly everything), and my own directories and the Web pages are loaded on /home and currently use about 314MB. All partitions are currently being used.
 
Regardless of the partitioning scheme that you choose, don't be tempted to make the root partition too small or you may have problems if /tmp fills up. You will probably need at least 50MB of free space on / for /tmp files or a separate partition.
 

Page 1 of Install Page 3 of Install Home

Home: http://www.sibbald.com/
Contact: kern at sibbald dot com
Last Update: