NIS 슬레이브서버에서 ypinit으로 NIS서버 구성하기
작성자 정보
- 구돌 작성
- 작성일
컨텐츠 정보
- 2,483 조회
- 0 추천
- 목록
본문
NIS 슬레이브서버에서 ypinit으로 NIS서버 구성하기
그리고 이번에는 NIS슬레이브서버에서 ypinit명령어를 이용하여 NIS슬레이브서버를 설정하는 예를 보겠습니다.
앞의 예에서 보았듯이 NIS마스터서버에서 ypinit을 실행하면 NIS데이터베이스파일들을 직접 생성하지만 NIS슬레이브서버에서 ypinit을 실행하면 지정된 NIS마스터서버로부터 NIS데이터베이스파일들을 가져옵니다.
이때 전송을 담당하는 데몬은 ypxfrd데몬입니다.
(ypxfrd편을 참조하십시요.)
아래의 예는 NIS슬레이브서버인 file.superuser.co.kr에서 ypinit명령어를 이용하여 NIS슬레이브서버를 구성한 예입니다.
즉, 말씀드린바와 같이 대상이 되는 NIS마스터서버는 command.superuser.co.kr이므로 아래와 같이 -s옵션 다음에 command.superuser.co.kr을 지정한 것입니다.
[root@file yp]# /usr/lib/yp/ypinit -s command.superuser.co.kr We will need a few minutes to copy the data from command.superuser.co.kr. Transferring mail.aliases... Trying ypxfrd ... success
Transferring protocols.bynumber... Trying ypxfrd ... success
Transferring services.byservicename... Trying ypxfrd ... success
Transferring netid.byname... Trying ypxfrd ... success
Transferring services.byname... Trying ypxfrd ... success
Transferring rpc.bynumber... Trying ypxfrd ... success
Transferring rpc.byname... Trying ypxfrd ... success
Transferring hosts.byaddr... Trying ypxfrd ... success
Transferring hosts.byname... Trying ypxfrd ... success
Transferring group.bygid... Trying ypxfrd ... success
Transferring group.byname... Trying ypxfrd ... success
Transferring passwd.byname... Trying ypxfrd ... success
Transferring protocols.byname... Trying ypxfrd ... success
Transferring ypservers... Trying ypxfrd ... success
Transferring passwd.byuid... Trying ypxfrd ... success
file.superuser.co.kr's NIS data base has been set up. If there were warnings, please figure out what went wrong, and fix it.
At this point, make sure that /etc/passwd and /etc/group have been edited so that when the NIS is activated, the data bases you have just created will be used, instead of the /etc ASCII files. [root@file yp]# |
NIS마스터서버로부터 NIS데이터베이스파일을 가져올 때 전송을 담당하는 데몬은 “ypxfrd”데몬입니다.
위와 같이 실행이 완료되고 나면 /var/yp/superuser/ 디렉토리에 다음과 같은 NIS데이터베이스파일들이 생성이 됩니다.
[root@file superuser]# ls -l /var/yp/superuser total 332 -rw------- 1 root root 12450 2월 27 11:19 group.bygid -rw------- 1 root root 12458 2 월 27 11:19 group.byname -rw------- 1 root root 12607 2 월 27 11:19 hosts.byaddr -rw------- 1 root root 12984 2 월 27 11:19 hosts.byname -rw------- 1 root root 13110 2 월 27 11:19 mail.aliases -rw------- 1 root root 13713 2 월 27 11:19 netid.byname -rw------- 1 root root 12581 2 월 27 11:19 passwd.byname -rw------- 1 root root 12573 2 월 27 11:19 passwd.byuid -rw------- 1 root root 29201 2 월 27 11:19 protocols.byname -rw------- 1 root root 14518 2 월 27 11:19 protocols.bynumber -rw------- 1 root root 16431 2 월 27 11:19 rpc.byname -rw------- 1 root root 14249 2 월 27 11:19 rpc.bynumber -rw------- 1 root root 49152 2 월 27 11:19 services.byname -rw------- 1 root root 53248 2 월 27 11:19 services.byservicename -rw------- 1 root root 12437 2 월 27 11:19 ypservers [root@file superuser]# |
이번 예에서는 NIS도메인명이 superuser이므로 /var/yp/superuser/ 디렉토리에 NIS데이터베이스파일들이 생성된 것입니다.
관련자료
-
이전
-
다음