To install a Linux host is not that simple, we must consider the features of distributions, the capabilities of the Server software, future upgrade requirements, hardware scalability requirements, and so on, for disk partitioning, file systems, Linux operating more frequently directory, etc. should have a certain degree of understanding.
We have to consider some work so that our subsequent host maintenance is easy and enjoyable.
First, the collocation of Linux and hardware
We need to estimate what our Linux is trying to accomplish, so that we know which component is most important when we buy hardware. For example, the user of the desktop computer, should use the X Window System, at this time, the pros and cons of the graphics card and the size of the memory has a significant impact.
- Each component or device is a file under Linux (Linux differs from the Windows system for the resolution of each component/device of the computer)
1. Select hardware
Unless we enter the workplace, we typically use a personal computer architecture to set up a Linux server. Therefore, we can buy the market on the mainstream personal computer hardware equipment can.
Let's take a look at the requirements of the hardware under Linux:
RAM: The larger the memory, the better. In Linux servers, the importance of memory is much higher than that of CPUs. Because if the memory is not large enough, the memory swap space (swap) to the hard disk is used, and because the hard disk is much slower than the memory, this will affect the overall system performance.
Hard disk: For the general small server, the focus is on the size of the capacity, HDD capacity of more than 20GB is enough.
2. File names for each hardware device in Linux
Let's take a look at the roles that each hardware plays in Linux. Again, in a Linux system, each device is treated as a file. For example, the IDE interface's hard disk file name is/dev/hd[a-d], where the letters in parentheses are any one of the a-d (that is,/dev/hda,/dev/hdb,/DEV/HDC,/dev/hdd four files).
Almost all of the hardware files in the Linux system are in the/dev directory.
Here are a few common devices and their file names in Linux:
IDE Hard disk |
/DEV/HD[A-D] |
SCSI/SATA/USB HDD |
/DEV/SD[A-P] |
Tape drive |
Ide:/dev/ht0 scsi:/dev/st0 |
We need to pay special attention to the hard disk (IDE, SCSI, USB), each disk drive disk partition (partition) is not the same, its disk file name will also change. Note that the file name of the tape drive, because in some different distribution may find the file name. Now, we just need to recite the IDE and SATA hard disk file name, the other use to get back!
Second, disk partitioning
Our goal is to install Linux, so what part of the computer component is the Linux system installed on? is the disk.
Let's get to know the disk first. We know that a piece of disk can be partitioned into multiple partitions (partion), in the old Windows perspective, we might partition a disk into C:, D:, E: Disk. This c, D, E is the partition. But the Linux device is the type of file, and what is the filename of the partition?
1. How the disk is connected to the device file name
There are two common disk interfaces for personal computers, namely the IDE and SATA interface (the current mainstream interface is the SATA interface, older hosts use the IDE interface).
IDE Devices: Devices connected to the IDE interface, including disk and optical devices.
In the IDE interface, the host will typically provide two IDE interfaces, and an IDE flat cable can connect two IDE devices, so up to four IDE devices can be connected. In other words, if we already have a CD-ROM device, then we can only connect the disk with three IDE interfaces at most. These two IDE interfaces are often referred to as IDE1 (primary) and IDE2 (secondary), and the IDE devices above each flat cable can be distinguished as Master (master) and slave (slave device). The file names for these four IDE devices are as follows:
Ide\jumper |
Master |
Slave |
IDE1 (Primary) |
/dev/hda |
/dev/hdb |
IDE2 (secondary) |
/dev/hdc |
/dev/hdd |
"Example" assumes that your host has only one IDE interface disk, and this disk is connected to IDE2 's master, then its device file name is/DEV/HDC on the Linux operating system.
In the case of SATA interfaces, the disk device filenames of these interfaces are formatted as/DEV/SD[A-P] because the disk interfaces such as SATA/USB/SCSI are driven using SCSI modules. But unlike the IDE interface, the disks of the SATA/USB interface are not in a certain order, so how
Install a Linux practice machine