欢迎使用CSDN-markdown编辑器

来源:互联网 发布:qt淘宝刷单兼职可信 编辑:程序博客网 时间:2024/05/18 03:38

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网络系统了。

0 0
原创粉丝点击