[[email protected] ~]# yum -y install nfs-utils rpcbind
[[email protected] ~]# systemctl start rpcbind
[[email protected] ~]# rpcinfo -p localhost
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 31056 status
100024 1 tcp 42876 status
100021 1 udp 55985 nlockmgr
100021 3 udp 55985 nlockmgr
100021 4 udp 55985 nlockmgr
100021 1 tcp 28620 nlockmgr
100021 3 tcp 28620 nlockmgr
100021 4 tcp 28620 nlockmgr
[[email protected] ~]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:42876 0.0.0.0:* LISTEN
tcp6 0 0 :::111 :::* LISTEN
tcp6 0 0 :::55957 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:25 :::* LISTEN
tcp6 0 0 ::1:6010 :::* LISTEN
[[email protected] ~]# systemctl enable rpcbind
[[email protected] ~]# showmount -e 192.168.146.104
Export list for 192.168.146.104:
/mnt/pool2/nfs-share 192.168.146.129
[[email protected] ~]# mkdir /oracletest
[[email protected] ~]# useradd -u 1007 oracle
[[email protected] ~]# mount -t nfs 192.168.146.104:/mnt/pool2/nfs-share /oracletest
[[email protected] oracletest]# ls -lhd /oracletest/
drwxr-xr-x 2 oracle oracle 3 2月 2 16:54 /oracletest/
[[email protected] ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/rhel-root 18G 15G 3.5G 81% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.7M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 497M 125M 373M 26% /boot
tmpfs 378M 0 378M 0% /run/user/0
192.168.146.104:/mnt/pool2/nfs-share 5.5G 128K 5.5G 1% /oracletest
[[email protected] oracletest]# cat /etc/fstab
192.168.146.104:/mnt/pool2/nfs-share /oracletest nfs defaults 0 0
备注:客户端也可以是Windows系统、Ubuntu和Mac系统,这里不做介绍。