Unattended installation with PXE+KICKSTART+APACHE+DHCP on CentOS6

Source: Internet
Author: User

Unattended installation with PXE+KICKSTART+APACHE+DHCP on CentOS6

1.PXEServer:
os:centos6.9
ip:172.16.25.69;

(1) Apache;
# Mount/dev/cdrom/media/cdrom
# yum Install Httpd-y
# vim/etc/httpd/conf/httpd.conf
......
Listen 172.16.25.69:80
DocumentRoot "/media"
<directory "/media" >
......
#/ETC/INIT.D/HTTPD Start
# ELinks http://172.16.25.69

(2) TFTP;
# yum Install Tftp-server xinetd-y
# CD/ETC/XINETD.D
# CP Tftp{,.bak}
Vim/etc/xinetd.d/tftp
......
Server_args =-s/tftpboot
Disable = no
......
# Chkconfig TFTP on
#/etc/init.d/xinetd Start

(3) DHCP;
# yum Install Dhcp-y
# vim/etc/dhcp/dhcpd.conf
Subnet 172.16.25.0 netmask 255.255.255.0 {
Range 172.16.25.101 172.16.25.200;
Option Broadcast-address 172.16.25.255;
Default-lease-time 600;
Max-lease-time 7200;
Next-server 172.16.25.69;
FileName "pxelinux.0";
}
#/ETC/INIT.D/DHCPD Start

(4) Kickstart;
# Mkdir-pv/tftpboot
# yum Install Syslinux-y
# Cp/usr/share/syslinux/pxelinux.0/tftpboot
# cp-a/media/cdrom/images/pxeboot/initrd.img/tftpboot
# cp-a/media/cdrom/images/pxeboot/vmlinuz/tftpboot
# mkdir-pv/tftpboot/pxelinux.cfg
# Cp/media/cdrom/isolinux/isolinux.cfg/tftpboot/pxelinux.cfg/default
# chmod 644/tftpboot/pxelinux.cfg/default

# Vim Pxelinux.cfg/default
Default Linux
......
Label Linux
Menu label ^install or upgrade an existing system
Menu default
Kernel Vmlinuz
Append initrd=initrd.img ks=http://172.16.25.69/ks.cfg

# yum Install System-config-kickstart-y
Run System-config-kickstart with Xstart & save Ks.cfg To/media

# Cat Ks.cfg


#platform =x86, AMD64, or Intel EM64T
#version =devel
# Firewall Configuration
Firewall--disabled
# Install OS instead of upgrade
Install
# Use Network Installation
URL--url= "http://172.16.25.69/cdrom/"
# Root Password
ROOTPW--plaintext 111111
# System Authorization Information
Auth--useshadow--passalgo=sha512
# Use text mode install
Text
# System Keyboard
Keyboard US
# System Language
Lang en_US
# SELinux Configuration
SELinux--disabled
# Do not configure the X Window System
Skipx
# Installation Logging Level
Logging--level=info
# Reboot after installation
Reboot
# System TimeZone
TimeZone Asia/shanghai
# Network Information
Network--bootproto=dhcp--device=eth0--onboot=on
# System Bootloader Configuration
Bootloader--LOCATION=MBR
# Clear the Master Boot Record
Zerombr
# Partition Clearing Information
Clearpart--all--initlabel
# Disk Partitioning Information
Part/boot--asprimary--fstype= "Ext4"--size=300
Part swap--fstype= "swap"--size=1024
Part/--fstype= "EXT4"--grow--size=1

%packages
@development
@server-platform
Git

%end


2.PXEClient:
CentOS6.9

Unattended installation with PXE+KICKSTART+APACHE+DHCP on CentOS6

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.