nfs tftp 安装

20200831.jpg

2021/11/30

11月最后一天

NFS安装

1sudo apt-get install nfs-kernel-server rpcbind
2sudo vi /etc/exports

添加

1/home/aen/nfs_file   *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

重启

1sudo /etc/init.d/nfs-kernel-server restart

开发板挂载不上,支持V2,打开

1sudo vim /etc/default/nfs-kernel-server
 1# Number of servers to start up
 2#RPCNFSDCOUNT=8
 3RPCNFSDCOUNT="-V 2 8"
 4# Runtime priority of server (see nice(1))
 5RPCNFSDPRIORITY=0
 6
 7# Options for rpc.mountd.
 8# If you have a port-based firewall, you might want to set up
 9# a fixed port here using the --port option. For more information, 
10# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
11# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
12RPCMOUNTDOPTS="-V 2 --manage-gids"
13
14# Do you want to start the svcgssd daemon? It is only required for Kerberos
15# exports. Valid alternatives are "yes" and "no"; the default is "no".
16NEED_SVCGSSD=""
17
18# Options for rpc.svcgssd.
19RPCSVCGSSDOPTS="-nfs-version 2,3,4 --debug --syslog"

重启

TFTP

1sudo apt-get install tftp-hpa tftpd-hpa
2sudo apt-get install xinetd

新建一个目录,用来做tftp文件夹

安装完成以后新建文件/etc/xinetd.d/tftp, 如果没有/etc/xinetd.d 目录的话自行
创建, 然后在里面输入如下内容:

 1server tftp
 2 {
 3  socket_type = dgram
 4  protocol = udp
 5  wait = yes
 6  user = root
 7  server = /usr/sbin/in.tftpd
 8  server_args = -s /home/aen/tftp_file
 9  disable = no
10  per_source = 11
11  cps = 100 2
12  flags = IPv4
13}

完了以后启动 tftp 服务,命令如下:

1sudo service tftpd-hpa start

打开/etc/default/tftpd-hpa 文件,将其修改为如下所示内容

1# /etc/default/tftpd-hpa
2
3TFTP_USERNAME="tftp"
4TFTP_DIRECTORY="/home/aen/tftp_file"
5TFTP_ADDRESS=":69"
6TFTP_OPTIONS="--secure"

再一次重启

文件夹里的文件给赋权限


    


公众号'艾恩凝'
个人公众号
个人微信
个人微信
    吾心信其可行,
          则移山填海之难,
                  终有成功之日!
                                  ——孙文
    评论
    0 评论
avatar

取消