自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

CentOS NFS服務(wù)器的創(chuàng)建

網(wǎng)絡(luò) 網(wǎng)絡(luò)管理
文章中我們介紹了CentOS的NFS服務(wù)器的相關(guān)設(shè)置以及調(diào)整內(nèi)容。那么希望大家通過文章內(nèi)容能夠掌握這部分的知識。

不少系統(tǒng)中,都有NFS的需要。那么在一些不產(chǎn)用以及開發(fā)系統(tǒng)中如何添加NFS平臺呢?這里我們就來講解一下CentOS的NFS服務(wù)器的創(chuàng)建。希望對大家有所幫助。CentOS下搭建NFS平臺的具體過程:

1、先在VM下裝一個CentOS作為NFS服務(wù)器(nfs-server.example.com),再克隆一個作為NFS客戶端(nfs-client.example.com),MINI安裝即可.

NFS服務(wù)器分配IP為192.168.1.100,NFS客戶端分配IP為192.168.1.200.

nfs-server.example.com配置如下:

[root@nfs-server ~]# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=nfs-server.example.com[root@nfs-server ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1   localhost.localdomain localhost

192.168.1.200   nfs-client.example.com   nfs-client

nfs-client.example.com配置如下:

[root@nfs-client ~]# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=nfs-client.example.com[root@nfs-client ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1   localhost.localdomain localhost

192.168.1.100   nfs-server.example.com   nfs-server2、配置NFS服務(wù)器(nfs-server.example.com)

默認(rèn)安裝下已經(jīng)裝好NFS服務(wù)了,所以只用開啟服務(wù)器即可.

[root@nfs-server ~]# chkconfig nfs on比如要共享/data/目錄:

[root@nfs-server ~]# mkdir /data

[root@nfs-server ~]# vi /etc/exports

/data/ 192.168.1.200(rw,no_root_squash,no_all_squash,sync)現(xiàn)在就可以啟動NFS服務(wù)了.

[root@nfs-server ~]# service nfs start3、配置NFS客戶端(nfs-client.example.com)

測試NFS服務(wù)器.

[root@nfs-client ~]# showmount -e nfs-server

Export list for share:

/data 192.168.1.200如果沒有出現(xiàn)以上信息,說明NFS服務(wù)器還沒配置正確,一般是IP設(shè)置錯誤.

MOUNT共享目錄/data:

[root@nfs-client ~]# mkdir /data

[root@nfs-client ~]# mount -t nfs 192.168.1.100:/data /data接下來就測試共享目錄/data是否可讀寫:

[root@nfs-client ~]# echo "hello world" > /data/test然后上NFS服務(wù)器看看是否有/data/test文件:)?

如果想NFS客戶端一開機(jī)就自動掛載共享目錄,只需修改/etc/fstab,加 入以下一句就可以了:

192.168.1.100:/data  /data  nfs   rw   0 04、排錯參考

當(dāng)/etc/exports設(shè)置的權(quán)限,不符合client端的來源時,則會出現(xiàn)以下錯誤信息:

mount: hostname:/dir failed, reason given by server: Permission denied

然而必須注意的是,若在nfs server的/etc/hosts內(nèi)有設(shè)置IP與hostname的對照

則nfs會先把來源IP轉(zhuǎn)換成hostname,再與/etc/exports內(nèi)的設(shè)置做對比

若此時/etc/exports的設(shè)置使用IP而非hostname,則會產(chǎn)生? 法匹配的錯誤

? 此而出現(xiàn),雖然來源IP在/etc/exports已正確設(shè)置,卻仍然發(fā)生Permission denied的現(xiàn)象

解決方案是在/etc/exports內(nèi)采用hostname,避免使用IP,或者是設(shè)置正確的IP段.

來源:http://www.sofee.cn/blog/2006/09/29/46/

責(zé)任編輯:佟健 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-08-04 11:04:48

UbuntuNFS服務(wù)器

2010-03-31 15:45:45

CentOS系統(tǒng)

2010-08-04 16:07:05

NFS服務(wù)器

2010-08-05 14:15:20

NFS服務(wù)器

2009-09-08 16:31:07

2010-08-03 11:49:26

Ubuntu nfs服

2010-08-05 13:40:06

NFS服務(wù)器

2009-09-08 13:48:13

NFS服務(wù)器

2009-09-01 10:38:13

NFS服務(wù)器

2010-08-04 15:35:02

2010-08-05 09:43:09

NFS服務(wù)器安全

2010-07-27 10:46:31

Linux NFS服務(wù)

2010-08-03 16:08:12

2010-08-06 13:06:28

NFS服務(wù)器

2010-07-27 13:53:23

NFS服務(wù)器

2010-08-03 17:07:55

NFS服務(wù)器

2010-08-05 14:21:43

NFS服務(wù)器

2010-08-05 09:49:18

NFS服務(wù)器配置

2009-09-08 14:30:44

NFS服務(wù)器

2010-07-27 13:59:53

Linux NFS服務(wù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號