Creating an NFS Shared Directory on ECS
Linux OS
- CentOS, SUSE, EulerOS, Fedora, or openSUSE
- Run the following command to install nfs-utils:
yum install nfs-utils
- Create a shared directory.
To create shared directory /sharedata, add the following configuration to the /etc/exports file:
/sharedata 192.168.0.0/24(rw,sync,no_root_squash)
The preceding configuration is used to share the /sharedata directory with other servers in the 192.168.0.0/24 subnet.
- Run the following commands to start the NFS server:
systemctl start rpcbind service nfs start
- Create another shared directory.
For example, to create the /home/myself/download directory, add the following configuration to the /etc/exports file:
/home/myself/download 192.168.0.0/24(rw,sync,no_root_squash)
Restart the NFS service.
service nfs restart
Alternatively, run the following command without restarting the NFS service:
exportfs -rv
- (Optional) Enable automatic startup of the rpcbind service in the OS.
systemctl enable rpcbind
- Run the following command to install nfs-utils:
- Ubuntu
- Run the following commands to install nfs-kernel-server:
sudo apt-get update sudo apt install nfs-kernel-server
- Create a shared directory.
To create shared directory /sharedata, add the following configuration to the /etc/exports file:
/sharedata 192.168.0.0/24(rw,sync,no_root_squash)
The preceding configuration is used to share the /sharedata directory with other servers in the 192.168.0.0/24 subnet.
- Start the NFS service.
service nfs-kernel-server restart
- Create another shared directory.
For example, to create the /home/myself/download directory, add the following configuration to the /etc/exports file:
/home/myself/download 192.168.0.0/24(rw,sync,no_root_squash)
Restart the NFS service.
service nfs restart
Alternatively, run the following command without restarting the NFS service:
exportfs -rv
- Run the following commands to install nfs-kernel-server:
Windows OS
- Install an NFS server.
Paid software: haneWIN. Download the software at haneWIN official website.
Free software: FreeNFS and WinNFSd. Download the software at the SourceForge website.
- Enable the NFS function.
- In the case of WinNFSd, see WinNFSd configuration.
- In the case of haneWIN, perform the following steps:
- Run nfsctl.exe as the administrator.
- Right-click in the blank area and choose Insert from the shortcut menu.
Figure 1 Insert
Last Article: Creating an Agency
Next Article: Cron Expression for a Function Timer Trigger
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.