標籤:linux一鍵安裝 pxe
#安裝配置DHCPyum -y install dhcpcp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.confvim /etc/dhcp/dhcpd.conf subnet 192.168.3.0 netmask 255.255.255.0 { range 192.168.3.100 192.168.3.200; option domain-name-servers server.example.com; option domain-name "8.8.8.8"; option routers 192.168.3.1; option broadcast-address 192.168.3.255; next-server 192.168.3.100; filename "pxelinux.0"; default-lease-time 60000; max-lease-time 720000;}service dhcpd startchkconfig dhcpd on#配置xinetd伺服器yum -y install syslinux tftp-servervim /etc/xinetd.d/tftpdisable=noservice xinetd startchkconfig xinetd on#拷貝引導檔案cd /var/lib/tftpboot cp /mnt/isolinux/* .cp /usr/share/syslinux/pxelinux.0 .mkdir pxelinux.cfgcd pxelinux.cfgcp /mnt/isolinux/isolinux.cfg ./default vim default label Install RHEL6.5 kernel vmlinuz append initrd=initrd.img ks=nfs:192.168.3.100:/var/lib/tftpboot/ks.cfg #配置NFS服務yum -y install nfs* mkdir /rhel6mount /dev/cdrom /rhel6vim /etc/exports /rhel6 192.168.3.0/24(rw,sync)service nfs startchkconfig nfs onyum -y install system-config-kickstgartsystem-config-kickstart#建立一鍵安裝指令碼#手動寫入指令碼#platform=x86, AMD64, or Intel EM64T#version=DEVEL# Firewall configurationfirewall --disabled# Install OS instead of upgradeinstall# Use NFS installation medianfs --server=192.168.3.100 --dir=/mnt# Root passwordrootpw --iscrypted $1$3X.jwnPp$90YJQkQsBqTdL4aPRsgKc/# System authorization informationauth --useshadow --passalgo=sha512# Use graphical installgraphicalfirstboot --disable# System keyboardkeyboard us# System languagelang en_US# SELinux configurationselinux --enforcing# Installation logging levellogging --level=info# Reboot after installationreboot# System timezonetimezone --isUtc Asia/Shanghai# Network informationnetwork --bootproto=dhcp --device=eth0 --onboot=on# System bootloader configurationbootloader --location=mbr# Clear the Master Boot Recordzerombr# Partition clearing informationclearpart --all --initlabel# Disk partitioning informationpart /boot --fstype="ext4" --size=200part / --fstype="ext4" --grow --size=1%packages@basic-desktop@desktop-debugging@desktop-platform@fonts@general-desktop@graphical-admin-tools@input-methods@kde-desktop@legacy-x@remote-desktop-clients@x11%end
本文出自 “吳善強” 部落格,請務必保留此出處http://shanqiangwu.blog.51cto.com/8067564/1653988
CentOS 6.5 PXE一鍵安裝Linux作業系統