Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ CentOS 6.4 under PXE + Kickstart unattended operating system installation     - Node.js developers must know four JavaScript concepts (Programming)

- MySQL In can not be overridden with an internal connection (Database)

- The first deployment of cross-platform operation Rafy record (Server)

- Linux user directory (Linux)

- ORA-04031 error appears in the solution run utlrp.sql (Database)

- Cobbler Add custom YUM source (Linux)

- Construction Spark source and application development environment (Server)

- Ubuntu / openSUSE users to install Veusz 1.21.1 (Linux)

- Linux filtration empty file command summary (Linux)

- Oracle 11g through SCN do incremental backup repair standby library detailed process (Database)

- When Linux virtual machine to another copy of the operating system, a static IP NAT mode Invalid (Linux)

- Quick paging ROW_NUMBER conducted (Database)

- Ubuntu U disk do not have write privileges can only read but not write (Linux)

- To see the Linux device tree (Linux)

- Talk about jsonp (Programming)

- Type Linux commands (Linux)

- Spring AOP (Programming)

- CentOS RedHat YUM Source Extensions Supplement (including 32-bit, 64-bit) (Linux)

- Linux program analysis tool: ldd and nm (Linux)

- Upgrading Oracle to (Database)

  CentOS 6.4 under PXE + Kickstart unattended operating system installation
  Add Date : 2018-11-21      
  First. Introduction

1.1 What is PXE

PXE (Pre-boot Execution Environment, Pre-Boot Execution Environment) is the latest technology developed by Intel, working in network mode Client / Server, and support for workstations through the network from a remote server to download the image, and thereby support the network boot operations system during startup, the terminal requires the server to assign IP addresses, and then TFTP (trivial file transfer protocol) or MTFTP (multicast trivial file transfer protocol) protocol to download a software package to start the machine's memory executed by the startup software complete basic terminal software settings to boot the operating system pre-installed on the terminal server.

Strictly speaking, PXE installation is not a way, but a boot mode. PXE installation of the necessary conditions is to be installed on the computer must contain a PXE support for NIC (NIC), namely card must have a PXE Client. PXE protocol allows the computer to boot through the network. This protocol is divided into Client-side and Server-side, and PXE Client in the card ROM. When the computer boots, BIOS into memory to perform PXE Client, and then by the PXE Client will be placed at the distal end of the file is downloaded to run locally through a network. Run PXE protocol need to set up a DHCP server and TFTP server. DHCP server will PXE Client (to be installed in the host system) assigned an IP address, because it is assigned to the PXE Client IP address when configuring DHCP server need to add the appropriate PXE settings. In addition, the PXE Client of the ROM, already exists TFTP Client, then it may be the TFTP Server TFTP protocol to download the files.

PXE working process:

1. PXE Client from their PXE boot NIC, to obtain a copy of this IP network DHCP server;

2. DHCP server returns the client allocated to the IP and place the PXE file (the file is usually placed on a TFTP server);

3. PXE Client Request pxelinux.0 file to this network TFTP server;

After the implementation of the document made pxelinux.0 4. PXE Client Files;

5. The results of the implementation of pxelinux.0, loading the kernel and file system via TFTP server;

6. Enter the installation screen, then you can choose one of HTTP, FTP, NFS way to install;
1.2 What are Kickstart

Kickstart is a way to install unattended. It works by recording typical manual intervention is required to fill in various parameters during installation, and generates a file named ks.cfg. If (not limited to generating Kickstart installation file machines) the situation appears to fill in the parameters of the installation process, the installer will first go to find Kickstart files generated, if the appropriate parameters to find, on the use of parameters found; if not found appropriate parameters, the installer will need to manually intervened. So, if Kickstart file covers all the parameters required to complete the installation process may appear, then the installer can only tell the installer where to take the ks.cfg file, then go do your own thing. Such as the installation, the installation program will be based ks.cfg settings restart the system and complete the installation.

Second, the system environment

Experimental environment: VMware Workstation 10

Platform: CentOS release 6.4 (minimum installation)

Network Mode: NAT mode (shared host's IP address)



Firewall off / iptables: Firewall is not running.

SELINUX = disabled

Third, the preparatory work

Generate ks.cfg file requires system-config-kickstart tool, and this tool relies on X Windows, so we need to install X Windows and Desktop and reboot the system, as follows:

# Yum groupinstall "X Window System"

# Yum groupinstall Desktop

# Reboot

Fourth, configure HTTP installation

Installation of the system can select HTTP, FTP, NFS, HTTP us here installation methods, install the other two methods, we can own Baidu.

4.1 install and configure HTTP

# Yum install httpd -y

# Rpm -qa | grep httpd

Open Services and set the boot

# /etc/init.d/httpd Start

# Chkconfig --level 35 httpd on

4.2 ISO image loading

ISO image settings are loaded in the virtual machine.

4.3 copy the entire contents of the disc to http root directory / var / www / html / under

# Cp -r / mnt / cdrom / / var / www / html /

HTTP part set.

5, configuration TFTP

5.1 Installing tftp-server

# Yum install tftp-server -y

5.2 Enable tftp service

# Vi /etc/xinetd.d/tftp

service tftp
        socket_type = dgram
        protocol = udp
        wait = yes
        user = root
        server = /usr/sbin/in.tftpd
        server_args = -s / var / lib / tftpboot
        disable = no
        per_source = 11
        cps = 100 2
        flags = IPv4
Will disable set to no

5.3 Start tftp service

Because the tftp service is mounted under xinetd super process, so to start the tftp service by starting xinetd.

# /etc/init.d/xinetd Restart
Setting boot xinetd

# Chkconfig xinetd on
Sixth, configuration support PXE boot program

6.1 pxelinux.0 copy files to / var / lib / tftpboot / folder

# Cp /usr/share/syslinux/pxelinux.0 / var / lib / tftpboot /

Description: syslinux is a very powerful boot loader, and is compatible with a variety of media. More precisely: SYSLINUX is a small Linux operating system, which is intended to simplify the installation of Linux first time, and the establishment of repair or other special-purpose boot disks.

6.2 Copy iso mirror and vmlinux of /image/pxeboot/initrd.img to / var / lib / tftpboot / folder

# Cp /var/www/html/cdrom/images/pxeboot/{initrd.img,vmlinuz} / var / lib / tftpboot /

6.3 iso image copy of /isolinux/*.msg to / var / lib / tftpboot / folder

# Cp /var/www/html/cdrom/isolinux/*.msg / var / lib / tftpboot /

6.4 pxelinux.cfg a new directory in / var / lib / tftpboot / in

# Mkdir /var/lib/tftpboot/pxelinux.cfg

6.5 iso image in the / isolinux directory isolinux.cfg pxelinux.cfg copied to the directory, and change the file name to default

# Cp /var/www/html/cdrom/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default

6.6 modify the default file

# Vi /var/lib/tftpboot/pxelinux.cfg/default

default ks # is enabled by default 'label ks' marked boot kernel
prompt 1 # show 'boot:' prompt. When '0' is not prompt, it will directly start 'default' parameter specifies.
timeout 6 # before the user input timeout in 1/10 seconds.
display boot.msg # displays the path contents of a file, note the file. The default is in the / var / lib / tftpboot / directory. You can also specify bit similar '/install/boot.msg' this path + file name.
The documents show that after F1 boot.msg # Press 'F1' such key.
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux # 'label' you specified in the 'boot:' prompt enter the keyword, such as boot: linux [ENTER], this starts the kernel and initrd.img files under 'label linux' tag.
  kernel vmlinuz #kernel parameter specifies the start of the kernel.
  append initrd = initrd.img #append specify additional kernel parameters, parameters can be appended to the kernel in grub in use here also can be used.
label text
  kernel vmlinuz
  append initrd = initrd.img text
label ks
  kernel vmlinuz
  append ks = http: // initrd = initrd.img # tell the system where to get ks.cfg file
label local
  localboot 1
label memtest86
  kernel memtest
  append -
VII. Configuring DHCP

7.1 Installing the DHCP Service

# Yum -y install dhcp

7.2 Copy configuration template file to the DHCP configuration directory

# Cp -f /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf

7.3 /etc/dhcp/dhcpd.conf modify the configuration file, as follows:

ddns-update-style interim;
ignore client-updates;
filename "pxelinux.0"; #pxelinux startup file location;
next-server; IP address of #TFTP Server;

subnet netmask {

        option routers;
        option subnet-mask;

        range dynamic-bootp;
        default-lease-time 21600;
        max-lease-time 43200;
7.4 start the DHCP service

# /etc/init.d/dhcpd Start
Eight generate ks.cfg file

8.1 Kickstart installation

# Yum install system-config-kickstart

8.2 Configuration Kickstart desktop environment

Start X Windows environment

# Startx

Configuration Kickstart

# System-config-kickstart

A. Setting the language, keyboard, time zone, Root password, installed after the restart and the like.
B. Set installation, this article describes the installation of HTTP methods, so choose HTTP
C. Installation MBR
D. Set partition
E. Subdivision Overview
F. Configure Network
G. Authentication
H. SELinux and firewall configuration
I. graphical environment configuration
J. package installation options
K. Preview
L. generate ks.cfg file, stored in / var / www / html / folder
/var/www/html/ks.cfg We can open the file for viewing and making changes.

platform = x86, AMD64, or Intel EM64T
# Version = DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
# Use network installation
url --url = http: // # This option tells Setup: cdrom file server to the HTTP folder under the root directory of the installation media to find
# Root password
rootpw --iscrypted $ 1 $ vsvtP. / e $ 6PVMNfJd.shq2LgFJjYfA1
# System authorization information
auth --useshadow --enablemd5
# Use graphical install
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level = info
# Reboot after installation
# System timezone
timezone --isUtc Asia / Shanghai
# Network information
network --bootproto = dhcp --device = eth0 --onboot = on
# System bootloader configuration
key --skip
bootloader --append = "rhgb quiet" --location = mbr --driveorder = sda
# Clear the Master Boot Record
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part / --fstype = "ext4" --size = 8192
part swap --fstype = "swap" --size = 1024
part / home --fstype = "ext4" --size = 2048

% Packages

% End
Description: key --skip if Red Hat system, this option can skip entering the serial number of the process; if it is CentOS series, you can not retain the contents of this;

reboot This option must exist, it must also be set in the position paper, or kickstart displays a message and waits for the user to press any key after reboot;

clearpart --all --initlabel this command must be added, otherwise the system will let the user choose whether to clear all the data manually, which requires human intervention, and thus lead to an automated process to fail;

IX test installation

Automated Installation system configuration is complete, start following a new machine to test the network connection mode select NAT mode.

Start the virtual machine, select the card from the start, DHCP server is to assign IP addresses to clients.
- Ubuntu security settings and tools (Linux)
- Installing PHP Memcache extension under Linux (Server)
- To setup CentOS LAMP environment (Server)
- How to import JNI resulting .so libraries in Android Studio (Programming)
- Shuffle Process Arrangement in MapReduce (Server)
- Java string concatenation techniques (StringBuilder tips) (Programming)
- Install the free open source financial software GnuCash 2.6.6 under Ubuntu (Linux)
- Oracle RMAN backups of the control file backup (Database)
- Linux ps command (Linux)
- Five programming fallacy (Programming)
- RHEL6.4 one key installation Redmine (Linux)
- Text editing and viewing text Linux command (Linux)
- Shell scripts to copy all directories under the current directory of a certain type of file to the same directory (Linux)
- CentOS6.6 ordinary users to use sudo command to borrow root user privileges (Linux)
- KVM installation under CentOS 5.5 (Linux)
- Oracle lag () and lpad () function (Database)
- MySQL password on those things you should know (Database)
- Flask installation environment (Linux)
- Django template inheritance child (Programming)
- Internet proxy workaround can not be used under Linux YUM (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.