rpm -qa nfs-utils rpcbind
yum install nfs-utils rpcbind -y
rpm -qa nfs-utils rpcbind
/etc/init.d/rpcbind start
/etc/init.d/nfs start
rpcinfo -p localhost
chkconfig nfs on
chkconfig rpcbind on
mkdir /data -p
useradd www -s /sbin/nologin -M -u 888
id www
chown -R www.www /data
ls -ld /data
[root@nfs01 data]# vim /etc/exports ###编辑配置文件
#---------- time by oldboy for kaifa.
/data172.16.1.0/24(rw,sync,all_squash,anonuid=888,anongid=888)
[root@nfs01 data]# cat /etc/exports
[root@nfs01 data]# exportfs -rv ###使配置生效
###或者使用/etc/init.d/nfs reload ###平滑重启
showmount -e 172.16.1.31
mount -t nfs 172.16.1.31:/data /mnt
df -h
umount /mnt ###如果卸载不掉,使用umount -lf /mnt 强制卸载(数据不会丢失)
rpm -qa nfs-utils rpcbind
yum install nfs-utils rpcbind -y
rpm -qa nfs-utils rpcbind
/etc/init.d/rpcbind start
chkconfig rpcbind on
useradd www -s /sbin/nologin -M -u 888
id www
[root@backup ~]# ping 172.16.1.31
[root@backup ~]# telnet 172.16.1.31 111
showmount -e 172.16.1.31
mount -t nfs 172.16.1.31:/data /mnt
df -h
cat /proc/mounts
touch /mnt/oldboy.txt
rpm -qa nfs-utils rpcbind
yum install nfs-utils rpcbind -y
rpm -qa nfs-utils rpcbind
/etc/init.d/rpcbind start
chkconfig rpcbind on
useradd www -s /sbin/nologin -M -u 888
id www
[root@web01 ~]# ping 172.16.1.31
[root@web01 ~]# telnet 172.16.1.31 111
showmount -e 172.16.1.31
mount -t nfs 172.16.1.31:/data /mnt
df -h
cat /proc/mounts
touch /mnt/oldgirl.txt
本文出自 “11942277” 博客,请务必保留此出处http://11952277.blog.51cto.com/11942277/1895555
原文地址:http://11952277.blog.51cto.com/11942277/1895555