2.3 KiB
NFS Service Setup Guide
This document outlines the steps taken to set up the NFS (Network File System) service on this machine, with a custom configuration file location.
Setup Steps
-
Install NFS Server Package The
nfs-kernel-serverpackage was installed usingapt-get:sudo apt-get install -y nfs-kernel-server -
Create Custom Configuration Directory A dedicated directory for NFS configuration files was created at
/opt/calypso/conf/nfs/:sudo mkdir -p /opt/calypso/conf/nfs/ -
Handle Default
/etc/exportsFile The default/etc/exportsfile, which typically contains commented-out examples, was removed to prepare for the custom configuration:sudo rm /etc/exports -
Create Custom
exportsConfiguration File A newexportsfile was created in the custom directory/opt/calypso/conf/nfs/exports. This file will be used to define NFS shares. Initially, it contains a placeholder comment:sudo echo "# NFS exports managed by Calypso
Add your NFS exports below. For example:
/path/to/share *(rw,sync,no_subtree_check)" > /opt/calypso/conf/nfs/exports
```
**Note:** You should edit this file (`/opt/calypso/conf/nfs/exports`) to define your actual NFS shares.
-
Create Symbolic Link for
/etc/exportsA symbolic link was created from the standard/etc/exportspath to the custom configuration file. This ensures that the NFS service looks for its configuration in the designated/opt/calypso/conf/nfs/exportslocation:sudo ln -s /opt/calypso/conf/nfs/exports /etc/exports -
Start NFS Kernel Server Service The NFS kernel server service was started:
sudo systemctl start nfs-kernel-server -
Enable NFS Kernel Server on Boot The NFS service was enabled to start automatically every time the system boots:
sudo systemctl enable nfs-kernel-server
How to Configure NFS Shares
To define your NFS shares, edit the file /opt/calypso/conf/nfs/exports. After making changes to this file, you must reload the NFS exports using the command:
sudo exportfs -ra
This ensures that the NFS server recognizes your new or modified shares without requiring a full service restart.