开发者社区> 科技探索者> 正文

Redhat 6 install tftp+kickstart

简介:
+关注继续查看

Redhat 6 install tftp+kickstart:

redhat 6:

yum install httpd tftp-server syslinux-nonlinux

cp -rv /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

vi /etc/xinetd.d/tftp

disable         = no  (默认为yes

:wq

/etc/init.d/xinetd restart

netstat -ntplu | grep :69

mkdir /root/isorhel66

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

mkdir /tftpboot/RHEL66/

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

rsync -av --progress /root/isorhel66/isolinux/vmlinuz /var/lib/tftpboot/RHEL66/

mkdir /var/lib/tftpboot/pxelinux.cfg

rsync -av /root/isorhel66/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default

rsync -av /root/isorhel66/isolinux/vesamenu.c32 /var/lib/tftpboot/

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 /tftpboot/linux-install/pxelinux.cfg/default

label 1. 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

%packagesbr/>@base
@core
br/>@kde-desktop
@x11
%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 --grow

%packagesbr/>@base
@core
br/>@kde-desktop
@x11
%end

reboot

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/2047551如需转载请自行联系原作者


yangzhimingg

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
文章
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载