TFTP服务器的配置

服务器的配置

【1】获得root权限

linux@ubuntu:~$ su root

Password:

【2】装在必要软件

linux@ubuntu:~$ sudo apt-get install ftpd-hpa

[sudo] password for linux:

Reading package lists... Done

Building dependency tree      

Reading state information... Done

E: Unable to locate package ftpd-hpa

root@ubuntu:/home/linux# apt-get install tftpd-hpa xinetd

Reading package lists... Done

Building dependency tree      

Reading state information... Done

tftpd-hpa is already the newest version.

The following NEW packages will be installed:

  xinetd

0 upgraded, 1 newly installed, 0 to remove and 559 not upgraded.

Need to get 121 kB of archives.

After this operation, 397 kB of additional disk space will be used.

Do you want to continue [Y/n]?

0% [Connecting to us.archive.ubuntu.com (91.189.91.13)]

Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main xinetd i386 1:2.3.14-7ubuntu4 [121 kB]

Fetched 121 kB in 3s (33.5 kB/s)                      

Selecting previously unselected package xinetd.

(Reading database ... 189565 files and directories currently installed.)

Unpacking xinetd (from .../xinetd_1:2.3.14-7ubuntu4_i386.deb) ...

Processing triggers for ureadahead ...

ureadahead will be reprofiled on next reboot

Processing triggers for man-db ...

Setting up xinetd (1:2.3.14-7ubuntu4) ...

xinetd start/running, process 2864

【3】配置文件

root@ubuntu:/home/linux# vim /etc/default/tftpd-hpa

TFTP服务器的配置

【4】创建文件在服务器中保存的位置要与上图中一至并获得权限

root@ubuntu:/home/linux# mkdir /tftpboot

root@ubuntu:/home/linux# chmod 777 /tftpboot/

【5】重启服务器

root@ubuntu:/home/linux# service tftpd-hpa restart

tftpd-hpa stop/waiting

tftpd-hpa start/running, process 2960

到这儿服务器部分已经配好了

查看ip方便登录(在服务器下)

root@ubuntu:/home/linux# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0c:29:78:a1:b9 

          inet addr:192.168.169.129  Bcast:192.168.169.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fe78:a1b9/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:159 errors:0 dropped:0 overruns:0 frame:0

          TX packets:207 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:147273 (147.2 KB)  TX bytes:20362 (20.3 KB)

          Interrupt:19 Base address:0x2000

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:46 errors:0 dropped:0 overruns:0 frame:0

          TX packets:46 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:5146 (5.1 KB)  TX bytes:5146 (5.1 KB)

 

 

 

客户端的配置:

【下载软件】

root@ubuntu:/home/linux# apt-get install tftp-hpa

Reading package lists... Done

Building dependency tree      

Reading state information... Done

tftp-hpa is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 559 not upgraded.

【登录】

root@ubuntu:/home/linux# tftp 192.168.169.129

tftp>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值