服务器的配置
【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:
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
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
lo
客户端的配置:
【下载软件】
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>