手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

CentOS6.3 x86_64搭建RHCE6实验环境

[日期:2012-12-25] 来源:Linux社区  作者:diggger [字体:大 中 小]

7.创建kickstart文件,用system-config-kickstart,保存文件为/var/ftp/pub/vtks.cfg,内容如下:
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="ftp://192.168.201.254/pub/CentOS6"
# Root password
rootpw --iscrypted $1$4GsqExZv$ObJLH8rkTqvC5umLLUH4q1
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone --isUtc Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="ext4" --size=100
part swap --fstype="swap" --size=1000
part / --fstype="ext4" --size=5000

%post
#Configure hostname
NUM=$(ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | cut -d. -f4)
if [ -z "$NUM" ]
then
echo -e "\033[31mWrong number, please check network settings\033[0m"
exit 2
else
echo -e "NETWORKING=yes" > /etc/sysconfig/network
echo -e "HOSTNAME=station$NUM.example.com" >> /etc/sysconfig/network
fi
#finished log
echo "Installation finished via ftp boot" >> /root/ftpboot-$(date +%Y-%m-%d).log
%end

10.最后重启下network,dhcpd,xinetd确保pxe环境都起来
service network restart
service network xinetd
service network dhcpd

11.好啦,找个客户机装下系统,记住进BIOS看看,确保网卡ROM的PXE功能打开。

总结:该PXE功能较简单,主要靠dhcp+tftp/vsftp+kickstart,且ftp中系统安装目录单一,做好每个版本

下设有x86,x64版本,还有没加入windows的安装项,也没用DNS服务因而直接使用了ip地址作为ftp服务确保安装过程不出错。

linux
相关资讯       RHCE6 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款