學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > 詳解CentOS6.4系統(tǒng)NFS安裝配置

詳解CentOS6.4系統(tǒng)NFS安裝配置

時間: 若木635 分享

詳解CentOS6.4系統(tǒng)NFS安裝配置

  本文為大家講解詳解CentOS6.4系統(tǒng)NFS安裝配置,歡迎大家閱讀,希望對大家有幫助。

  安裝:

  [root@localhost etc]# rpm -qa | grep nfs

  nfs-utils-lib-1.1.5-6.el6.i686

  nfs4-acl-tools-0.3.3-6.el6.i686

  nfs-utils-1.2.3-36.el6.i686

  [root@localhost etc]# rpm -qa | grep rpcbind

  rpcbind-0.2.0-11.el6.i686

  [root@localhost etc]#

  以上兩個軟件如果沒有安裝,可以用yum,在線安裝。

  配置:

  主要配置文件:/etc/exports

  [root@localhost /]# vi /etc/exports

  /tmp 192.168.0.0/24(rw) //把“/tmp”共享給192.168.0.0網(wǎng)段(可讀)。

  /tmp 192.168.0.65(rw,sync,no_root_squash) //把“/tmp”共享給192.168.0.65(可讀可寫,同步)。

  [root@localhost etc]# service portmap restart

  停止 portmap:[ 確定 ]

  啟動 portmap:[ 確定 ]

  [root@localhost etc]# service nfs restart //設(shè)置完成后重啟服務(wù)

  關(guān)閉 NFS mountd:[ 確定 ]

  關(guān)閉 NFS 守護進程:[ 確定 ]

  關(guān)閉 NFS quotas:[ 確定 ]

  關(guān)閉 NFS 服務(wù): [失敗]

  啟動 NFS 服務(wù): [ 確定 ]

  關(guān)掉 NFS 配額:[ 確定 ]

  啟動 NFS 守護進程:[ 確定 ]

  啟動 NFS mountd:[ 確定 ]

  [root@localhost etc]# showmount -e //查看自己共享的服務(wù)

  Export list for localhost.localdomain:

  /tmp 192.168.0.0/24,localhost

  [root@localhost tmp]# showmount -a //顯示已經(jīng)與客戶端連接上的目錄信息

  All mount points on localhost.localdomain:

  192.168.0.213:/tmp客戶端連接:

  # showmount -e 192.168.0.248 //列出可供使用的NFS

  Export list for 192.168.0.248:

  /tmp 192.168.0.65,192.168.0.213

  # mount 192.168.0.248:/tmp /mnt //掛載“/tmp”目錄到“/mnt”下。

  NFS的掛載錯誤:

  # mount 192.168.0.70:/tmp /mnt/tmp

  mount:1831-008 放棄:

  192.168.0.70:/tmp

  vmount: 操作不允許執(zhí)行。

  # nfso -p -o nfs_use_reserved_ports=1

  正在將 nfs_use_reserved_ports 設(shè)置為 1

  正在 nextboot 文件中將 nfs_use_reserved_ports 設(shè)置為 1

  # mount 192.168.0.70:/tmp /mnt/tmp

  # ls /mnt/tmp

138710