NFS-server———centos 6.5
NFS 服务器搭建和排错思路:NFS服务端配置
1、更改主机名及查看服务器系统版本:
hostname NFS_server
cat /etc/redhat-release
uname -r
uname -m
2、检查并安装NFS服务
rpm -qa nfs-utils portmap rpcbind
yum grouplist
yum install nfs-utils portmap -y
rpm -qa nfs-utils portmap rpcbind
3、启动RPC及NFS 服务
/etc/init.d/rpcbind start
ps -ef|grep grep rpc
/etc/init.d/rpcbind status
rpcinfo -p localhost
/etc/init.d/nfs start
rpcinfo -p localhost
4、设置开机自启动并检查
chkconfig nfs on
chkconfig rpcbind on
chkconfig --list nfs
chkconfig --list rpcbind
5、配置共享/data目录并检查
vim /etc/exports (方法一)
cat >>/etc/exports 如果不通,查看防火墙是否没有添加出入规则。
6、挂载并测试
mount -t nfs 192.168.36.5:/data /mnt/
cd /mnt/
ls -l
touch tangmengmeng.txt
ls -l
echo "mount -t nfs 192.168.36.5:/data /mnt/" >>/etc/rc.local —>开机自启动配置
排错思路:
1、检查服务器NFS和RPC有没有开启,客户端有没有开启RPC服务
2、检查服务器/etc/exports配置是否正确
3、服务器和客户端防火墙规则
4、客户端ping一下服务器是否OK
5、服务器端showmount -e localhost 检查
6、客户端telnet 192.168.36.5 111 服务器端
页:
[1]