 I am Nishan Bhurte, I am third year M-Tech student in CAC department in IIT Bombay. I am going to explain about the network file system today. So you have to make a group of two, one laptop will be acting as server, one will be acting as client. So what is network file system with this system, users can access the files across the network. That means you can sit on one laptop and create some file and access that file on some other machine. I will start with the server installation. So I hope you have fixed that who will be the server and who will be the client. So this step is to be followed by the person who is doing the server side. Packages required for NFS file system are NFS kernel, NFS kernel server, NFS common and port map. So as you can see from your printouts, there will be three packages needed for the server configuration, server installation that is NFS kernel server, NFS common and port map. So these steps will be done only by the person who is doing the server thing. So I have in one window, one machine that is OSL 50, the other machine is OSL 52. So OSL 50 will be acting as server and OSL 52 will be acting as client. I will run the first command that is abget install and the three package names. So it will install all the three packages. So I am running this command abget install NFS kernel server, NFS common and port map. It will install these packages on server. This has to be run on server side only. Next thing is we have to create a directory on this NFS file system and then we can write some files which can be accessed from some other computer. So we will create a directory like slash extra slash dir. So I am creating directory in slash extra directory as NFS, for in your case I think slash extra is not there. So you can create a directory mkdir slash home slash NFS. So your command will be slash home slash NFS. So I have highlighted the command, you can look at the board and type this. You can give any name to this directory. For example I am giving the name as NFS. Basically we want to make this directory accessible from other client machines. Next thing open this file slash etc slash exports using vim editor, write this command and open this file. You will see the commented lines come at the end, press I so that you will open it in write mode and go to the last line. The file that you have to open is slash etc slash exports, s at the end. Type sudo space su, press enter, it will ask for password, you enter the password as 123 because it is the administrative user's password. So after this sudo su you will have the administrative privileges. If it is not there, create it. Open this file, press I to go to write mode, it will show you are in the insert mode at the end, you have to write the line which is there in the slide, slash extra slash NFS, in your case slash home slash NFS, the IP address of the client system and then these three attributes. In the exports file what you have to write is you want to make this directory available to some client machine. So that is why you have to specify which is the IP address of the client to which you want to make it available. IP has to be replaced with the actual IP address, bracket will be same. So you have to write slash home slash NFS space the client machine's IP address in bracket same thing. So as you have two clients you have to make two lines, only difference will be the IP addresses of clients will be different because you are using two clients. Clients IP has to be given, you want to make this directory available to some client. So first parameter is the directory which you want to make available to clients, the IP address is the client IP address, you want to make file system as read write. The second parameter is if you have logged in using root permission and using NFS directory then can you delete the file as per the server's root permission or not. So I have this web page which explains the use of no root squash parameter. So and on client system if you have logged in using root then can you delete the file, can you delete the NFS file with server's root permission or not. Yes, on one line you have to make entry for first client, on second line you have to make entry for second client, no you have to write every machine line by line. So you are not writing the second line that is read only with read only permission. You have to make entry for this line only, not this line, here you have to write slash home slash NFS because that is the directory you want to make available to clients. This is the IP address of client and from this to this the same thing will be written for both lines. You have to make entry similar to this, on the second line this is the IP of first client, on the second line same thing will be written home NFS IP2. So I hope you have made entry similar to this in your file. Write the file with escape shift colon wq enter, after making these changes you have to restart the NFS kernel server process with the next command in your slide that is slash etc slash initd slash NFS kernel server restart. You open this file slash etc slash exports, you have to write line similar to this in your case it will be slash home slash NFS because you have made the directory in that slash home. So instead of slash extra you will write slash home then space then you have to write the IP address of the client machine which you will be using. To get the IP address of the client you have to run ifconfig command on your client. So osl52 is my client so I am running ifconfig you will see the IP address of client. This IP address you have to put in slash etc slash exports. So I want to make one point clear these two entries are not to be entered these are exclusive so that is why I said only enter this thing. Only on the first line you have to make write the IP address of first client on the second line same thing is to be written with writing IP address of second client. This is not to be entered so for the explanation purpose I have also made the two entries in slash etc slash exports the entries are similar except the IP address of clients are changed one is 11.52 and second is 11.51 both are acting as my clients. Let us move to the next step now after writing the entries in exports file you have to run this command restarting NFS kernel server process. So you have to enter command slash etc slash init.d slash nfs dash kernel dash server restart I have run the command here and you can see the output okay next thing is after you have made the entries in exports file it has to be made public using export fs minus ra command so you can run export fs minus ra on the server so I am running export fs minus ra on server side so do not consider these warnings these are normal so up till now I had then done the server installation first I install three packages I created NFS directory I have written the directory name and IP address of client in exports file I have restarted the NFS kernel server process and I have run export fs command and this makes the server installation complete okay the next step is we are moving now to client installation whoever is acting as clients should run the following commands now so OSL 52 is acting as my client so I will run the client side commands on this machine OSL 52 so first you have to install two packages using apt gate install the package names are NFS common and port map so after running these commands NFS packages are installed on my client machine okay on the client side I had to install the NFS packages so you can refer to your slides also in that the command written is apt gate install NFS common and port map so using this command you can install the two packages once again I will repeat this command and hence forth you are doing the configuration on the client side not the server side server side configuration is done now I have to make one directory on which through which I will access the NFS directory that is created on the server so I will create a directory as slash extra slash NFS client so in your case you have to run the command as mkdir slash home slash NFS client so now you have created the directory now you have to mount the directory which was created on server to this directory so how to do that is the third command which is given in the slide first you will need to know the IP address of the server from which you will be accessing the NFS directory so now go to server type if config command so OSL 50 is my server I will type if config enter this will give me the IP address of the server so note down this IP address of the server so on the client side you have to run the command as mount space IP address of the server 11.50 is my IP address of the server so I am entering this value colon the directory on the server which you want to enable as NFS so the directory name was slash extra slash NFS in your case the directory name will be slash home slash NFS so I will explain these parameters of the third command again you have to mount a directory from server to client so that is why we are using mount command now we have to specify the IP address of the server from which you want to get the directory so this is the IP address of server NFS server this is the directory on the server from which you want to get the NFS data and this is the directory on the client on which you are mounting the server directory so I will write the command that you will be writing on your client mount space IP address of your server then slash home slash NFS this is the directory we created on the server and then slash home slash NFS slash client this is the directory we created on the client so these three commands will complete your client installation I hope everyone is completed the client installation so we can test what we have done go to your server on your server you have created directory at slash home slash NFS go to that directory using cd command you will be running the command that's cd space slash home slash NFS once you go to this directory you have to create a file in this directory using WIM type vim space file name I have given file name as abc press I to write in the file I will write in the file as NFS configuration successful I will save the file using escape shift colon wq enter so I have let's see the file using ls command so you will see this file in your slash extra slash NFS directory now go to client go to the directory which you have just created that is slash home slash NFS client for me it's slash extra slash NFS client and you can if you do ls you will see the same file which we had created on the server that is displayed on the client also if you open this file using WIM space abc you will see the same thing return on that file you can edit this file from client side now I will edit the file I will remove the words configuration successful I will retain only NFS I am doing this from the client side now I am saving the file with escape shift colon wq enter I have done this on NFS client that is osl 52 now I will go to osl 50 that is my server I will see the file here using WIM command WIM abc here I can see the changes reflected now the application is this in our department we have NFS server in which we have the home directories of all students and all the machines in the labs are NFS clients so whenever a student logs on any of the machine he can see his own home directory from any machine through the NFS configuration so you need not copy your data every time you go to some different machine every way every of your data will be there in your home directory and it can be accessible through any of the client machine now the fourth slide is simple what you had done in client installation you had mounted the directory using mount command but on every reboot you do not want to run this command again and again so what you can do is on the client side slash etc slash fs tab you can write entries like this ip will be the ip address of the server this is the directory to be mounted from the server this is the directory on the client and we are specifying the file system type as NFS this this and this has to be written on the same single line so these are not the two lines this has to be written defaults and all this has to be written after NFS preferably using tabs in between so with this configuration on every reboot of the your client machine these directories will be automatically mounted and you need not run the third mount command again and again okay that is how we have completed the NFS client server installation and configuration process thank you