[ CnUnix ] in KIDS 글 쓴 이(By): Valkimi () 날 짜 (Date): 1994년10월19일(수) 04시30분58초 KST 제 목(Title): [A] Sun 에서 DNS Sun Admin. FAQ 에 보시면은 잘나와있습니다. 제가 쥐잡아 올리죠 1) How to get DNS working when not running NIS ? Note: Solaris2.x users should see question 64.. The "normal" behavior of a hostname lookup under NIS is to consult the NIS hosts map and then DNS (if configured). If you are not running NIS the system will only look in the /etc/hosts file. You have two options to correct this situation: A) Re-build the shared library version of libc with replacement resolver routines which understand DNS. Resolv+ provides one of the best sets of replacement routines and it cames with detailed instructions. Also, it will take of fixing the many problems with the normal Sun shared library rebuild. Finally, resolv+ can be obtained from thor.ece.uc.edu. Get the file /pub/sun-faq/resolv+2.1.1.tar.Z. Rebuilding the shared library will not allow statically linked binaries to do name resolving and these binaries will only use /etc/hosts. You can get "dynamically linked" replacements for these via anonymous ftp to thor.ece.uc.edu(129.137.8.118) and get the file /pub/sun-faq/rcp-mount.dynamic.tar.Z. This file only contains sun4 binaries. A statically linked version of mount that uses DNS instead of NIS is available from thor.ece.uc.edu also. To be able to rebuild shared libraries you need to install the "shlib custom" option which is avaiable with SunOS version 4.1 or greater. If you want to do it under 4.0.3 you need to get the patches available from ftp.uu.net(192.48.96.9) in the /systems/sun/sun-fixes directory. You will need the following files: lib.msg, libc_pic.a.sun3 or libc_pic.a.sun4 and libc_resolv.so.sun3 or libc_resolv.so.sun4 Make sure to get the README that cames with these files. It is in the same directory. Note: You can still use NIS for other things in environment, such as passwd, and group maps. B) Run NIS with the "hosts" maps only. If you only need DNS capability than change the "all" line /var/yp/Makefile to "all: hosts". It does not require any changes to shared libraries. See question 2 for complete directoins on how to setup DNS with NIS. 2) How to get DNS to be used when running NIS ? First setup the appropriate /etc/resolv.conf file. Something like this should do the "trick". ; ; Data file for a client. ; domain local domain nameserver address of primary domain nameserver nameserver address of secondary domain nameserver where: "local domain" is the domain part of the hostnames. For example, if your hostname is "thor.ece.uc.edu" your "local domain" is "ece.uc.edu". You will need to put a copy of this resolv.conf on all NIS(YP) servers including slaves. Under SunOS 4.1 and greater, change the "B=" at the top of the /var/yp/Makefile to "B=-b" and setup NIS in the usual fashion. You will need reboot or restart ypserv for these changes to take affect. Under 4.0.x, edit the Makefile or apply the following "diff": *** Makefile.orig Wed Jan 10 13:22:11 1990 --- Makefile Wed Jan 10 13:22:01 1990 *************** *** 63 **** ! | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/hosts.byname; \ --- 63 ---- ! | $(MAKEDBM) -b - $(YPDBDIR)/$(DOM)/hosts.byname; \ *************** *** 66 **** ! | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/hosts.byaddr; \ --- 66 ---- ! | $(MAKEDBM) -b - $(YPDBDIR)/$(DOM)/hosts.byaddr; \ 제가 쓴 방법은 resolv+ 가지구 와서 라이부러리 바까치기 했습니다. 그러면은 아주 잘됩니다. 도움이 되셨길 |