歡迎使用CSDN-markdown編輯器

Linux NFS服務器的安裝與配置

系統平臺:CentOS release 6.5

NFS Server IP:10.1.1.102 10.1.1.244

防火牆已關閉/iptables: Firewall is not running.

SELINUX=disabled

一、安裝NFS

查看nfs是否安裝

rpm -qa | grep nfs

若沒有則安裝nfs包

yum install nfs-utils

二、配置

建立NFS目錄

mkdir /mnt/NFS

編輯/etc/exports

加入

/mnt/NFS *(insecure,rw,async,no_root_squash)
/mnt/mj_stores *(insecure,rw,async,no_root_squash)

每次配置完需要重啓(service nfs restart)

三、啓動服務

service rpcbind start #啓動端口轉發 6 以後就沒有portmap 了,爲rpcbind 替換

service nfs start #啓動nfs

四、掛載NFS系統

mount -t nfs 10.1.1.102:/mnt/NFS /media/nfs

mount -t nfs -o nolock 127.0.0.1:/mnt/mj_stores/ /root/wwwroot/stores/

本機可以使用遠程服務器上的NFS網絡系統了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章