Toggle Button
회원 가입 아이디/비밀번호 찾기
[레벨:11]까치
조회 수 : 520618
2008.07.16 (14:15:50)
Refer to this website
http://ubuntuforums.org/showthread.php?t=249889

Why NFS?

I simply wanted to experiment with NFS, and couldn't seem to find the documentation here on the forums. I found using NFS just as easy if not easier than using Samba for sharing between a few of my Unix based systems. In order to share a folder it only required a single line in a configuration file under /etc/exports, and a single line under /etc/fstab on the client to mount the share on each client at boot.

I mostly edited and moved things around from these guides to make a more complete single guide to getting this working using Ubuntu.

http://www.cyberciti.biz/tips/ubuntu...nfs-share.html (for client configuration)
http://www.redhat.com/docs/manuals/l...nfs-mount.html (for mounting using fstab)
http://czarism.com/easy-peasy-ubuntu...s-file-sharing (for server configuration)
http://www.freebsd.org/doc/en_US.ISO...twork-nfs.html (contains more info about NFS)

Install NFS Server Support
at the terminal type

sudo apt-get install nfs-kernel-server nfs-common portmap
When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run:

sudo dpkg-reconfigure portmap
sudo /etc/init.d/portmap restart


Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server

invoke your favorite text editor or

sudo vi /etc/exports



Here are some quick examples of what you could add to your /etc/exports

For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255
  • /files 192.168.1.1/24(rw,no_root_squash,async)

Or for Read Only from a single machine
  • /files 192.168.1.2 (ro,async)
save this file and then in a terminal type
sudo /etc/init.d/nfs-kernel-server restart



Also aftter making changes to /etc/exports in a terminal you must type
sudo exportfs -a


Install NFS client support
sudo apt-get install portmap nfs-common


Mounting manually
Example to mount server.mydomain.com:/files to /files. In this example server.mydomain.com is the name of the server containing the nfs share, and files is the name of the share on the nfs server

The mount point /files must first exist on the client machine.
cd /
sudo mkdir files

to mount the share from a terminal type

sudo mount server.mydomain.com:/files /files

Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart


Mounting at boot using /etc/fstab
Invoke the text editor using your favorite editor, or
gksudo gedit /etc/fstab

In this example my /etc/fstab was like this:
  • server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
You could copy and paste my line, and change “servername.mydomain.com:/files”, and “/files” to match your server name:share name, and the name of the mount point you created.
It is a good idea to test this before a reboot in case a mistake was made.

type
mount /files
in a terminal, and the mount point /files will be mounted from the server.


[example]
mount -t nfs XXX.XXX.XXX.xxx:/scratchbox/users/root/home/root/magpie_xxx /scratchbox/users/root/home/root/views -o nolock,tcp

profile

Lee, Youngseok Engineer

S/W Platform Laboratories
Digital Media Communication R&D Center

SAMSUNG ELECTRONICS CO.,LTD

Tel: 82-31-279-8068
Email:magpie777@nate.com

HP: http://www.magpienest.net

문서 첨부 제한 : 0Byte/ 2.00MB
파일 제한 크기 : 2.00MB (허용 확장자 : *.*)
번호
 
닉네임 조회 등록일
44 no image proxy server 설치하기
[레벨:11]까치
1554 2009-02-16
43 What DLS is ...
[레벨:11]까치
11806 2008-10-23
42 no image ALSA
[레벨:11]까치
2973 2008-09-11
41 no image Proc 파일시스템 이해하기
[레벨:11]까치
2574 2008-09-11
40 no image asoundrc asound.conf
[레벨:11]까치
16882 2008-08-09
39 no image static 용어의 개념 및 성질
[레벨:11]까치
5031 2008-07-20
Selected no image NFS in ubuntu
[레벨:11]까치
520618 2008-07-16
37 no image Ubuntu 에서 Synergy 사용하기 (1)
[레벨:11]까치
10346 2008-07-11
36 no image [펌]회사에서 네이트 온 하기!!
[레벨:11]까치
6350 2008-06-13
35 no image To refer about gstreamer
[레벨:11]까치
3481 2008-05-30
Tag List

Copyright © 2011 Powered by magpie