OS/LINUX2005. 2. 15. 00:57
반응형
NFS설정하기 (Linux -> HPUX)
 
1. rpcinfo -p HOSTIP 로 체크 (Client -> Server)
 
2. nfsconfig 화일 수정
/etc/rc.config.d/nfsconf
NFS_CLIENT=0
NFS_SERVER=1              <-----  0을 1로 수정한다.
NUM_NFSD=16
 
3. export 화일을 생성하여 공유할 디렉토리를 지정한다.
 
pc1:[/etc/net] vi /etc/exports
"/etc/exports" 1 line, 34 characters
/public  -ro
 
 EXAMPLES
      /usr/games cocoa fudge              # export to only these machines
      /usr       -access=clients          # export to my clients
      /usr/local                          # export to the world
      /usr2      -access=bison:deer:pup   # export to only these machines
      /var/adm   -root=bison:deer         # give root access only to these
      /usr/new   -anon=0                  # give all machines root access
      /usr/temp  -rw=ram:alligator        # export read-write only to these
      /usr/bin   -ro                      # export read-only to everyone
      /usr/stuff -access=bear,anon=-2,ro  # several options on one line
      /usr/subnet -access=@mysubnet    #use mysubent in /etc/networks
      /usr/subnet1 -access=@192.5          #clients must be in the 192.5.0.0 subnet
      /usr/domain -access=.myd.myc.com #clients must be in .myd.myc.com
      /usr/restrict -access=-host1.myd.myc.com:sales # disallow -host1 in the sales netgroup.
~
~
4. nfs관련 데몬을 Restart한다. (생성된 exports화일을 읽어오기위하여)
pc1:[/etc/net] /sbin/init.d/nfs.server restart
usage: /sbin/init.d/nfs.server {start|stop}
 

pc1:[/etc/net] /sbin/init.d/nfs.server stop
killing nfsd
killing rpc.mountd
pc1:[/etc/net] /sbin/init.d/nfs.server start
    starting NFS SERVER networking
   
    starting up the rpcbind daemon
        rpcbind already started, using pid: 544
    Reading in /etc/exports
    starting up the mount daemon
        /usr/sbin/rpc.mountd
    starting up the NFS daemons
        /usr/sbin/nfsd 16
    starting up the Status Monitor daemon
        /usr/sbin/rpc.statd
    starting up the Lock Manager daemon
        /usr/sbin/rpc.lockd
pc1:[/etc/net]
 

5. client쪽 /etc/fstab 수정
7. client쪽  /etc/hosts에 서버 등록
6. mount -t nfs pc1:/public /public  혹은 mount -a
 
최종 완료
 
 
 
 
 
 
반응형
Posted by [PineTree]