RHEL7 under Pxe+ftp+kickstart unattended installation operating system

Source: Internet
Author: User

1. Configure the Yum source Vim/etc/yum.repos.d/development.repo[development]name=yum serverbaseurl=file:///mntenabled=1gpgcheck= 02. Mount the disc mount/dev/sr0/mnt3. Installing the related package yum install DHCP Syslinux xinetd tftp-server4. Configuration dhcpvim/etc/dhcp/ Dhcpd.conf5. Adding content subnet 192.168.1.0 netmask 255.255.255.0 {  range 192.168.1.91 192.168.1.120;   & nbsp;                                              //IP address pool   option Domain-name-servers 192.168.1.1;                                      //Network address   option Domain-name "internal.example.org";  option routers 192.168.1.1;                                                               //Gateway address   option broadcast-address 192.168.1.255;  next-server 192.168.1.31;                                                                 //FTP server address   filename "pxelinux.0";  default-lease-time 600;  max-lease-time 7200;} 6. Start the service and boot Systemctl start dhcpd.servicesystemctl enable Dhcpd.service7. Copy the startup file cd/var/lib/tftpboot/                                                                                                    #进入/var/lib/ tftpboot/cp/mnt/isolinux/initrd.img/var/lib/tftpboot                                                              #复制initrd. IMG to/var/lib/ Tftpboot directory under CP/MNT/ISOLINUX/VMLinuz/var/lib/tftpboot/                                                               #复制vmlinuz到/var/lib/tftpboot directory under cp/usr/share/syslinux/ pxelinux.0/var/lib/tftpboot/                                                #复制pxelinux. 0 to/var/lib/ Tftpboot directory under cp/mnt/isolinux/vesamenu.c32/var/lib/tftpboot/                                                   # Copy the VESAMENU.C32 to the/var/lib/tftpboot directory cp/mnt/isolinux/boot.msg/var/lib/tftpboot/                                                           #复制boot. Msg to/var/lib/ Tftpboot directory under cd/var/lib/tftpboot/                                                                                                  #进入/var/lib/tftpboot directory mkdir pxelinux.cfg                                                                                                  Create a pxelinux.cfg directory CD #在 the/var/lib/tftpboot directory pxelinux.cfg/                                                                                                      #进入pxelinux. CFG directory cp/mnt/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default                       #复制isolinux. CFG to pxelinux.cfg directory and named Defaultvim default                                                                                                            #在 /var/lib/tftpboot/pxelinux.cfg directory to modify the default file label pxe-linux  menu label ^install System from pxe-rhel7.0  Menu default  kernel vmlinuz  append initrd=initrd.img ks=ftp://192.168.1.31/ks.cfg ksdevice=eno16777736 ip= DHCP quiet8. Configuring Tftp-server Syslinuxvim/etc/xinetd.d/tftpservice 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                      = 2        flags                    = IPv4}9. Start service and boot Systemctl start Xinetd.servicesystemctl enable XINETD.SERVICE10. Installation Configuration vsftpyum-y Install vsftpd                        CP-RF/ mnt/*/var/ftp/pub/                     11. Start service systemctl start Vsftpdsystemctl enable VSFTPD12. No graphical interface configuration Kickstart one-click installation answer file VIM/ Var/ftp/ks.cfg#platform=x86, AMD64, or Intel em64t#version=devel# Install OS instead of upgradeinstall# Keyboard Layoutske Yboard ' Us ' # Reboot after installationreboot# Root passwordrootpw--iscrypted $1$fyasdjen$q2zudfvq.ln1fmilp8o/m0                        //root password for 7788521# System timezonetimezone asia/shanghai# Use network InstaLlationurl--url= "Ftp://192.168.1.31/pub" # System Languagelang en_us# Firewall configurationfirewall--disabled# Network informationnetwork --bootproto=dhcp--device=eno16777736# System Authorization informationauth -- useshadow --passalgo=sha512# Use graphical installgraphicalfirstboot--disable# SELinux configurationselinux-- disabled # System bootloader configurationbootloader--location=mbr# Clear the Master Boot recordzerombr# Partition Clearing Informationclearpart--all--initlabel# Disk partitioning informationpart swap--asprimary--fstype= "swap"-- Size=2048part/boot--asprimary--fstype= "XFS"--size=500part/--asprimary--fstype= "XFS"--grow--size=1 % Packages@base %end graphical system can be installed Kickstart1. Installing the Kickstartyum-y Install System-config-kickstart.noarch2. Start the Kickstart software system-config-kickstart13. Modify the SELinux status vim/etc/sysconfig/ Selinuxselinux=disabled14. Open Firewall service and port Firewall-cmd--permanent--add-service=dhcpfirewall-cmd--permanent-- Add-service=vsftpdfirewalL-cmd--permanent--add-port=69/udpfirewall-cmd--permanent--add-port=111/tcpfirewall-cmd--permanent--add-port= 111/udpfirewall-cmd--permanent--add-port=20048/tcpfirewall-cmd--permanent--add-port=20048/udpfirewall-cmd-- Reload

RHEL7 under Pxe+ftp+kickstart unattended installation operating system

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.