欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

kickstart+tftp 部署 redhat 系统

最编程 2024-03-09 19:08:36
...

kickstart+tftp部署redhat系统:

kickstart+tftp安装、配置略

mkdir /root/isorhel66

mount -t iso9660 -i -o ro,loop rhel-server-6.6-x86_64-dvd.iso /root/isorhel66/

mkdir /var/lib/tftpboot/RHEL66/

rsync -av --progress /root/isorhel66/isolinux/initrd.img /var/lib/tftpboot/RHEL66/

mkdir /var/www/html/ks/RHEL66

rsync -av --progress /root/isorhel66/* /var/www/html/ks/RHEL66/

redhat所需ks.cfg文件需先在1台redhat系统上生成(yum install system-config-kickstart,然后vnc下执行system-config-kickstart命令)

vi /var/lib/tftpboot/pxelinux.cfg/default

label 3. Install RHEL 6.6 x86_64

kernel RHEL66/vmlinuz
append ks=http://10.0.0.2/ks/ksrhel66.cfg initrd=RHEL66/initrd.img

:wq

cp -rv ksrhel66.cfg /var/www/html/ks/

vi /var/www/html/ks/ksrhel66.cfg (url、时区、selinux调整下,把软件选择部分手动加进来)

url --url="http://10.0.0.2/ks/rhel66/"

timezone Asia/Shanghai

selinux --disabled

clearpart --drives=sda --all ignoredisk --only-use=sda

%packages @base @core @desktop %end

reboot :wq

cat /var/www/html/ks/ksrhel66.cfg

#platform=x86, AMD64, or Intel EM64T #version=DEVEL #Firewall configuration firewall --disabled #Install OS instead of upgrade install #Use network installation url --url="http://10.0.0.2/ks/rhel66/" #Root password rootpw --iscrypted $1$lU3654aL$oT0PwZrSEbmsCBFyQHJ5M1 #System authorization information auth --useshadow --passalgo=sha512 #Use graphical install graphical firstboot --disable #System keyboard keyboard us #System language lang en_US #SELinux configuration selinux --disabled #Installation logging level logging --level=info

#System timezone timezone Asia/Shanghai #Network information network --onboot=on --device=eth0 --bootproto=dhcp #System bootloader configuration bootloader --location=mbr #Partition clearing information #clearpart --linux
clearpart --drives=sda --all ignoredisk --only-use=sda #Disk partitioning information part / --asprimary --fstype="ext4" --ondisk=sda --size=100000 part swap --fstype="swap" --ondisk=sda --size=10000

%packages @base @core @kde-desktop @x11 %end

reboot

附:

CentOS 6.5的ks.cfg(主要在桌面部分比redhat多个basic-desktop):

#platform=x86, AMD64, or Intel EM64T #version=DEVEL #Firewall configuration firewall --disabled #Install OS instead of upgrade install #Use network installation url --url="http://10.0.0.2/ks/centos65/" #Root password rootpw --iscrypted $1$lU3654aL$oT0PwZrSEbmsCBFyQHJ5M1 #System authorization information auth --useshadow --passalgo=sha512 #Use graphical install graphical firstboot --disable #System keyboard keyboard us #System language lang en_US #SELinux configuration selinux --disabled #Installation logging level logging --level=info

#System timezone timezone Asia/Shanghai #Network information network --onboot=on --device=eth0 --bootproto=dhcp #System bootloader configuration bootloader --location=partition #Partition clearing information #clearpart --linux
clearpart --drives=sda --all ignoredisk --only-use=sda #Disk partitioning information part / --asprimary --fstype="ext4" --ondisk=sda --size=100000 part swap --fstype="swap" --ondisk=sda --size=10000 --grow

%packages @base @core @basic-desktop @kde-desktop @x11 %end

reboot

推荐阅读