Ключевые слова:linux, redhat, nfs, fs, (найти похожие документы)
From: Karen Mkoyan <[email protected]>
Subject: Настройка NFS под Linux Red Hat 7.3
INSTALLING NFS ON LINUX RED HAT 7.3
-------------------
QUICK INSTRUCTIONS:
If you have two computers S (192.168.100.1) and C (192.168.200.1) and
want to mount S's disk on C.
NOTE: On both machines you need to install nfs-utils-x.x.x.i386.rpm
Server side installation:
Server# rpm -i nfs-utils-0.3.3-5.i386.rpm
Server# /etc/init.d/portman start
Server# /etc/init.d/nfs start
Server# /etc/init.d/nfslock start
Make all this daemons run on startup (use /usr/sbin/setup utility for that)
Edit /etc/hosts.allow and add
portmap:S (192.168.100.1)
lockd:S (192.168.100.1)
mountd:S (192.168.100.1)
rquotad:S (192.168.100.1)
statd:S (192.168.100.1)
Edit /etc/hosts.deny and add
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
NOTE: Deny access to above mentioned daemons from ALL EXCEPT C(192.168.100.1).
Edit /etc/exports and add
/data 192.168.100.1(rw)
NOTE: Here /data is a directory (or partition) on server machine which
is "shared" as Read-Writable directory for client (192.168.100.1)
Now run
exportfs -ra (to re-export all directories, because you just added one)
this is all for server. Now let's proceed to client side.
It is very alike to server side, but still has some differences.
Client# /etc/init.d/portman start
Client # /etc/init.d/nfs start
Client # /etc/init.d/nfslock start
Make all this daemons run on startup (use /usr/sbin/setup utility for that)
Edit /etc/hosts.allow and add
portmap:S (192.168.200.1)
lockd:S (192.168.200.1)
mountd:S (192.168.200.1)
rquotad:S (192.168.200.1)
statd:S (192.168.200.1)
Edit /etc/hosts.deny and add
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
NOTE: Deny access to above mentioned daemons from ALL EXCEPT S (192.168.100.2).
Now you should be able to mount via NFS.
/bin/mount -tnfs 192.168.100.1:/data /data-of-server/
NOTE: /data is the remote dir, /data-of-server/
Now add this line somewhere to run every time on boot. I added the line
to /etc/rc.d/rc.local ,though there are a way to add it to /etc/fstab .
I think it's the same, cause the result is the same.
Everything done,
Enjoy Your new partition.
Karen Mkoyan
[email protected]
А можно было не перепутывать все, что можно, дабы от этой инструкции была бы какая-нибудь польза?
Какой все-таки IP у S, а какой у C?
Что-то они на протяжении статьи как-то лихо меняются!