ubuntu 의 NFS 서버 와 타 겟 기기 의 NFS 클 라 이언 트


Configure NFS Server to share any directories in local network.
[1]
Configuration on the system you want to build NFS server
root@dlp:~#
aptitude -y install nfs-kernel-server
root@dlp:~#
vi /etc/exports
# write like below *note
/home 10.0.0.0/24(rw,sync,fsid=0,no_root_squash,no_subtree_check)
# *note
/home
⇒ shared directory
10.0.0.0/24
⇒ range of networks NFS permits accesses
rw
⇒ possible to read and write
sync
⇒ synchronize
no_root_squash
⇒ enable root privilege
no_subtree_check
⇒ disable subtree check
root@dlp:~#
/etc/init.d/nfs-kernel-server restart
 * Stopping NFS kernel daemon
   ...done.
 * Unexporting directories for NFS kernel daemon...
   ...done.
 * Exporting directories for NFS kernel daemon...
   ...done.
 * Starting NFS kernel daemon
   ...done.

[2]
Configuration on NFS clients
root@www:~#
aptitude -y install nfs-common
root@www:~#
mount -t nfs dlp.server.world:/home /home
root@www:~#
df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu-root   18G  1.3G   16G   8% /
udev                     993M  4.0K  993M   1% /dev
tmpfs                    401M  228K  401M   1% /run
none                     5.0M     0  5.0M   0% /run/lock
none                    1002M     0 1002M   0% /run/shm
/dev/vda1                228M   25M  192M  12% /boot
dlp.server.world:/home    18G  1.3G   16G   8% /home

# home directory on NFS is mounted
root@www:~#
vi /etc/fstab
# add at the last: change home directory this server mounts to the one on NFS
dlp.server.world:/home   /home  nfs     defaults        0       0

좋은 웹페이지 즐겨찾기