一、環境介紹
nfs伺服器:centos6.5 192.168.0.10
nfs客戶端:centos6.5 192.168.0.11
二、伺服器端安裝配置
1、先用rpm
-qa命令檢視所需安裝包(nfs-utils、rpcbind)是否已經安裝:
123456
[root@local /]# rpm
-qa | grep "rpcbind"
rpcbind-0.2.0-11.el6.x86_64
[root@local /]# rpm -qa | grep "nfs"
nfs-utils-1.2.3-39.el6.x86_64
nfs4-acl-tools-0.3.3-6.el6.x86_64
nfs-utils-lib-1.1.5-6.el6.x86_64
2、如查詢結果如上,說明伺服器自身已經安裝了nfs,如果沒有安裝,則用yum命令來安裝:
1
[root@local /]# yum -y install nfs-utils rpcbind
3、建立共享目錄:
1
[root@local /]# mkdir /sharestore
/exports新增下面一行,新增後儲存退出。
12
[root@local /]# vi /etc
/exports
/sharestore
*(rw,sync,no_root_squash)
5、啟動nfs服務(先啟動rpcbind,再啟動nfs;如果伺服器
自身已經安裝
過nfs,那就用restart重啟兩個服務):
1234567
8910
[root@local /]# service rpcbind start
starting rpcbind: [ ok ]
[root@local /]# service nfs start
starting nfs services: [ ok ]
starting nfs quotas: [ ok ]
starting nfs mountd: [ ok ]
stopping rpc idmapd: [ ok ]
starting rpc idmapd: [ ok ]
starting nfs daemon: [ ok ]
[root@local /]#
6、設定nfs服務開機自啟動:
12
[root@local /]# chkconfig rpcbind on
[root@local /]# chkconfig nfs on
三、客戶端掛載配置
1、建立乙個掛載點:
1
[root@localhost ~]# mkdir /mnt/store
2、檢視nfs伺服器上的共享:
123
[root@localhost /]# showmount -e 192.168.0.10
export list for 192.168.0.10:
/sharestore *
3、掛載:
1
[root@localhost ~]# mount -t nfs 192.168.0.10:/sharestore /mnt/store
4、檢視已掛載共享:
1234567
891011
12
[root@localhost ~]# mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
192.168.0.10:/mailstore
1/ on /mailstore_new type nfs (rw,vers=4,addr=192.168.0.10,clientaddr=192.
CentOS 6 5下NFS安裝配置記錄
一 環境介紹 nfs伺服器 centos6.5 192.168.0.10 nfs客戶端 centos6.5 192.168.0.11 二 伺服器端安裝配置 1 先用rpm qa命令檢視所需安裝包 nfs utils rpcbind 是否已經安裝 123 456 root local rpm qa g...
CentOS6 5下安裝配置MySQL
centos6.5下安裝配置mysql,配置方法如下 安裝mysql資料庫 yum install y mysql server mysql mysql deve 檢視mysql server版本 rpm qi mysql server 初始化mysql資料庫 service mysqld star...
CentOS6 5下安裝配置MySQL
centos6.5下安裝配置mysql,配置方法如下 安裝mysql資料庫 yum install y mysql server mysql mysql deve 檢視mysql server版本 rpm qi mysql server 初始化mysql資料庫 service mysqld star...