配置NIS集成autofs环境 (1)
- 说明配置nis集成autofs环境,和bear的jumpstart结合起来用。 NIS治理域www.test.com NISmasterserveripaddress:10.1.100.2,hostname:SUN-2 NISslaveserveripaddress:10.1.100.1,hostname:SUN-1 HowtoconfigureaNISMasterServer 1、#cp/etc/nsswitch.nis/etc/nsswitch.conf 2、#domainnamewww.test.com 3、#domainname>/etc/defaultdomain 4、#vi/etc/locale www.test.comen_US 5、#vi/
说明配置nis集成autofs环境,和bear的jumpstart结合起来用。
NIS治理域www.test.com
NISmasterserveripaddress:10.1.100.2,hostname:SUN-2
NISslaveserveripaddress:10.1.100.1,hostname:SUN-1
HowtoconfigureaNISMasterServer
1、#cp/etc/nsswitch.nis/etc/nsswitch.conf
2、#domainnamewww.test.com
3、#domainname%26gt;/etc/defaultdomain
4、#vi/etc/locale
www.test.comen_US
5、#vi/etc/hosts
10.1.100.2SUN-2loghosttimehost
6、#vi/etc/auto_home
SUN-2:/export/home/%26amp;
7、#touch/etc/ethers/etc/bootparams/etc/netgroup/etc/netmasks.
8、#vi/etc/timezone
US/Mountainwww.test.com
9、#vi/etc/dfs/dfstab
share–Fnds–d“homedirs”/export/home
10、#/etc/init.d/nfs.serverstart
11、#vi/etc/passwd
(modifyfilefrom/export/home/liliento/home/lilien)
12、#ypinit–m
InorderforNIStooperatesuccessfully,wehavetoconstructalistof
theNISservers.PleasecontinuetoaddthenamesforYPserversinorder
ofpreference,oneperline.Whenyouaredonewiththelist,type
a%26lt;controlD%26gt;orareturnonalinebyitself.
nexthosttoadd:SUN-2
nexthosttoadd:SUN-1
nexthosttoadd:^D
Thecurrentlistofypserverslookslikethis:
server1
Isthiscorrect?[y/n:y]y
InstallingtheYPdatabasewillrequirethatyouanswerafewquestions.
Questionswillallbeaskedatthebeginningoftheprocedure.
Doyouwantthisproceduretoquitonnon-fatalerrors?[y/n:n]n
OK,pleaseremembertogobackandredomanuallywhateverfails.Ifyou
don't,somepartofthesystem(perhapstheypitself)won'twork.
13、#/usr/lib/netsvc/yp/ypstart
howtoconfigureaNISClient
1、#cp/etc/nsswitch.nis/etc/nsswitch.conf
2、#vi/etc/hosts
10.1.100.2SUN-2loghost
10.1.100.1SUN-1
3、#domainnamewww.test.com
4、#domainname%26gt;/etc/defaultdomain
5、#ypinit–c
(whenpromptedforalistofNISservers,enterthenamesoftheNISmaster
andallslaveservers)
6、#/usr/lib/netsvc/yp/ypstart
howtoconfigureaNISslaveserver
1、#cp/etc/nsswitch.nis/etc/nsswitch.conf
2、editthe/etc/hostsfiletoensurethattheNISmasterandall
NISslaveservershavebeendefined
3、#domainnamewww.test.com
4、#domainname%26gt;/etc/defaultdomain
5、#ypinit-c
(whenpromptedforalistofNISservers,enterthenamesoftheNISmaster
andallslaveservers)
(ontheNISmaster,ensuretheypservprocessisrunning,wecanuse
#ps–ef|grepypserv)
6、#/usr/lib/netsvc/yp/ypstart
7、#ypinit–s
(ifyoudidnotaddthenameoftheNISslaveserverwhenyouinitially
configuredtheNISmasterserver,youshouldrun#ypinit–moncemoreon
theNISmasterserver)
NIS治理域www.test.com
NISmasterserveripaddress:10.1.100.2,hostname:SUN-2
NISslaveserveripaddress:10.1.100.1,hostname:SUN-1
HowtoconfigureaNISMasterServer
1、#cp/etc/nsswitch.nis/etc/nsswitch.conf
2、#domainnamewww.test.com
3、#domainname%26gt;/etc/defaultdomain
4、#vi/etc/locale
www.test.comen_US
5、#vi/etc/hosts
10.1.100.2SUN-2loghosttimehost
6、#vi/etc/auto_home
SUN-2:/export/home/%26amp;
7、#touch/etc/ethers/etc/bootparams/etc/netgroup/etc/netmasks.
8、#vi/etc/timezone
US/Mountainwww.test.com
9、#vi/etc/dfs/dfstab
share–Fnds–d“homedirs”/export/home
10、#/etc/init.d/nfs.serverstart
11、#vi/etc/passwd
(modifyfilefrom/export/home/liliento/home/lilien)
12、#ypinit–m
InorderforNIStooperatesuccessfully,wehavetoconstructalistof
theNISservers.PleasecontinuetoaddthenamesforYPserversinorder
ofpreference,oneperline.Whenyouaredonewiththelist,type
a%26lt;controlD%26gt;orareturnonalinebyitself.
nexthosttoadd:SUN-2
nexthosttoadd:SUN-1
nexthosttoadd:^D
Thecurrentlistofypserverslookslikethis:
server1
Isthiscorrect?[y/n:y]y
InstallingtheYPdatabasewillrequirethatyouanswerafewquestions.
Questionswillallbeaskedatthebeginningoftheprocedure.
Doyouwantthisproceduretoquitonnon-fatalerrors?[y/n:n]n
OK,pleaseremembertogobackandredomanuallywhateverfails.Ifyou
don't,somepartofthesystem(perhapstheypitself)won'twork.
13、#/usr/lib/netsvc/yp/ypstart
howtoconfigureaNISClient
1、#cp/etc/nsswitch.nis/etc/nsswitch.conf
2、#vi/etc/hosts
10.1.100.2SUN-2loghost
10.1.100.1SUN-1
3、#domainnamewww.test.com
4、#domainname%26gt;/etc/defaultdomain
5、#ypinit–c
(whenpromptedforalistofNISservers,enterthenamesoftheNISmaster
andallslaveservers)
6、#/usr/lib/netsvc/yp/ypstart
howtoconfigureaNISslaveserver
1、#cp/etc/nsswitch.nis/etc/nsswitch.conf
2、editthe/etc/hostsfiletoensurethattheNISmasterandall
NISslaveservershavebeendefined
3、#domainnamewww.test.com
4、#domainname%26gt;/etc/defaultdomain
5、#ypinit-c
(whenpromptedforalistofNISservers,enterthenamesoftheNISmaster
andallslaveservers)
(ontheNISmaster,ensuretheypservprocessisrunning,wecanuse
#ps–ef|grepypserv)
6、#/usr/lib/netsvc/yp/ypstart
7、#ypinit–s
(ifyoudidnotaddthenameoftheNISslaveserverwhenyouinitially
configuredtheNISmasterserver,youshouldrun#ypinit–moncemoreon
theNISmasterserver)





