Install Centos7.1 on the PXE Server

Source: Internet
Author: User

Install Centos7.1 on the PXE Server

Previously, the PXE Server configured with Centos6. * automatically installs the system. Recently, the company needs to deploy Centos7.1, which has many problems. Introduction to the installation and testing environment: two physical servers are deployed in the same network segment. The firewall is disabled, one is used to install the pxe Server, and the other is tested. The NIC has pxe boot. The following components must be installed on the pxe Server: 1. dhcp server 2. tftp Server 3. http server (or ftp nfs). Note: The dhcp server listens to the NIC that communicates with the test server. Pxe configuration steps: 1. install the installation package yum install dhcp tftp-server syslinux wget vsftpd2. configure dhcp Service vim/etc/DHCP. conf
## DHCP Server Configuration file.#    Generate by OS install server,don't edit by hand please.#    Generate at 20150915153619# log-facility local4;ddns-update-style none;subnet 10.254.4.0 netmask 255.255.255.0 {     default-lease-time 1200;     max-lease-time 1200;     option subnet-mask 255.255.255.0;     option domain-name local;     option domain-name-servers 10.254.4.250;     option routers 10.254.4.250;     next-server 10.254.4.250;     group "local" {         host compute-04-01-48.local {             hardware ethernet 6c:92:bf:0c:e5:a7;             option host-name "compute-04-01-48.local";             fixed-address 10.254.4.48;             filename "pxelinux.0";         }     }}
3. Configure the tftp Server vi/etc/xinet. d/tftp
service tftp{        socket_type             = dgram        protocol                = udp        wait                    = yes        user                    = root        server                  = /usr/sbin/in.tftpd        server_args             = -s /tftpboot/pxelinux        instances               = 1        per_source              = 11        cps                     = 1000 2        flags                   = IPv4        disable                 = no}
4. set the network boot file mkdir-p/tftpboot/pxelinuxchmod 777/tftpboot/pxelinuxcp-v/usr/share/syslinux/pxelinux of the tftp server. 0/tftpbootcp-v/usr/share/syslinux/menu. c32/tftpbootcp-v/usr/share/syslinux/memdisk/tftpbootcp-v/usr/share/syslinux/mboot. c32/tftpbootcp-v/usr/share/syslinux/chain. c32/tftpbootmkdir/tftpboot/pxelinux. 5. Hanging on centos isomount CentOS-7-x86_64-DVD-1503-01.iso/mnt/mediamkdir/home/apache/centos7.1sync-av/mnt/media/home/apache/centos7.16. create kickstart file vim/home/apache/centos7.1/ks. cfg
# Kickstart file automatically generated by anaconda.firewall --disabledinstallurl --url http://10.254.4.46/centos7.1#bootloader --location=mbr --driveorder=sda#clearpart --all --initlabel#clearpart --all --initlabel --drives=sda#zerombr yesselinux --disablerebootkeyboard uslang en_US.UTF-8timezone --utc Asia/Shanghaiauthconfig --enableshadow --enablemd5rootpw qwe123graphicalfirstboot disablenetwork --bootproto=dhcp --device=enp8s0f0 --onboot=on#part  /boot  --fstype ext4 --size=1024 --ondrive=sda#part swap --size=2048 --ondrive=sda#part / --fstype ext4 --size=1 --grow --ondrive=sdabootloader location=mbrclearpart --all --initlabelpart biosboot --fstype=biosboot --size=1 part swap --asprimary --fstype="swap" --size=1024part /boot --fstype xfs --size=800part pv.01 --size=1 --growvolgroup rootvg01 pv.01logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --growxconfiguser --name=admin --password=123456  --homedir=/home/admin%packages@base@core@development@backup-server@directory-server@ftp-server@identity-management-server@mail-server@network-server@print-server#@system-management-messaging-server@web-server*boost**gcc**gdb**cmake**libaio-devel**rsync**libicu**expect**glibc*@virtualization*%end
7. Create the pxe menu file vim/tftpboot/pxelinux. cfg/default
default menu. c32prompt 0timeout 30MENU TITLE unixme. com PXE MenuLABEL centos7_x64MENU LABEL CentOS 7 X64KERNEL /netboot/vmlinuzAPPEND inst.ks=http://10.254.4.46/centos7.1/ks.cfg devfs=nomount ramdisk_size=9216 inst.repo=http://10.254.4.46/centos7.1/ ksdevice=enp8s0f0 nomodeset inst.stage2=http://10.254.4.46/centos7.1/
8. modify http. conf: Add <Directory "/home/apache"> Options Indexes FollowSymLinks AllowOverride None Order allow, deny Allow from all </Directory> 9 at the end of DocumentRoot "/home/apache. set the restart chkconfig dhcpd on chkconfig xinetd on chkconfig httpd on10. restart the Service httpd restart service dhcpd restart service xinetd restart11. restart the server to go to the operating system installation references.

Https://fedoraproject.org/wiki/Anaconda/Kickstart/zh-cn
Https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst

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.