Centos 6.4 http nfs tftp pxe kickstart Automatic Installation System

Source: Internet
Author: User

1. Prepare the environment

Centos 6.4 x86_64 install graphical interface to run sysconfig-config-kickstart

Yum install Vim NTP man

Yum groupinstall "development tools" "server platform development" "desktop platform development"

Disable iptables SELinux

2. Mount the image file

Mkdir/Media/CDROM

Mount/dev/CDROM/Media/CDROM

3. Install the required software package

Yum install DHCP xinetd TFTP-server NFS * httpd syslinux system-config-kickstart

4. Configure the DHCP server

CP/usr/share/doc/dhcp-4.1.1/DHCPD. conf. Sample/etc/DHCP/DHCPD. conf

Vim/etc/DHCP/DHCPD. conf

# Option Definitions common to all supported networks...
Option domain-name "example.org ";
Option domain-name-servers 192.168.200.2;

Default-lease-time 600;
Max-lease-time 7200;

# Use this to enble/disable Dynamic DNS updates globally.
Ddns-Update-style none;

# If this DHCP server is the official DHCP server for the local
# Network, the authoritative directive shoshould be uncommented.
# Authoritative;

# Use this to send DHCP log messages to a different log file (you also
# Have to hack syslog. conf to complete the redirection ).
Log-facility local7;

Next-server 192.168.200.131;
Filename = "pxelinux.0 ";
# No service will be given on this subnet, but declaring it helps
# DHCP server to understand the network topology.

Subnet 192.168.200.0 netmask 255.255.255.0 {
Range 192.168.200.10 192.168.200.20;
Option routers 192.168.200.2;
}

5. Copy and install the core file and CD image required by the system.

CD/Media/CDROM/isolinux/

CP vmlinuz initrd. IMG boot. MSG splash.jpg/var/lib/tftpboot/

CP/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

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

CP/Media/CDROM/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/Default

6. Edit the default file

Vim/var/lib/tftpboot/pxelinux. cfg/Default

Label Linux
Menu label ^ install or upgrade an existing system
Menu default
Kernel vmlinuz
Append initrd = initrd. IMG ramdisk_size = 8192 Ks = http: // 192.168.200.131/KS. cfg

7. Configure the NFS server

Vim/etc/exports

/Media/CDROM 192.168.200.0/255.255.255.0 (RO, sync)

8. Start the httpd NFS xinetd TFTP service

Service httpd start

Service DHCPD start

Service rpcbind start

Service NFS start

Service xinetd start

Chkconfig httpd on

Chkconfig dchpd on

Chkconfig rpcbind on

Chkconfig NFS on

Chkconfig TFTP on

9. Run System-config-kickstart on the GUI (process omitted)

Create the KS. cfg file and move it to/var/www/html

# Platform = x86, amd64, or Intel em64t
# Version = devel
# Firewall Configuration
Firewall -- disabled
# Install OS instead of Upgrade
Install
# Use NFS installation media
NFS -- Server = 192.168.200.131 -- dir =/Media/CDROM
# Root Password
Rootpw -- iscrypted $1 $ fn7zgte9 $1am0upe8lztkamdzaglmy1
# System authorization information
Auth -- useshadow -- passalgo = sha512
# Use graphical install
Graphical
Firstboot -- disable
# System keyboard
Keyboard us
# System Language
Lang en_us
# SELinux Configuration
SELinux -- disabled
# 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

% Packages
@ Desktop-platform-devel
@ Development
@ Server-platform-devel

(If you do not select the installation package, you will be prompted to select the installation package)

# Disk partitioning Information
Part/boot -- fstype = "ext4" -- size = 500
Part/-- fstype = "ext4" -- size = 10000
Part swap -- fstype = "Swap" -- size = 2000
Part/data -- fstype = "ext4" -- grow -- maxsize = 1 -- size = 1

If you want to use LVM for disk partitioning, You can manually modify the configuration file.

Part/boot -- fstype = "ext4" -- size = 500
Part swap -- fstype = "Swap" -- size = 1000
Part pv.01 -- size = 1 -- grow
Volgroup vg_test -- pesize = 8192 pv.01 (you must add the-pesize parameter to specify the PE size)
Logvol/-- vgname = vg_test -- size = 8192 -- name = lv_root
Logvol/data -- vgname = vg_test -- size = 1000 -- name = lv_data

10 start the client

Centos 6.4 http nfs tftp pxe kickstart Automatic Installation System

Related Article

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.