二、RV1126 开发板TFTP环境搭建
2.1、Ubuntu下安装和配置 xinetd
执行以下指令,安装 xinetd
sudo apt-get install xinetd
执行以下指令创建一个 xinetd.conf 文件
sudo vi /etc/xinetd.conf
修改 xinetd.conf 文件内容如下:
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success # and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
}
includedir /etc/xinetd.d
2.2、Ubuntu下新建 TFTP 目录
新建 TFTP 目录,这里建立在/home/xxx/linux 目录下,目录名为 tftp。将 tftp 目录赋予可读可写可执行权限
mkdir -p /home/ xxx /linux/tftp
sudo chmod 777 /home/ xxx /linux/tftp/
2.3、Ubuntu下安装tftp-hpa 和 tftpd-hpa 服务程序
执行以下程序安装 tftp-hpa 和 tftpd-hpa 服务程序
sudo apt-get install tftp-hpa tftpd-hpa
执行以下指令打开 tftpd-hpa 配置文件,修改 tftp 目录为 TFTP 服务器工作目录
sudo vi /etc/default/tftpd-hpa
执行以下指令创建/etc/xinetd.d/tftp 配置文件,并按红框内修改
sudo vi /etc/xinetd.d/tftp
意 server_args = -s 后面要添加自己的 tftp 工作路径。修改/添加 tftp 文件后,执行以下指令重启 tftpd-hpa。
sudo service tftpd-hpa restart
重启 xinetd 服务
sudo service xinetd restart