網路檔案系統讓 Client 掛載 Server 目錄如同本地磁碟,嵌入式開發、叢集共享存儲、容器持久化卷常用。
yum install -y nfs-utils rpcbind # CentOS/RHEL apt install -y nfs-kernel-server # Debian/Ubuntu
/etc/exports/share 192.168.0.0/24(rw,sync,no_root_squash) /home/haiouc/haioucshare *(rw,sync,all_squash,anonuid=1000,anongid=1000) /mnt/cdrom 192.168.0.*(ro)
關鍵選項:
rw/ro:讀寫/唯讀sync/async:同步寫入/非同步(效能較好但風險高)root_squash/no_root_squash:Root 用戶映射為匿名/保留 Rootall_squash:所有用戶映射為匿名anonuid/anongid:指定匿名用戶 UID/GIDsystemctl enable --now rpcbind nfs-server # 或傳統 service rpcbind start service nfs start
yum install -y nfs-utils
mkdir -p /mnt/localshare mount -t nfs 192.168.0.1:/share /mnt/localshare
/etc/fstab192.168.1.10:/home/haiouc/haioucshare /mnt/nfs1 nfs defaults 0 0
showmount -e 192.168.0.1 # 查看 Server 匯出清單 rpcinfo -p 192.168.0.1 # 查看 RPC 服務
mount -t nfs4 -o sec=krb5p 192.168.0.1:/share /mnt/localshare
需雙端配置 Kerberos KDC,提供加密傳輸與強認證。
mountd 隨機埠(建議固定 MOUNTD_PORT)rpcinfo -p 見到 nfs、mountd、status 服務access denied → 檢查 /etc/exports IP/選項、exportfs -rv 重新匯出Windows Server 2003 開啟「本地用戶和組」提示無權限的快速解決方法
FreeBSD 關機與重啟指令 (shutdown -p now / -r now) 及權限說明
服務器 CPU 架構全解析:CISC (x86) vs RISC (Power/SPARC/ARM) vs VLIW (Itanium) 技術演進與選型
Web 服務器 Ping 通卻無法訪問:又一起網絡打印機 IP 衝突偵察錄
phpMyAdmin 完整安裝與配置教學:從下載到資料庫管理全攻略
構建牢固虛擬化架構全生命週期指南:從商業論證到淘汰舊設備的六大關鍵階段