NFS sec

1. create a NFS (not NFS4) in CentOS5.5

1.1 check the /etc/hosts in the serverside

192.168.2.142  com1  #serverside
192.168.2.139  com2  #clientside

1.2. install nfs and portmap
sudo yum install nfs-utils
sudo yum install portmap

1.3. In order to let the server start when computer start
in the
System --> Administration --> Seravices -->
select the nfs and portmap as a background services.

1.4. edit /etc/exports
/data   192.168.2.139(rw)
this will make the clientside to  assess /data directory in serverside

1.5. in the serverside start nfs and portmap
sudo service nfs start
sudo serive portmap start

1.6. stop firewall
from
System --> Security Level and Firewall --> Firewall select disable

1.6. restart the serverside computer

------------------

2 setup in the clientside

2.1. mount /data from the serverside in the clientside
mkdir /data
mount -t nfs 192.168.2.142:/data /data

2.2. in order to automatic start to mount /data
add one more sentence into the
sudo gedit /etc/fstab
192.168.2.142:/data /data nfs rw 0 0

原文地址:https://www.cnblogs.com/greencolor/p/2416236.html