리눅스

Total 331
Today 0
profile_image
슈퍼아이피
09-08-12 08:47 0개 16회
일반문서
[FreeBSD] NFS

# cat /etc/rc.conf
 
# -- sysinstall generated deltas -- # Mon Sep 15 02:39:05 2008
# Created: Mon Sep 15 02:39:05 2008
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="10.10.117.1"
hostname="xxx.xxx.com"
ifconfig_bce0="inet 10.10.117.54  netmask 255.255.255.0"
keymap="us.iso"
nfs_client_enable="YES"
nfs_server_enable="YES"
rpcbind_enable="YES"
sshd_enable="YES"

 

 

데몬들 확인

 

# ps ax | grep nfsd
  828  ??  Is     0:00.02 nfsd: master (nfsd)
  829  ??  I      0:00.00 nfsd: server (nfsd)
  830  ??  I      0:00.00 nfsd: server (nfsd)
  831  ??  I      0:00.00 nfsd: server (nfsd)
  832  ??  I      0:00.00 nfsd: server (nfsd)
  856  p0  S+     0:00.00 grep nfsd


# ps ax | grep mount
  616  ??  Is     0:00.00 /usr/sbin/mountd -r
  858  p0  S+     0:00.00 grep mount

 

# ps ax | grep bind
  556  ??  Ss     0:00.01 /usr/sbin/rpcbind
  860  p0  RL+    0:00.00 grep bind

 

설정 해 줄 사항들

 

# vi /etc/exports


#The following examples export /usr to 3 machines named after ducks,
#/usr/src and /usr/ports read-only to machines named after trouble makers
#/home and all directories under it to machines named after dead rock stars
#and, /a to a network of privileged machines allowed to write on it as root.
#/usr                   huey louie dewie
#/usr/src /usr/obj -ro  calvin hobbes
#/home   -alldirs       janice jimmy frank
#/a      -maproot=0  -network 10.0.1.0 -mask 255.255.248.0
#
# You should replace these lines with your actual exported filesystems.
# Note that BSD's export syntax is 'host-centric' vs. Sun's 'FS-centric' one.

/NFS서버쪽/Directory -maproot=0 -network 10.10.117.0 -mask 255.255.255.0

 

:wq!

 

# vi /etc/hosts.allow

 

......

 

# Rpcbind is used for all RPC services; protect your NFS!
# (IP addresses rather than hostnames *MUST* be used here)
#rpcbind : 192.0.2.32/255.255.255.224 : allow
#rpcbind : 192.0.2.96/255.255.255.224 : allow
rpcbind : 10.10.117.0/255.255.255.0 : allow
rpcbind : 허락할 IP주소/허락할IP 넷마스크 : allow
rpcbind : ALL : deny # 나머지는 Deny

 

:wq!

 

 

데몬들 | mountd | rpcbind | nfsd | 재시작

 

# ps ax | grep 데몬

# kill -HUP 프로세스넘버

 

 

NFS 서버 확인

 

# showmount -e

Exports list on localhost:
/NFS서버쪽/Directory                         10.10.117.0

 

위와 같이 나오면 서버 側 OK!

 

댓글목록

등록된 댓글이 없습니다.