NFS安裝配置(1)

來源:互聯網
上載者:User

試著用NFS來實現兩台Linux直接的檔案分享權限設定,以便解決Openoffice遠程轉換檔的問題,但到底行不行得通有待驗證。

下面說說NFS的配置。

因為9.11的伺服器上的Linux系統已經內建了NFS,在/etc/init.d下面,查看了設定檔: etc/exports ,發現內容是空的,於是添加我要的配置:

/home 192.168.29.128(rw,sync) *(ro)

然後找到exportfs命令,./exportfs -rv(我的/usr/sbin沒有配置到環境變數中,所以不能直接調用)

配置的具體含義可參考如下的文章:

http://blog.sina.com.cn/s/blog_60cbc1700100qlpb.html

http://www.west263.com/info/html/caozuoxitong/Linux/20090513/122538.html

由於我的portmap和nfs並沒有添加進服務中,所以不能用service命令,直接找到可執行檔執行:

./portmap start

./nfs start

這樣NFS就啟動了。

去用戶端(192.168.29.128)看看吧:

輸入:showmount -e 168.168.9.11

可以看到服務端掛載的目錄。

那麼執行掛載操作吧:

sudo mount -t nfs 168.168.9.11:/home /home/linshutao/nfsmount/

然後報錯了:
mount: wrong fs type, bad option, bad superblock on 168.168.9.11:/home,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

網上說用這招:sudo apt-get install nfs-common

但我的又報錯:dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
這個跟之前安裝nfs-utils衝突,卸載:dpkg -r nfs-utils

再執行sudo apt-get install nfs-common就可以成功裝上了。

解析來再執行sudo  mount  -t  nfs  168.168.9.11:/home  /home/linshutao/nfsmount/

就掛載上來了,去 /home/linshutao/nfsmount/下可以看到服務端的目錄:/home哦!

好吧,接下來看OOo支不支援~~

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.