ubuntu 16 04 建立nfs伺服器。

2021-10-01 09:41:16 字數 701 閱讀 2896

一 安裝 nfs

$ sudo apt-get install nfs-kernel-server

$ sudo apt-get install nfs-common

二 配置/etc/exports

$ sudo vi /etc/exports

文字末新增

/root/rootfs *(rw,sync,no_root_squash,no_subtree_check)

然後在終端執行 $chmod 777 -r /root/rootfs

$ sudo showmount -e

顯示 clnt-create : rpc : program not registered

$ sudo exportfs -r 更新

$ sudo showmount localhost -e

顯示export list for 192.168.1.116

/root/rootfs *

三 啟用

$ sudo /etc/init.d/nfs-kernel-server restart 重啟 nfs 服務

顯示如下

掛載測試

$ mount -t nfs -o nolock localhost:/root/rootfs /mnt

執行後,進入/mnt 目錄中,如果可以看到/root/rootfs 中的內容,則說明 nfs 搭建成功!

Ubuntu16 04下的NFS配置

1.安裝軟體包 sudo apt get install nfs kernel server 2.開啟 etc exports檔案,在末尾加入 home rw,sync,no root squash 注 nfs允許掛載的目錄及許可權,在檔案 etc exports中進行定義,各欄位含義如下 home...

ubuntu 16 04 中搭建NFS服務

nfs服務是實現linux和linux之間的檔案共享,這裡主要是為了在hi3518 arm作業系統中掛載sample venc執行檔案並儲存h264編碼檔案。在參考安裝過程中只安裝了伺服器端,然後共享的資料夾必須給777許可權。一 伺服器端 1.1安裝nfs服務 執行以下命令安裝nfs伺服器,apt...

搭建Ubuntu16 04的nfs服務遇到的問題

按照教科書裡的搭建方法搭建後,發現mount指令出現operation not support問題。於是 2 之後,通過重新搭建nfs服務環境,逐條分析。最後鎖定在nfs kernel server不能重啟。通過使用systemctl status指令,問題鎖定在配置文字裡。但是無論如何修改包括安照...