標籤:
目錄
一 環境
1.1 系統內容
1.2 軟體環境
1.3 軟體版本
二 安裝
2.1 server 安裝
2.2 server 啟動
2.3 client 安裝
2.4 client 掛載
三 驗證
本文
一 環境
1.1 系統內容 CentOS 6.6 64位
[[email protected] ~]# lsb_release -aLSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarchDistributor ID: CentOSDescription: CentOS release 6.6 (Final)Release: 6.6Codename: Final
[[email protected] ~]# cat /proc/version Linux version 2.6.32-504.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014
1.2 軟體環境
暫無
1.3 軟體版本
yum 安裝,一般都是安裝最新版本
二 安裝
2.1 安裝
安裝使用者root
[[email protected] ~]# yum install nfs-utils
2.2 啟動
2.2.1
啟動服務/etc/init.d/rpcbind restart
啟動服務/etc/init.d/nfs restart
[[email protected] ~]# /etc/init.d/rpcbind restartStopping rpcbind: [ OK ]Starting rpcbind: [ OK ][[email protected] ~]# /etc/init.d/nfs restartShutting down NFS daemon: [ OK ]Shutting down NFS mountd: [ OK ]Shutting down NFS quotas: [ OK ]Shutting down RPC idmapd: [ OK ]Starting NFS services: [ OK ]Starting NFS quotas: [ OK ]Starting NFS mountd: [ OK ]Starting NFS daemon: [ OK ]Starting RPC idmapd: [ OK ]
2.2.2 配置
主要設定檔 /etc/exports
官網描述:This file contains a list of entries; each entry indicates a volume that is shared and how it is shared. Check the man pages (man exports) for a complete description of all the setup options for the file, although the description here will probably satisfy most people‘s needs.
翻譯(意翻):這個檔案裡 列出你要共用的目錄,他被授權哪些用戶端共用,用戶端具有什麼許可權。
樣本:
[[email protected] etc]# less exports/nfsc 10.59.0.0/16(rw,sync,acl,no_root_squash)
2.3 client 安裝
用戶端安裝方法同server 端 安裝。此處省
2.4 client 掛載
server 端,client 端都建共用目錄
mkdir /nfsdir
client 端執行
mount -t nfs -o rw serverip:/nfsdir /nfsdir
三 驗證
client 端 執行 mount 命令
就可以看看是否掛載成功
後記: 寫的不好,其實配置這塊有好多東西。。。
http://www.cnblogs.com/mchina/archive/2013/01/03/2840040.html
這篇文章雖然有點老,但是東西還全
這個是官網:不過是英文,實在不想翻譯這個。。。
http://nfs.sourceforge.net/nfs-howto
CENTOS 6.6 nfs 伺服器搭建