Chinaunix首页 | 论坛 | 博客
  • 博客访问: 423743
  • 博文数量: 136
  • 博客积分: 5351
  • 博客等级: 少校
  • 技术积分: 1446
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-29 15:46
文章存档

2013年(2)

2012年(18)

2011年(116)

分类: LINUX

2011-10-29 13:44:15

涉及到的服务   tftp   dhcp 

挂镜像
 
/var/lib/tftpboot     里面的内容

pxelinux.0  必须是你要部署对应的系统(什么发行版,32还是64的,都不能出错)

再就是  你的PC机要设置从网卡启动  支持pxe  如果网卡灯不亮,设置肯定出错了
1.安装配置dhcp
     dhcpd.conf:
allow bootp;
allow booting;
next-server     192.168.0.12;
filename        "pxelinux.0";
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.20 192.168.0.30;
  option domain-name-servers    192.168.0.12;
  option domain-name "example.com";
  option routers 192.168.0.12;
  default-lease-time 600;
  max-lease-time 86400;
  filename  "uplooking";       //第四步之后加上去的
}
host fantasia {
  hardware ethernet 08:00:07:26:c0:a5;
  fixed-address fantasia.fugue.com;
}


#service    dhcpd   start



2.  setup   192.168.0.12  255.255.255.0    192.168.0.1


3.以上可以检测一下dhcpd 服务的情况了


4.#   find   /  -name pxelinux.0   


   #    cp  /usr/share/syslinux/pxelinux.0     /usr/lib/syslinux/

[root@760 dhcp]# find   /  -name   pxelinux.0
/usr/share/syslinux/pxelinux.0
/usr/lib/syslinux/pxelinux.0
/var/lib/tftpboot/pxelinux.0


   #cp   /usr/share/syslinux/pxelinux.0      ./uplooking

5.  [root@760 dhcp]# find   /  -name   isolinux
/var/ftp/dvd/rhel6_64/isolinux


# cp   /var/ftp/dvd/rhel6_64/isolinux/*      /var/lib/tftpboot/

# mkdir   pxelinux.cfg



[root@760 dhcp]# cd  /var/lib/tftpboot/
[root@760 tftpboot]# ll
total 40076
-r--r--r--. 1 root root     2048 Oct 28 21:33 boot.cat
-r--r--r--. 1 root root       84 Oct 28 21:33 boot.msg
-r--r--r--. 1 root root      334 Oct 28 21:33 grub.conf
-r--r--r--. 1 root root 35505624 Oct 28 21:33 initrd.img
-r--r--r--. 1 root root    24576 Oct 28 21:33 isolinux.bin
-r--r--r--. 1 root root      954 Oct 28 21:33 isolinux.cfg    //mv   isolinux.cfg
 ./pxelinux.cfg/default
-r--r--r--. 1 root root   165080 Oct 28 21:33 memtest
-rw-r--r--. 1 root root    26828 Oct 28 21:38 pxelinux.0
drwxr-xr-x. 2 root root     4096 Oct 29 08:56 pxelinux.cfg
-r--r--r--. 1 root root  1236005 Oct 28 21:33 splash.jpg
-r--r--r--. 1 root root     2215 Oct 28 21:33 TRANS.TBL
-r--r--r--. 1 root root   162860 Oct 28 21:33 vesamenu.c32
-r-xr-xr-x. 1 root root  3881120 Oct 28 21:33 vmlinuz


6.[root@760 tftpboot]# cd   pxelinux.cfg/
[root@760 pxelinux.cfg]# ll
total 4
-r--r--r--. 1 root root 954 Oct 29 08:56 default
[root@760 pxelinux.cfg]# chmod  u+w   default
[root@760 pxelinux.cfg]# ll
total 4
-rw-r--r--. 1 root root 954 Oct 29 08:56 default



7.   chkconfig   tftp  on
 
    service    xinetd   start
 
    service   dhcpd   start



阅读(1690) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~