This is a work in progress of course and the reason for this setup is because I already have a server with users on it. So, S1 and S2 are servers with existing users on them. LD is the server that we want all home directories on. All these servers have static IPs, S1 has 192.168.0.2, S2 192.168.0.3 and LD 192.168.0.10.
On S1 and S2 we install nfs server and portmap:
Then we edit the /etc/exports:sudo apt-get install portmap nfs-kernel-server
The first part (/home) is the directory that you want to share or export to the central server. The IP address (192.168.0.10) is the address that is allowed to access this share. I recommend that you use IPs and not IP ranges with subnets./home 192.168.0.10(rw,sync,no_subtree_check)
/usr/local 192.168.0.10(rw,sync,no_subtree_check)
And we activate the exports. Every time you edit /etc/exports you need to run this command:
sudo exportfs -raNow on the central server (LD) we need to install the nfs client services:
sudo apt-get install portmap nfs-commonNext, create EMPTY directories on LD to use as mount points
sudo mkdir /homeS1We will need to mount statically the directories that we are sharing from S1 and S2 so on LD we edit the /etc/fstab file. At the bottom of the file we add these entries:
sudo mkdir /homeS2
192.168.0.3:/home /homeS2 nfs rw,hard,intr 0 0We save and exit the file and run the following command.
192.168.0.2 /home /homeS1 nfs rw,hard,intr 0 0
sudo mount -aWe are all set. If we go to /homeS1 on LD we will see all home directories from S1. Next is the challenge of adding an LDAP configuration that will hopefully come next.
No comments:
Post a Comment