免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1454 | 回复: 0
打印 上一主题 下一主题

KICKSTART+NFS简明安装指南 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-14 17:40 |只看该作者 |倒序浏览
KICKSTART+NFS简明安装指南
硬件要求:
Client NIC支持pxe启动 或者用vmware5.0以上版本(bios中选pxe启动)
假定iso文件放在/opt/software/as4u1iso/目录,如我的
[root@develop ras4.1]# ll /opt/software/as4u1iso/
total 2205192
-rw-r--r--    1 root     root         1889 Dec 14 15:45 ks.cfg
-rw-r--r--    1 root     root     106455040 Sep 19 18:01 RHEL4-U1-Extras-i386.iso
-rw-r--r--    1 root     root     202643456 Sep 19 18:00 RHEL4-U1-i386-AS-disc1.iso
-rw-r--r--    1 root     root     657266688 Sep 19 17:40 RHEL4-U1-i386-disc2.iso
-rw-r--r--    1 root     root     666005504 Sep 19 17:31 RHEL4-U1-i386-disc3.iso
-rw-r--r--    1 root     root     623505408 Sep 19 17:29 RHEL4-U1-i386-disc4.iso
#mkdir -p /tftpboot/ras4.1/pxelinux.cfg
#mkdir  -p /mnt/cd1
#mount  -o loop /opt/software/as4u1iso/RHEL4-U1-i386-AS-disc1.iso /mnt/cd1
#cp  /mnt/cd1/isolinux/initrd.img  /tftpboot/ras4.1/
#cp  /mnt/cd1/isolinux/vmlinuz  /tftpboot/ras4.1/
#cp  /mnt/cd1/isolinux/isolinux.cfg  /tftpboot/ras4.1/pxelinux.cfg/
#以上三个文件都在iso文件中
#cp  /usr/lib/syslinux/pxelinux.0  /tftpboot/ras4.1/
#在任何一个已装好的redhat linux(版本>=9.0)中复制pxelinux.0到/tftpboot/ras4.1/
#编辑default文件
#cat /tftpboot/ras4.1/pxelinux.cfg/default
default autoinstall
prompt 1
timeout 3
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img
label autoinstall
  kernel vmlinuz
  append ksdevice=eth0 network  ks=nfs:10.5.17.37:/opt/software/as4u1iso/ks.cfg    vmlinuz=vmlinuz   initrd=initrd.img devfs=nomount   ramdisk_size=16384 nofb
设置tftpboot启动
[root@develop ras4.1]# cat /etc/xinetd.d/tftp
service tftp
{
        disable = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

TFTP设置完成
[root@develop ras4.1]# cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;

subnet 10.5.17.0 netmask 255.255.255.0 {

        option routers                  10.5.17.254;
        option subnet-mask              255.255.255.0;

        option time-offset              -18000; # Eastern Standard Time

        range dynamic-bootp 10.5.17.90 10.5.17.100;
        default-lease-time 21600;
        max-lease-time 43200;
        next-server 10.5.17.37;
        filename "/ras4.1/pxelinux.0";
}

DHCP设置完成
[root@develop ras4.1]# cat /etc/exports
/opt/software/as4u1iso       10.5.0.0/255.255.0.0(rw,async,no_root_squash)
NFS设置完成
#system-config-kickstart
建立ks.cfg
#cat /opt/software/as4u1iso/ks.cfg
lang en_US
langsupport zh_CN --default=en_US
keyboard us
timezone Asia/Shanghai
rootpw --iscrypted $1$WvFbqnpm$m94fa4AopXI/kfYOYbWMW. #我的初始密码123456
selinux --disabled
reboot
text
install
nfs --server=10.5.17.37  --dir=/opt/software/as4u1iso
bootloader --location=mbr
zerombr yes
clearpart --linux
auth  --useshadow  --enablemd5
firewall --disabled
skipx
%packages --resolvedeps
@everything
ks.cfg文件设置完成

启动kickstart
#service portmap  start
#service nfs start
#service xinetd start
#service dhcpd start

备注: 如果client网卡所连的是cisco交换机,则cisco交换机所接的client的switch port开端口快速转发模式,即
spanning-tree  portfast
做法如下所示:
Switch#conf t
Switch(config)#int f0/1
Switch(config-if)#spanning-tree portfast
Switch(config-if)#exit
Switch#wr
作者:yanyp  20051214日

[ 本帖最后由 yanyp 于 2005-12-14 22:00 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP