一、安装和配置tftp服务

1、安装tftp-hpa

ipkg install tftp-hpa
 
 

 

tftp-hpa主要的配置文件有两个:

/opt/etc/xinetd.conf

/opt/etc/xinetd.d/tftp

前者的内容如下,基本无需作任何修改:

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Sample configuration file for xinetd defaults
{
only_from = localhost 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
instances = 60
log_type = SYSLOG authpriv info
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
} includedir /opt/etc/xinetd.d

后者的内容如下:

#
# ftp://ftp.kernel.org/pub/software/network/tftp/
#
service tftp
{
flags = REUSE
socket_type = dgram
protocol = udp
instances = 30
wait = yes
user = root
server = /opt/sbin/in.tftpd
server_args = -s /opt/tftpboot
cps = 100 2
log_on_success = HOST PID
log_on_failure = HOST
disable = no
}

一般只需要server_args这个参数值,它定义tftp服务的默认工作目录。

2、配置tftp服务

               2.1   设置tftp工作目录

      先在根目录下建立工作目录tftpboot

mkdir /tftpboot

      修改配置文件/opt/etc/xinetd.d/tftp,将server_args的值改为/tftpbooot.

               2.2   建立tftp配置文件目录

     先在tftp工作目录下,建立配置文件目录

mkdir -p /tftpboot/pxelinux.cfg

    再创建一个配置文件

vi /tftpboot/pxelinux.cfg/default

    文件内容如下:

default menu.c32

prompt 0
timeout 50
ONTIMEOUT localboot MENU TITLE PXE Menu LABEL localboot
MENU LABEL Boot From Hard Disk
LOCALBOOT 0 LABEL CentoS 5.4 i386 Installer
MENU LABEL CentOS 5.4 i386 Installer
KERNEL images/centos/i386/5.4/vmlinuz
append vga=normal initrd=images/centos/i386/5.4/initrd.img ramdisk_size=32768

3、启动tftp服务

/opt/etc/init.d/S10xinetd
 
如果无法启动,可查看/var/log/message寻找原因进行排除。

二、安装和配置DHCP服务

1、安装dhcp服务

ipkg install dhcp

2、配置dhcp服务

dhcp服务的配置文件为:/opt/etc/dhcpd.conf

先备份一下

cp /opt/etc/dhcpd.conf /opt/etc/dhcpd.conf.bak
 
打开dhcpd.conf
vi /opt/etc/dhcpd.conf
 
输入以下内容:
 
 

要配合PXE引导,dhcp的配置文件中必须包含以下几行配置

allow booting;
allow bootp;
option option-128 code 128 = string;
option option-129 code 129 = text;
next-server xxx.xxx.xxx.xxx; //IP of My PXE Server
filename "/pxelinux.0";
 
然后重新启动dhcp服务
/opt/etc/init.d/S56dhcp

LSPro建立PXE环境的更多相关文章

  1. 读书笔记--SQL必知必会--建立练习环境

    书目信息 中文名:<SQL必知必会(第4版)> 英文名:<Sams Teach Yourself SQL in 10 Minutes - Fourth Edition> MyS ...

  2. 编译android源码官方教程(2)建立编译环境「linux & mac osx」

    https://source.android.com/source/initializing.html Establishing a Build Environment IN THIS DOCUMEN ...

  3. ubuntu14.04建立交叉编译环境, 注意事项

    ubuntu14.04建立交叉编译环境, 注意事项 ~$ arm-linux-gcc/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc: 15: e ...

  4. cobbler配置要基于PXE 环境,cobbler是pxe环境的二次封装

    一:安装cobbler.httpd yum install -y cobbler httpd 二:启动cobbler.httpd systemctl start cobblerd.service sy ...

  5. 建立virtualenv环境

    建立virtualenv环境 virtualenv --no-site-packages yourenv 其中,yourenv是给环境起的名称 --no-site-packages表示安装的pytho ...

  6. 使用scratchbox2建立交叉编译环境

    使用scratchbox2建立交叉编译环境,使交叉编译不再烦人..... os:ubuntu 12.04.4 x64 1. 安装相关工具sudo apt-get install debootstrap ...

  7. 00 - PXE | 环境准备

    00 - PXE | 环境准备 TFTP PXE 1. TFTP服务搭建 安装环境Centos7.3 1.1 安装 # yum install xinetd # yum install tftp # ...

  8. WebGPU图形编程(1):建立开发环境 <学习引自徐博士教程>

    首先感谢徐博士提供的视频教程,我的博客记录也是学习徐博士进行的自我总结,老徐B站学习视频链接网址:WebGPU图形编程 - 免费视频教程(1):建立开发环境_哔哩哔哩_bilibili 创建之前你需要 ...

  9. Qt5和VS2017建立开发环境,安装后新建项目找不到Qt选项!!!

    最近开发win驱动和Qt5测试程序,需要建立Qt5和VS2017开发环境---对于Qt5和VS2017安装这里不做多余叙述. 参考资源很多,讲解也不错!! 这里切入正题:在VS2017中安转Qt vs ...

随机推荐

  1. memcached源码分析-----item过期失效处理以及LRU爬虫

    memcached源码分析-----item过期失效处理以及LRU爬虫,memcached-----item 转载请注明出处:http://blog.csdn.net/luotuo44/article ...

  2. python基础知识(函数2)

    返回值 return return[value]  多个值用,逗号分开,没有返回值,会返回none值,函数不给指定返回值也会返回none值 def functionname(p1,p2,p3): re ...

  3. web系统认证与鉴权中的一些问题

    认证鉴权系统的初心: 空间管理: 1.他是谁? 他登陆了没有? 2.他要做什么? 2.1 他要使用什么功能? 他是否有这个功能的权限. 2.2 他要使用这个功能做什么操作? 他是否有这个功能的这个操作 ...

  4. python-Web-django-商城-不登陆添加购物车

    utils: # 商品多级联动 def get_category(categorys)->dict: ''' :param:商品类性 :return: {{[],[]},{[],[]},{[], ...

  5. AssetBundle资源打包与加载

    AssetBundle资源打包  1.AssetLabels资源标签 文件名:资源打包成AssetBundle后的文件名,类似于压缩包的名字 后缀:自定义 文件名和后缀名都是小写格式(大写会自动转为小 ...

  6. mdk3 工具使用-表白神器

    一:在root目录下新建个txt文档,用vim编辑文档,写几段暧昧的话 二:终端执行命令: 开启网卡监听模式 airmon-ng start wlan0 开启无线广播 mdk3 wlan0mon b ...

  7. VAEs(变分自编码)之keras实践

    VAEs最早由“Diederik P. Kingma and Max Welling, “Auto-Encoding Variational Bayes, arXiv (2013)”和“Danilo ...

  8. 【计算机视觉】行人检测(Pedestrian Detection)资源

    一.论文 综述类的文章 [1]P.Dollar, C. Wojek,B. Schiele, et al. Pedestrian detection: an evaluation of the stat ...

  9. VMware中centos虚拟机的安装

    几个月前,就下载了VMware,centOS 6 操作系统镜像.苦于对linux的不理解和安装教程的不熟悉,一直未安装成功. 几天前,终于独自安装好了,特此记录一下. 安装其实很简单,之前失败是在于安 ...

  10. 解决Another app is currently holding the yum lock; waiting for it to exit...问题

    在下载安装nginx时出现 Another app is currently holding the yum lock; waiting for it to exit...问题 yum被锁定了 可以使 ...