nfs tftp 安装

20200831.jpg

2021/11/30

11月最后一天

NFS安装

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

添加

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

重启

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

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

sudo vim /etc/default/nfs-kernel-server
# Number of servers to start up
#RPCNFSDCOUNT=8
RPCNFSDCOUNT="-V 2 8"
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0

# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information, 
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
RPCMOUNTDOPTS="-V 2 --manage-gids"

# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""

# Options for rpc.svcgssd.
RPCSVCGSSDOPTS="-nfs-version 2,3,4 --debug --syslog"

重启

TFTP

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

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

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

server tftp
 {
  socket_type = dgram
  protocol = udp
  wait = yes
  user = root
  server = /usr/sbin/in.tftpd
  server_args = -s /home/aen/tftp_file
  disable = no
  per_source = 11
  cps = 100 2
  flags = IPv4
}

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

sudo service tftpd-hpa start

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

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/aen/tftp_file"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"

再一次重启

文件夹里的文件给赋权限


    


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

取消