Kickstart:RHEL5U10
没有过多的说明,正如题所示,本文罗列关于自动化部署RHEL5U10的时候需要的Kickstart脚本的代码:
ks.cfg:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
[root@PXEServer ~]# cat /addition_storage/kickstart/ks_for_rhel5u10.cfg # Kickstart file automatically generated by anaconda. # Install OS Instead of upgrade install # Use NFS Installation media nfs --server=192.168.184.132 --dir=/addition_storage/media_store/os/linux/rhel/RHEL5/64/ # About Keyborad key --skip keyboard us # System Language lang en_US.UTF-8 # X Window System Configuration Info xconfig --defaultdesktop=GNOME --depth=32 --resolution=1024x768 # Use graphical Install graphical # No firewall #firewall --enabled --port=22:tcp firewall --disabled # System authorization Info authconfig --useshadow --enablemd5 # No SELinux #selinux --enforcing selinux --disabled # Timezone is Asia China Shanghai #timezone --utc America/Los_Angeles timezone --isUtc Asia/Shanghai # System bootloader Configuration bootloader --location=mbr --driveorder=sda --append="rhgb quiet" # Network Info network --bootproto=dhcp --device=eth0 --onboot=on --hostname cobbler-server --nameserver 114.114.114.114 --netmask 255.255.255.0 --gateway 192.168.184.2 # Reboot after install reboot # Root Password rootpw --iscrypted $1$o4AKX7/J$C8mSQkO75hKbv3WwS8LuL1 # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work clearpart --all --initlabel part /boot --fstype ext3 --size=300 part / --fstype ext3 --size=3000 --grow part swap --size=1000 --grow --maxsize=5952 # Clear the Master Boot Record #zerombr # Partition clearing info #clearpart --all --initlabel %packages @X Window System @GNOME Desktop Environment @Graphical Internet @Development Tools python %post --interpreter=/bin/bash ( # Linux Service chkconfig sendmail off echo "chkconfig:: Disable sendmail" # YUM config cat <<EOF > /etc/yum.repos.d/rhel5.repo [Server] name=Server baseurl=ftp://192.168.184.132/media_store/os/linux/rhel/RHEL5/64/Server gpgcheck=0 [VT] name=VT baseurl=ftp://192.168.184.132/media_store/os/linux/rhel/RHEL5/64/VT gpgcheck=0 [Cluter] name=Cluster baseurl=ftp://192.168.184.132/media_store/os/linux/rhel/RHEL5/64/Cluster gpgchech=0 [ClusterStorage] name=ClusterStorage baseurl=ftp://192.168.184.132/media_store/os/linux/rhel/RHEL5/64/ClusterStorage gpgcheck=0 EOF # YUM conf sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf ) 2>&1 > /root/kickstart_post_script.log [root@PXEServer ~]# |
更多内容可以参阅:
OSC:http://git.oschina.net/memorycache/open-linux-script/tree/master/Adamhuan_PXE_Server
GITHUB:https://github.com/adamhuan/linux-script/tree/master/Adamhuan_PXE_Server
————————————————————
Done。