本文共 2913 字,大约阅读时间需要 9 分钟。
kickstart+tftp部署redhat系统:
kickstart+tftp安装、配置略
redhat所需ks.cfg文件需先在1台redhat系统上生成(yum install system-config-kickstart,然后vnc下执行system-config-kickstart命令)
label 3. Install RHEL 6.6 x86_64
kernel RHEL66/vmlinuzappend ks=http://10.0.0.2/ks/ksrhel66.cfg initrd=RHEL66/initrd.img
:wq
url --url=""
timezone Asia/Shanghai
selinux --disabled
clearpart --drives=sda --all
ignoredisk --only-use=sda%packages
reboot
:wq#platform=x86, AMD64, or Intel EM64T
#version=DEVEL#Firewall configurationfirewall --disabled#Install OS instead of upgradeinstall#Use network installationurl --url=""#Root passwordrootpw --iscrypted $1$lU3654aL$oT0PwZrSEbmsCBFyQHJ5M1#System authorization informationauth --useshadow --passalgo=sha512#Use graphical installgraphicalfirstboot --disable#System keyboardkeyboard us#System languagelang en_US#SELinux configurationselinux --disabled#Installation logging levellogging --level=info#System timezone
timezone Asia/Shanghai#Network informationnetwork --onboot=on --device=eth0 --bootproto=dhcp#System bootloader configurationbootloader --location=mbr#Partition clearing information#clearpart --linux clearpart --drives=sda --allignoredisk --only-use=sda#Disk partitioning informationpart / --asprimary --fstype="ext4" --ondisk=sda --size=100000part swap --fstype="swap" --ondisk=sda --size=10000%packages
reboot
附:
CentOS 6.5的ks.cfg(主要在桌面部分比redhat多个basic-desktop):
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL#Firewall configurationfirewall --disabled#Install OS instead of upgradeinstall#Use network installationurl --url=""#Root passwordrootpw --iscrypted $1$lU3654aL$oT0PwZrSEbmsCBFyQHJ5M1#System authorization informationauth --useshadow --passalgo=sha512#Use graphical installgraphicalfirstboot --disable#System keyboardkeyboard us#System languagelang en_US#SELinux configurationselinux --disabled#Installation logging levellogging --level=info#System timezone
timezone Asia/Shanghai#Network informationnetwork --onboot=on --device=eth0 --bootproto=dhcp#System bootloader configurationbootloader --location=partition#Partition clearing information#clearpart --linux clearpart --drives=sda --allignoredisk --only-use=sda#Disk partitioning informationpart / --asprimary --fstype="ext4" --ondisk=sda --size=100000part swap --fstype="swap" --ondisk=sda --size=10000 --grow%packages
reboot
转载于:https://blog.51cto.com/yangzhiming/2047226