In his work and experiments I‘m ignoring Samba. Yes, maybe that won’t let me embed Linux in offices, even though I have scored on that thing.
Beginners often raises questions that can be used to Exchange files between Linux company. I’m guessing I can name three transparent way is FTP, sshfs/SFTP and NFS. About the last and talk.
Let’s talk about what exactly is a network file system (NFS). Network file system. Already pushing some reflections)
So. With NFS, you can work in the same way as with a local file system. When using NFS, nothing is written to/tmp (Unlike FTP or SMB). NFS developers try to make her decision to run. The same NFS has reached good results in terms of performance, speed is high enough as to response and in terms of actual copying speed. Home to 100 megabit wired network I watch hd 1080 p movies from an NFS server, and WiFi is 720 p. Actually, I’m using the NFS server just to access the NAS media store. Quite convenient.
The file system is not browsable. That is, you can only work with it primontirovav it.
Well, Yes, we have an article about the Fast Way, so let’s start.
There is a 2 PC.
1–he is a gateway of 192.168.0.1, and he is the NFS server. Hostnejm–Debian
2 — 192.168.0.2 is the desktop, the NFS client. Hostnejm Is A Desktop.
Set on the NFS server daemon:
root @ Debian: ~ # aptitude install nfs–kernel-server portmap nfs-common
Rasšarim directory/media/hdd1 on NFS. To do this in the/etc/exports need to add something like the following line:
/media/hdd1 192.168.0.0/255.255.255.0 (rw, no_root_squash, async, subtree_check, insecure)
Let me explain what we wrote:
192.168.0.0/255.255.255.0 is allowed to mount this directory for clients with IP addresses in the range 192.168.0.1-192.168.0.255
RW — directory of clients will be mounted with writable (ro — will mount read-only)
no_root_squash–allow remote users with the name root to change anything in this directory (home leave in production — we remove it)
Async — enhances server response while recording
subtree_check — set this option for any catalogs, in addition to/home/$user. For $user–/home/specify no_subtree_check.
insecure — without this option, the server will not be able to connect the MacOS clients. (thanks to LeNsTR for the comment)
Applies the changes from the/etc/exports:
root @ Debian: ~ # exportfs-a
Now mount the NFS directory on the client:
To install the needed packages:
root @ Desktop: ~ # aptitude install portmap nfs-common
And we install directory in the/mnt/nfs1 directory of the preset on the desktop:
root @ Desktop: ~ # mount the 192.168.0.1:/mnt/hdd1/mnt/nfs1
I do not advise to mount the/home directory sabkatalogi
And finally. I’m not montiruû NFS directories automatically at system startup. I just don’t need to. But you can do it by adding the previous command in/etc/rc.local or adding the following line to/etc/fstab:
192.168.0.1:/mnt/hdd1/mnt/nfs1 nfs timeo = 50, hard, intr