강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

NIS 마스터서버에서 ypinit으로 NIS서버 구성하기

작성자 정보

  • 구돌 작성
  • 작성일

컨텐츠 정보

본문

NIS 마스터서버에서 ypinit으로 NIS서버 구성하기

 

다음은 NIS마스터서버에서 ypinit명령어를 사용하여 NIS데이터베이스를 생성하고 NIS맵을 설정하는 실제 예입니다.   

 

 

 앞서 설명드린바와 같이 NIS마스터서버에서는 ypinit명령어에 -m옵션을 사용하셔야 합니다.   

 

 

 

 

[root@command yp]# /usr/lib/yp/ypinit -m

 

At this point, we have to construct a list of the hosts which will run NIS

servers.  command.superuser.co.kr is in the list of NIS server hosts.  Please continue to add

the names for the other hosts, one per line.  When you are done with the

list, type a <control D>.

        next host to add:  command.superuser.co.kr

        next host to add:  bible.superuser.co.kr

        next host to add:  file.superuser.co.kr

        next host to add:  ^D

The current list of NIS servers looks like this:

 

command.superuser.co.kr

bible.superuser.co.kr

file.superuser.co.kr

 

Is this correct?  [y/n: y]  y

We need a few minutes to build the databases...

Building /var/yp/superuser/ypservers...

Running /var/yp/Makefile...

gmake[1]: Entering directory `/var/yp/superuser'

Updating passwd.byname...

Updating passwd.byuid...

Updating group.byname...

Updating group.bygid...

Updating hosts.byname...

Updating hosts.byaddr...

Updating rpc.byname...

Updating rpc.bynumber...

Updating services.byname...

Updating services.byservicename...

Updating netid.byname...

Updating protocols.bynumber...

Updating protocols.byname...

Updating mail.aliases...

gmake[1]: Leaving directory `/var/yp/superuser'

 

command.superuser.co.kr has been set up as a NIS master server.

 

Now you can run ypinit -s command.superuser.co.kr on all slave server.

[root@command yp]#

 

위와 같이 “/usr/lib/yp/ypinit -m”을 실행하시면 “next host to add:”가 나타나고 같은 NIS도메인을 사용하는 다른 호스트를 입력하시면 됩니다.   

 

 

 입력이 마무리가 되고나면 “^D” 를 입력하십시요. 그런 다음 “Is this correct?  [y/n: y]”에는 “y”를 입력하시면 됩니다.   

 

 

 여기까지 마치고 나면 NIS도메인명의 “/var/yp/NIS도메인으로 된 디렉토리를 생성하고 “/var/yp/Makefile”을 참조하여 NIS데이터베이스파일들을 “/var/yp/NIS도메인에 생성합니다.   

 

 

 

 

이번 예에서 NIS도메인명이 “superuser”이므로 /var/yp/superuser라는 디렉토리를 생성하고 그 안에 NIS데이터베이스파일들을 생성하고 맵을 설정하였습니다.   

 

 

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,039 명
  • 현재 강좌수 :  35,848 개
  • 현재 접속자 :  88 명