RHEL7 under Pxe+apache+kickstart unattended installation operating system

Source: Internet
Author: User

RHEL7 under Pxe+apache+kickstart unattended installation operating system

1. Configure the Yum source

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

[Development]name=yum serverbaseurl=file:///mntenabled=1gpgcheck=02. Mount Disc mount/dev/sr0/mnt3. Install related packages Yum install DHCP syslinux xinetd tftp-server4. Configure Dhcpvim/etc/dhcp/dhcpd.conf5. Add content subnet 192.168.1.0 netmask 255.255.255.0 {  Range 192.168.1.121 192.168.1.200;                          ,         &NB Sp            //IP address pool   option domain-name-servers 192.168.1.1;                          ,         &NB Sp    //gateway address   option Domain-name "internal.example.org";  option routers 192.168.1.1;                          ,         &NB Sp                        //gateway address   option broadcast-address 192.168.1.255;  Next-server 192.168.1.32;                          ,         &NB Sp                          //apache server address   filename "px elinux.0 ";  default-lease-time 600;  max-lease-time 7200;}  6. Start service and boot Systemctl start Dhcpd.service
Systemctl enable Dhcpd.service 7. Copy the startup file cd/var/lib/tftpboot/ #进入/var/lib/tftpboot/
Cp/mnt/isolinux/initrd.img/var/lib/tftpboot #复制initrd. img to/Var Under the/lib/tftpboot directory
cp/mnt/isolinux/vmlinuz/var/lib/tftpboot/#复制vmlinuz到/var/lib Under the/tftpboot directory
cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/#复制pxelinux. 0 to/var/lib/ Under the Tftpboot directory
cp/mnt/isolinux/vesamenu.c32/var/lib/tftpboot/#复制vesamenu. C32 to/var/lib Under the/tftpboot directory
cp/mnt/isolinux/boot.msg/var/lib/tftpboot/#复制boot. Msg to/var/lib/t Under the Ftpboot directory
cd/var/lib/tftpboot/#进入/var/lib Under the/tftpboot directory
mkdir pxelinux.cfg #在/var/lib/t Create pxelinux.cfg directory under Ftpboot directory
CD pxelinux.cfg/#进入pxelinux The. CFG Directory
Cp/mnt/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default #复制isolinux. CFG to pxelinux.cfg directory Under and named Default
Vim default                               &NBSP ;                          ,         &NB Sp                          /var/lib     #在 Modify the default file in the/tftpboot/pxelinux.cfg directory Add Content: 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. Configuring Tftp-server syslinuxservice tftp{        socket_type              = dgram        protocol                = udp         WAIT   &NBsp;                = yes         user                     = root        server                   =/usr/sbin/in.tftpd         server_args              =-s/var/lib/tftpbootDisable = noPer_source = one CPS = 2 flags = ipv4}9. Start service and power on self-boot Syst Emctl Start Xinetd.service
Systemctl enable XINETD.SERVICE10. Installation configuration httpdyum-y Install Httpdmkdir/var/www/html/iso cp-rf/mnt/*/V Ar/www/html/iso 11. Start Service Systemctl start httpd
Systemctl enable HTTPD12. No graphical interface configuration Kickstart one-click installation answer 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 password ROOTPW--iscrypted $1$fyasdjen$q2zudfvq.ln1fmilp8o/m0                       //root password for 7788521# System Timezonetimezone asia/shanghai# Use network installationurl--url= "Http://192.168.1.32/iso" # 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--f Stype= "XFS"--size=500part/--asprimary--fstype= "XFS"--grow--size=1 %packages@base@compat-libraries@core% End has a graphical system can be installed Kickstart production ks.cfg file yum-y install system-config-kickstart.noarch  system-config-kickstart13. Modifying the 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

RHEL7 under Pxe+apache+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.