安装TFTP服务器端和客户端 root@yuanxh-desktop:/# sudo apt-get install tftp tftpd openbsd-inetd C,修改配置文件使用TFTP根目录 root@yuanxh-desktop:/home/yuanxh/at91_works# vi /etc/inetd.conf 在/etc/inetd.conf新行中填入以下内容 tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot D,启动服务 root@yuanxh-desktop:/home/yuanxh/at91_works# /etc/init.d/openbsd-inetd restart E,测试服务 root@yuanxh-desktop:/home/yuanxh# touch /tftpboot/aaa root@yuanxh-desktop:/home/yuanxh# vi /tftpboot/aaa root@yuanxh-desktop:/home/yuanxh# tftp 192.168.1.100 tftp> get aaa tftp> quit root@yuanxh-desktop:/home/yuanxh# cat aaa 2,用命令配置NFS服务 A,安装NFS服务器端 root@yuanxh-desktop:/home/yuanxh# apt-get install nfs-kernel-server nfs-common portmap B,配置访问目录及权限 root@yuanxh-desktop:/home/yuanxh/at91_works# mkdir /nfsboot root@yuanxh-desktop:/home/yuanxh/at91_works# chmod 777 /nfsboot root@yuanxh-desktop:/home/yuanxh/at91_works# touch /nfsboot/yuanxh root@yuanxh-desktop:/# vi /etc/exports 在/etc/exports新行中填入以下内容 /nfsboot 192.168.1.0/24(rw,sync) C,启动服务 root@yuanxh-desktop:/# exportfs -ra root@yuanxh-desktop:/# /etc/init.d/portmap restart root@yuanxh-desktop:/# /etc/init.d/nfs-common restart root@yuanxh-desktop:/# /etc/init.d/nfs-kernel-server restart D,测试服务 root@yuanxh-desktop:/# mount 192.168.1.100:/nfsboot /mnt root@yuanxh-desktop:/home/yuanxh# ll /mnt root@yuanxh-desktop:/home/yuanxh# rm -rf /mnt/yuanxh root@yuanxh-desktop:/home/yuanxh# showmount root@yuanxh-desktop:/home/yuanxh# df root@yuanxh-desktop:/home/yuanxh# umount /mnt root@yuanxh-desktop:/home/yuanxh# ll /nfsboot root@yuanxh-desktop:/home/yuanxh# tftp 192.168.1.100 tftp> get aaa tftp> quit root@yuanxh-desktop:/home/yuanxh# cat aaa 2,用命令配置NFS服务 A,安装NFS服务器端 root@yuanxh-desktop:/home/yuanxh# apt-get install nfs-kernel-server nfs-common portmap B,配置访问目录及权限 root@yuanxh-desktop:/home/yuanxh/at91_works# mkdir /nfsboot root@yuanxh-desktop:/home/yuanxh/at91_works# chmod 777 /nfsboot root@yuanxh-desktop:/home/yuanxh/at91_works# touch /nfsboot/yuanxh root@yuanxh-desktop:/# vi /etc/exports 在/etc/exports新行中填入以下内容 /nfsboot 192.168.1.0/24(rw,sync) C,启动服务 root@yuanxh-desktop:/# exportfs -ra root@yuanxh-desktop:/# /etc/init.d/portmap restart root@yuanxh-desktop:/# /etc/init.d/nfs-common restart root@yuanxh-desktop:/# /etc/init.d/nfs-kernel-server restart D,测试服务 root@yuanxh-desktop:/# mount 192.168.1.100:/nfsboot /mnt root@yuanxh-desktop:/home/yuanxh# ll /mnt root@yuanxh-desktop:/home/yuanxh# rm -rf /mnt/yuanxh root@yuanxh-desktop:/home/yuanxh# showmount root@yuanxh-desktop:/home/yuanxh# df root@yuanxh-desktop:/home/yuanxh# umount /mnt root@yuanxh-desktop:/home/yuanxh# ll /nfsboot