# Server
sudo dnf install dnf5-plugins nfs-utils
sudo dnf config-manager setopt keepcache=True
sudo tee /etc/exports.d/dnf5.exports << EOF > /dev/null
/var/cache/libdnf5 *(rw,no_root_squash)
EOF
sudo systemctl --now enable nfs-server.service
sudo firewall-cmd --permanent --add-service=nfs
sudo firewall-cmd --reload
# Client
SERVER="192.168.1.1"
sudo dnf install dnf5-plugins nfs-utils
sudo dnf config-manager setopt keepcache=True
sudo tee -a /etc/fstab << EOF > /dev/null
${SERVER}:/var/cache/libdnf5 /var/cache/libdnf5 nfs defaults,nofail
EOF
sudo systemctl daemon-reload
sudo mount -a
3 Likes