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網絡系統了。