In RHEL7, PXE + Apache + Kickstart is used to install the operating system unattended and rhel7kickstart is used.

Source: Internet
Author: User

In RHEL7, PXE + Apache + Kickstart is used to install the operating system unattended and rhel7kickstart is used.

PXE + Apache + Kickstart unattended operating system installation in RHEL7

1. Configure the yum Source

Vim/etc/yum. repos. d/development. repo

[Development] name = yum serverbaseurl = file: // mntenabled = 1 gpgcheck = 02. mount the disc mount/dev/sr0/mnt3. install the related software package yum install dhcp syslinux xinetd tftp-server4. configure dhcpvim/etc/dhcp/dhcpd. conf5. add subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.121 192.168.1.200; // ip address pool option domain-name-servers 192.168.1.1; // gateway 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.32; // Apache server address filename "pxelinux.0"; default-lease-time 600; max-lease-time 7200 ;} 6. start the service and start the systemctl start dhcpd. service
Systemctl enable dhcpd. service 7. Copy the Startup File cd/var/lib/tftpboot/# Enter/var/lib/tftpboot/
Cp/mnt/isolinux/initrd. img/var/lib/tftpboot # copy initrd. img to the/var/lib/tftpboot directory
Cp/mnt/isolinux/vmlinuz/var/lib/tftpboot/# copy vmlinuz to the/var/lib/tftpboot directory
Cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/# copy pxelinux.0 to the/var/lib/tftpboot directory
Cp/mnt/isolinux/vesamenu. c32/var/lib/tftpboot/# copy vesamenu. c32 to the/var/lib/tftpboot directory
Cp/mnt/isolinux/boot. msg/var/lib/tftpboot/# copy boot. msg to the/var/lib/tftpboot directory
Cd/var/lib/tftpboot/# Go to the/var/lib/tftpboot directory
Mkdir pxelinux. cfg # create the pxelinux. cfg directory in the/var/lib/tftpboot directory
Cd pxelinux. cfg/# enter the pxelinux. cfg directory
Cp/mnt/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/default # copy isolinux. cfg to the pxelinux. cfg directory and name it "default ".
Vim default # in/var/lib/tftpboot/pxelinux. label PXE-linux menu label ^ Install System from PXE-RHEL7.0 menu default kernel vmlinuz append initrd = initrd. img ks = http: // 192.168.1.32/ks. cfg ksdevice = eno16777736 ip = dhcp quiet8. configure tftp-server syslinuxservice 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} 9. start the service and start the systemctl start xinetd. service
Systemctl enable xinetd. service10. install and configure httpdyum-y install httpdmkdir/var/www/html/iso cp-rf/mnt/*/var/www/html/iso 11. start systemctl start httpd
Systemctl enable httpd12. no graphical interface configuration kickstart one-click installation of the response file vim/var/www/html/ks. cfg # platform = x86, AMD64, or Intel EM64T # version = DEVEL # Install OS instead of upgradeinstall # Keyboard layoutskeyboard 'us' # Reboot after installationreboot # Root passwordrootpw -- iscrypted $1 $ FyasdJen $ q2zUDfVq. ln1FmIlP8O/m0 // the root password is 7788521 # System timezonetimezone Asia/Shanghai # Use network installationurl -- url = "http: // 192.168.1.32/iso "# System events agelang en_US # Firewall configurationfirewall -- disabled # Network informationnetwork -- bootproto = dhcp -- device = eno16777736 # System authorization ionionauth -- useshadow -- passalgo = sha512 # Use graphical -- disable # SELinux configurationselinux -- disabled # System bootloader configurationbootloader -- location = mbr # Clear the Master Boot Loader # Partition clearing informationclearpart -- all -- initlabel # Disk partitioning informationpart swap -- asprimary -- fstype =" swap "-- size = 2048 part/boot -- asprimary -- fstype =" xfs "-- size = 500 part/-- asprimary -- fstype =" xfs "-- grow -- size = 1% packages @ base @ compat-libraries @ core % end a graphical system can install Kickstart to produce ks. cfg file yum-y install system-config-kickstart.noarch system-config-kickstart13. modify SELinux status vim/etc/sysconfig/selinux
SELINUX = disabled14. open firewall service and port firewall-cmd -- permanent -- add-service = dhcpfirewall-cmd -- permanent -- add-service = httpfirewall-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

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.