<span style=
"Font-family: ' ';"
> 2 installation phase: <br> <
/span
>
Create partitions on the target disk and perform formatting;
Install the selected package to the target disk;
Generate bootloader;
After the installation, You need to restart the first startup. Remember to configure iptables, selinux, and core dump (in case of memory crash)
2. partitions during installation
1. There are generally two basic partitions for system installation:
/: Root Partition
Swap: swap partition (if there is no swap partition, there will be a problem if the hard disk space is insufficient)
2. if the root partition is placed in the logical volume, grub cannot drive and access the logical volume, you must partition/boot separately and use the basic disk partition instead of the logical volume, at this time, there should be three partitions:
/: Root partition, which is placed in the logical volume
/Boot: Use Basic disk partitions and cannot use logical volumes.
Swap: swap Partition
[Note: In order to prevent system crashes, the reinstallation system may lose critical data. Sometimes/usr,/var,/home/tmp/, and usr/local can be separately partitioned. In the future, when you reinstall the system, you only need to reload the root partition and format the root. You only need to mount other/usr,/var,/home/tmp/files]
[Note: All the above installation processes are run by anaconda]
4. Another method for installing the system is to read the kickstart configuration file automatically.
1. the anaconda application supports the configuration of the installation process by reading the content of the configuration file. The configuration file is called the kickstart file (in the centos or Red Hat series), and the file is in the/root directory, this method is required for batch deployment.
2. Composition of the kickstart file:
Command segment
Program Package: % packages, % end # indicates the package to be installed
@ Group # Install a package group
Package # package to be installed
-Package # do not install the package
Script section:
% Pre # pre-installation script: the script to be executed before the installation process starts. [Note: the Linux system environment is a micro-version environment, so the script should be simpler ;]
% Post # script after installation: the script to be executed after the installation process is complete. [Note: the script execution environment is a complete system that has been installed ;]
3. the kickstart command segment can be divided into two types: required commands and optional commands (to assist in completing some functions)
1. Configure kickstart:
(1) manually edit the configuration file;(2) system-config-kickstart, GUI tool; the package name of the installation Command system-config-kickstart is the same as the command name;
2. How to obtain and use the kickstart file during the installation process:
(1) place it in a location that can be obtained by the installer;
(A) Place on a CD image;
(B) network file server;
[Requirement: the installer must support the network function and be able to access the network file server ;]
3. Installation Guide options during the installation process
1. boot:
Linux # Start the default installation mode
Linux text # Start the text installation mode
2. Network-related boot options:
Ip = IPADDR
Netmask = MASK
Gateway = GW
Dns = DNS_SERVER_IP
Ifname = NAME: MAC_ADDR # Nic NAME
3. Specify the path for obtaining the kickstart file.
Ks =
DVD drive ks = cdrom:/path/to/kickstart_file
HTTP Server ks = http: // server_ip: port/path/to/kickstart_file
HTTPS Server ks = https: // server_ip: port/path/to/kickstart_file
FTP Server ks = ftp: // serverip: port/path/to/kickstart_file
NFS Server ks = nfs: server_ip:/path/to/kickstart_file
The following example shows how to create a boot disc. It only helps to start the installation process and does not provide an installation tree:
(1) first prepare a working directory. For example, use/tmp/cdrom here;
<span style=
"Font-size: 16px; font-family: ' ', 'Microsoft yahei ';"
>
#mkdir /tmp/cdrom<br></span>
(2) mount the system release CD and copy the isolinux directory to/tmp/cdrom;
#mount/dev/sr0/media/Centos-VERSION
#cp/media/Centos-VERSION/tmp/cdrom/
(3) run the system-config-keckstart command to create the kickstart file, and copy the created kickstart file ks. cfg to a location in/tmp/cdrom;
#system-config-kickstart
#cpks.cfg/tmp/cdrom
(4) If necessary, edit/tmp/cdrom/isolinux. cfg: attaches ks = information to the append Command after a label to automatically call the ks file provided on the disc;
(5) Create an iso image. After mkios is created, a boot. iso file is generated. The boot. iso file is our boot image, and our image is created here.
#mkisofs-R-J-T-v--no-emul-boot--boot-load-size4--boot-info-table-V"CentOS6.6X86_64bootdisk"-bisolinux/isolinux.bin-cisolinux/boot.cat-o/root/boot.isocdrom/
(6) If necessary, you can use sftp to build the boot. copy the iso image to windows, create a new virtual machine, and adjust the boot sequence in the virtual machine to enable the CD, that is, our boot. iso, boot