Linux installation and hard disk partitioning

Source: Internet
Author: User
Tags dedicated server

 

I believe manyLinuxI'm full of likes, especially technicians.WinddowsI 'd like to try this system. There are a lot of advantages about it. Of course, you are good, you are bad, you can only understand it once you have used it! Now, I am a newbie.

 

I wouldn't be so impulsive. I just switched my computer systemLinuxSo I am dumpfounded, and may be connected to a network to installProgramThis is a problem for me. The safest way is to use virtual machines. This is the first time for beginners.Linux. When the VM is fromWindowsPlatform OrientationLinuxExcessive good methods.

So, in myWin XPI have prepared two artifacts.

Bytes ---------------------------------------------------------------------------------------------------------------

Linux:Essential to playLinuxOf course.LinuxSystem. AboutLinuxMany system versions are available.Centos

:

Version 5.7

Http://mirrors.kernel.org/centos/5/isos/i386/

Version 4.8

Http://mirrors.kernel.org/centos/4/isos/i386/

Version 5.7 is too big. I have a file named "4.8". It looks like this file! CentOS-4.8-i386-binDVD.iso

In fact, Linux kernel is very small, because Linux is mostly used on servers, so Linux vendors integrate too many services into their Linux systems.

 

VMWare: Virtual Machine. We can run ourLinuxSystem.

Only dozens of simplified versions are required.MB, Generally 3, five hundredMBAnd can also be found on the Internet. It is pasted here.

Bytes --------------------------------------------------------------------------------------------------------------------


How to import and run virtual machine installation and crackingLinuxNot the focus of this article.

Open virtual machines and files-----New-----Virtual Machine----According to the wizard, select our installation system, set the user name and password of the system, and set the size of the virtual machine, disk, and memory. Network connection mode. This is not difficult.



 Linux Installation Process

 

The following virtual machine will start to install ourLinux. (Dual-point Vm with mouse---Enter the virtual machine.CTRL + ALT ----Move the mouse to exit the VM)

 

Choose skip to skip the media test and start the installation

On the first screen, can we check whether the system is not checked? Do not want to check SelectionSkip

.

The first option allows us to select a language. Note that this is the language of our Installation Wizard, not the language of our system.

Select the file type. For the first time, select "Personal desktop" For ease ".

In the disk partition settings, select "manual partitioning ".Centos 1, 5.5Is a drop-down list, there are four options, choose to manually split the partition on the line.

LinuxDisk File storage method and ourWindwosInLinuxEverything can be seen as a file.

 

Therefore, follow me to perform the operations and wait for a moment to complete the knowledge of disk files.

 

Step 1"

Click "new" to create our "system" disk,

Select the mount point and directory to store our system and some other service files.6g, The total size set on my VM is8. If the total size you set is20g,Multiple vertices are allowed here.

 

 

Step 2

Click "new"

Set "Virtual Memory". This space is similar to virtual memory. When the physical memory is insufficient, a virtual memory is allocated on the disk for memory usage. If no mount point is selected, set the file type to"Swap"

 

Step 3

Click "new"

The rest is divided as needed. If you want to create multiple servers"/Web"Dedicated server programs.

 

 

The hard disk partitioning method is as follows:

Click "Next", set the firewall, and select a service.

SetRoot(Super administrator) User Password

Below,LinuxInstall the system according to our settings. About 10 or 20 minutes! Next let's take a lookLinuxFile System.

 

================================================================ Gorgeous split line ==========================================================

 

Linux File System

 

The structure of the Linux file system is called filesystem Hierarchy Standard (FHS), which adopts a hierarchical tree directory structure. At the top of the structure is the root directory "/" (slash), and other directories and subdirectories under this root directory

Like DOS and Windows, Linux uses "paths" to indicate the levels of files or directories in the file system. A path consists of multiple directory name strings separated by "/", which are divided into absolute paths and relative paths. An absolute path is a method that starts from the root directory "/" to indicate the location of a file or directory in the system. For example, if the absolute path is used to represent the bin directory in the 4th-layer directory in Figure 1, it should be "/usr/local/bin ". The relative path is based on the current directory, indicating the location of a file or directory in the file system. If the current working directory is "/usr", the relative path is used to represent the bin directory in the 4th-layer directory in figure 1, which should be "Local/bin" or ". /local/bin ", where ". /"indicates the current directory, which can be omitted.

The Linux file system is organized differently from the Windows operating system. For devices used in Linux, without the need to create drive letters like Windows, Linux recognizes all devices including local disks, network file systems, CD-ROM and USB disks as device files, and embedded in the Linux File System for management. A device file does not occupy any space in the file system. It is only the entry to access a device driver. In Linux, there are two types of special files: character-oriented special files and block-oriented special files. The former allows I/O operations to be performed in the form of characters, while the latter uses the memory buffer to implement data read/write operations in the form of data blocks. When an I/O operation is performed on a device file, the operation is transferred to the corresponding device driver. A device file is represented by the master device number (indicating the device type) and the slave device number (indicating the first devices of this type). You can create a device file using the mknod command. The representation of typical device files such as floppy disk, CD, and hard disk in Linux is shown in table 1.

Table 1Representation of typical device files in Linux

Set backup name

Representation in Linux

Master hard disk of the first ide Interface

/Dev/hda

Slave hard disk of the first ide Interface

/Dev/HDB

Master hard disk of the second ide Interface

/Dev/HDC

Slave hard disk of the second ide Interface

/Dev/HDD

Master hard disk of the first SCSI interface

/Dev/SDA

Slave hard disk of the first SCSI interface

/Dev/SDB

Master hard disk of the second SCSI interface

/Dev/SDC

Slave hard disk of the second SCSI interface

/Dev/SDD

Optical Drive

/Dev/CDROM

First floppy disk

/Dev/fd0

Linux File Names can contain a maximum of 256 characters, including numbers, characters, and symbols such as ".", "-", and. Linux File names are not like DOS or windows. They are composed of the primary file name and the extended file name. Linux does not have the extension concept. In Linux, file names are case sensitive. For example, test.txtand test.txt are recognized as two different files, whereas DoS or Windows platforms do not use case sensitivity.

Simplest Partitioning Method

As mentioned above, only the root directory and the memory swap space (/& swap) can be separated. Then reserve some remaining disks for subsequent exercises. However, this is of course an insecure Partitioning Method (So laruence often says this is "lazy partitioning ")! If any small detail breaks down (such as the generation of bad rails), your root directory may be damaged and it is difficult to save it!

A little tricky

The more troublesome partitioning method is to analyze the future usage of the host, and then analyze the directories with large capacity and frequently read/write according to the usage, if you separate these important directories without putting them together with the root directory, the system data in the root directory will not be affected if the disk partitions with frequent read/write operations have problems, it is easier to save. In the default centos environment, the following directories are suitable for large capacity and frequently read/write operations:

/

/Usr

/Home

/Var

Swap

Linux System File description:

/Top-level root directory. All other directories are under the root directory at the file system level.

/BinContains the basic command line utility. You cannot configure this directory in another partition; otherwise, you cannotLinux rescueTo access these utilities.

/Boot IncludingLinuxThe command or file required to start the computer.

/DevList available device drivers. This directory cannot be reprinted to another partition.

/EtcIncluding basicLinuxConfiguration command. Including and password,Apache,SambaSuch as monitoring programs andXWindow-related configuration commands

/Home Including the home directories of all users except root users.

/Initrd Configure the empty directory used by the initial memory disk during startup. This directory cannot be reprinted to another partition. If you delete this directory,RedHat LinuxIt cannot be started.

This directory does not belongFHSPart

....

/Root Root User main directory./RootThe directory is the root directory (/.

/Temp As a dedicated storage address for temporary files, it is also a good place to download files.

/UserIncluding all the programs and data available to users, as well as many sub-directories.

/VarContains variable data, including log files and print offline. This directory is often reprinted to another partition.

 



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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.