Centos6/7来网络引导(pxe)安装centos
2015-09-29 18:18
549 查看
在网上也找了很多教程然后综合一下
1、需要安装的程序
tftp-server、dhcp、syslinux
2、安装和配置程序
yum install dhcp tftp-server syslinux
简单配置一下dhcp,vim /etc/dhcp/dhcp.c
注意:1、因为我的tftp也在本机所以next-server可以注释,filename是tftp的根目录到pxelinux.0。
2、注意网段,如果你的局域网有dhcp我建议以就设置在同一个网段
配置tftp,vim /etc/xinetd.d/tftp
注意:1、disable =no
拷贝文件到tftp中去
挂载光盘:mount /dev/cdrom /mnt
拷贝文件:cp /mnt/isolinux/* /var/lib/tftpboot/centos/6/isolinux/
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/centos/6/isolinux/
创建一个目录mkdir /var/lib/tftpboot/centos/6/isolinux/pxelinux.cfg
拷贝配置:cp /var/lib/tftpboot/centos/6/isolinux/isolinux.cfg /var/lib/tftpboot/centos/6/isolinux/pxelinux.cfg/default
注意:1、centos/6/isolinux是我自己创建的目录
启动服务
1、centos6
service dhcpd restart
service tftp restart
2、centos7
systemctl restart dhcpd
systemctl restart tftp
注意:1、手动打的字如果有错,请提一下,我可以修改。谢谢
1、需要安装的程序
tftp-server、dhcp、syslinux
2、安装和配置程序
yum install dhcp tftp-server syslinux
简单配置一下dhcp,vim /etc/dhcp/dhcp.c
option domain-name "example.org"; option domain-name-servers 61.139.2.69; default-lease-time 600; max-lease-time 7200; # Use this to enble / disable dynamic dns updates globally. #ddns-update-style none; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. #subnet 172.20.128.0 netmask 255.255.255.0{ # range 172.20.128.200 172.20.128.220; # option routers 172.20.128.1; # netxt-server 172.20.28.1; # filename "pxelinux.0"; #} subnet 192.168.139.0 netmask 255.255.255.0{ range 192.168.139.200 192.168.139.220; option routers 192.168.139.208; #next-server 192.168.139.208; filename "centos/6/isolinux/pxelinux.0"; }
注意:1、因为我的tftp也在本机所以next-server可以注释,filename是tftp的根目录到pxelinux.0。
2、注意网段,如果你的局域网有dhcp我建议以就设置在同一个网段
配置tftp,vim /etc/xinetd.d/tftp
service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 }
注意:1、disable =no
拷贝文件到tftp中去
挂载光盘:mount /dev/cdrom /mnt
拷贝文件:cp /mnt/isolinux/* /var/lib/tftpboot/centos/6/isolinux/
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/centos/6/isolinux/
创建一个目录mkdir /var/lib/tftpboot/centos/6/isolinux/pxelinux.cfg
拷贝配置:cp /var/lib/tftpboot/centos/6/isolinux/isolinux.cfg /var/lib/tftpboot/centos/6/isolinux/pxelinux.cfg/default
注意:1、centos/6/isolinux是我自己创建的目录
启动服务
1、centos6
service dhcpd restart
service tftp restart
2、centos7
systemctl restart dhcpd
systemctl restart tftp
注意:1、手动打的字如果有错,请提一下,我可以修改。谢谢
相关文章推荐
- iOS开发工具——网络封包分析工具Charles
- GET和POST有什么区别?
- 基本的TCP编程
- HTTP协议详解(版本二)
- HTTP协议详解(版本一)
- 2015合肥网络赛 HDU 5489 Removed Interval LIS+线段树(树状数组)
- nonce和timestamp在Http安全协议中的作用
- android网络通讯数据封装之 json
- iOS 的 ASIHTTPRequest 类库简介和使用说明
- tcpdump详解
- IOS项目实战-登录解析(Http请求) ASIHttpRequest
- TCP/IP协议族
- RTP与RTCP协议介绍
- [转载]移动网络游戏实现流程——并借此阐明pomelo在GitHub上各个项目间的关系
- Linux tcpdump命令详解 http://www.cnblogs.com/ggjucheng/archive/2012/01/14/2322659.html
- linux中shell curl命令获取http状态码
- Android中封装Http请求
- HttpSession的线程安全问题及注意事项
- AFN 请求数据https
- Android HTTP请求方式:HttpClient