You can use yast nfs_serv in SLES8/9 to configure the nfs service, or you can modify the configuration file to support
Method 1. Configure using yast2 management tools
Run the yast2 tool on the console to configure the nfs service.
# Yast2 nfs_server
"Configuration of the NFS server" select "Start NFS server" and click "Next"
"Add directory" to Add the directory to be output, such as/opt
"Hosts wildcard" indicates the network or host information that can use this service, for example, 192.168.0.0/255.255.255.0.
"Options" Enter the required Options. The Options sync or async are required. For other Options, see man exports (5)
Method 2: modify the configuration file and Run Command management to configure
First, edit the/etc/exports file.
# Export/opt to any host with option ro, async
/Opt * (ro, async)
# Export/media to hosts 192.168.0.0/255.255.255.0 with option ro, root_squash, sync
/Media 192.168.0.0/255.255.255.0 (ro, root_squash, sync)
Run the following command to activate and start the nfs service.
# Chkconfig-a nfsserver
#/Etc/init. d/nfsserver restart
Check and troubleshooting:
Run the following command to check whether the nfs service is available.
# Rpcinfo-p localhost | grep nfs
Use the following command to load the nfs file system output above. The placeholder <ipaddr> is the ip address of the server.
# Mount-t nfs <ipaddr>:/opt/mnt