1. Trang chủ
  2. » Công Nghệ Thông Tin

solaris 9 student guide part 2 sa299 phần 9 pdf

86 160 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Configuring NIS (Level 2)
Trường học Sun Microsystems, Inc.
Chuyên ngành Advanced System Administration
Thể loại bài tập
Năm xuất bản 2002
Thành phố Unknown
Định dạng
Số trang 86
Dung lượng 426,56 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Introducing the JumpStart Procedure17-2 Advanced System Administration for the Solaris™ 9 Operating Environment Copyright 2002 Sun Microsystems, Inc.. Introducing the JumpStart Procedure

Trang 1

Exercise: Configuring NIS (Level 2)

Configuring the Network Information Service (NIS) 16-49

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Tasks

This section describes how to create and test the NIS master server, slaveserver, and client Perform the following tasks

Task 1 – Setting Up the NIS Master

Complete the following steps:

1 Change the directory to/var/yp, and make a backup copy of the

5 Populate the defaultdomainfile with your domain name

6 Use the touchcommand to create the ethers,bootparams, and

9 Edit the /etc/auto_homefile, and comment out the +auto_home

entry Add a new entry that supports automatically mounting alluser home directories located in the/export/homedirectory on theNIS master server

Trang 2

Exercise: Configuring NIS (Level 2)

16-50 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

10 Configure the NIS master to share the/export/homedirectory:

a Create an entry in the/etc/dfs/dfstabfile to share the users’home directories

b Check if themountdandnfsdNFS server daemons are running

c If the NFS server daemons are not running, start them Thedirectory listed in/etc/dfs/dfstabwill be automaticallyshared

d If the NFS server daemons are already running, perform thecommand to share the new directory listed in the

/etc/dfs/dfstabfile

11 Create one user account for each member of your lab team

Note – Create their respective home directories in/export/home; forexample:/export/home/user1foruser1,/export/home/user2for

user2, and so on

12 Create a password for each new user account

13 To enable using theautomountservice to mount these users’ homedirectories, you must modify the users’ entries in the/etc/passwd

file on the NIS master server

Edit the /etc/passwdfile, and change the home directory for eachuser from /export/home/usernameto/home/username

14 Copy the/etc/nsswitch.nistemplate to the

/etc/nsswitch.conffile

15 Set up this system as an NIS master server:

a Use theypinit -mcommand to start the setup process

Theypinitcommand lists the current system as an NIS server,and then prompts you for the next host to add as an NIS slaveserver

b Enter the name of the system that you want to use as an NISslave server Press Control-D when the list is complete

Trang 3

Exercise: Configuring NIS (Level 2)

Configuring the Network Information Service (NIS) 16-51

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

c Specify that you do not want theypinitcommand to quit onnonfatal errors

The ypinitcommand then proceeds to build the requiredmaps

Note – If the initialization process is successful, the ypinitcommanddisplays a message indicating that the current system was set up as amaster server without any errors This message is displayed even ifnonfatal errors occur in the procedure

d If the initialization process fails, correct the problems indicated

by the error messages and repeat Steps a, b, and c

16 Start the NIS daemons

17 Verify that this system is the NIS master by using the ypwhich

command

Task 2 – Setting Up the NIS Slave Server

Complete the following steps:

1 Verify that the/etc/hostsfile contains entries for the NIS masterserver and that the system that will become the NIS client

2 Set the NIS domain for this system by using the domainname

command

3 Populate the defaultdomainfile with your domain name

4 Use the ypinitcommand as follows to set up this system as an NISclient:

a Use theypinit -ccommand to start the setup process

b When prompted for a list of NIS servers, enter the name of theNIS master server followed by the name of the local host (whichsubsequently becomes a slave server) Press Control–D toterminate the list

5 Copy the /etc/nsswitch.nistemplate to the

/etc/nsswitch.conffile

6 Start the NIS daemons

7 Verify that this system is using NIS and is bound to the NIS master

by using theypwhichcommand

8 Initialize the system as an NIS slave Indicate that you do not wanttheypinitcommand to quit on nonfatal errors

Trang 4

Exercise: Configuring NIS (Level 2)

16-52 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

The ypinitcommand then proceeds to retrieve the required mapsfrom the master server

If the initialization process is successful, the ypinitcommanddisplays a message that indicates that the NIS database was set upwithout any errors

Note – If you did not add the name of the NIS slave server when you

initially configured the NIS master, this process might fail To correct theproblem, enter the ypinit -mcommand once more on the NIS master,and add the slave server’s host name In the process of updating the NISmaster, the script prompts you for confirmation when it is about todestroy the existing domain database Confirm by typing y Then,initialize the slave server again

9 Stop and restart the NIS daemons on the slave server

10 On the newly configured NIS slave server, test the NIS functionality

by entering the following commands:

# ypwhich -m

# ypcat hosts

Note – The output of theypwhichcommand should include the name ofeach map it provides to the NIS domain and include the name of themaster server that controls the maps

11 List theypserversmap known to the local domain The outputshould include the names of the master and slave servers

Task 3 – Setting Up the NIS Client

Complete the following steps:

1 Verify that the/etc/hostsfile contains entries for the NIS masterand slave servers

2 Set the NIS domain for this system using thedomainnamecommand

3 Populate the defaultdomainfile with your domain name

4 Set up this system as an NIS client:

a Use theypinit -ccommand to start the setup process

b Enter the name of the NIS master server and the NIS slaveserver (in order of preference), and press Control-D to terminatethe list

Trang 5

Exercise: Configuring NIS (Level 2)

Configuring the Network Information Service (NIS) 16-53

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

5 Copy the /etc/nsswitch.nistemplate to the

/etc/nsswitch.conffile

6 Start the NIS daemons

7 Verify that this system is using NIS by using theypwhichcommand

Task 4 – Testing Dynamic Rebind

Complete the following steps:

1 Confirm that the NIS client is bound to the NIS master server buusing theypwhichcommand

Note – The output should list the name of the NIS master server.

2 Test the client’s ability to bind to the NIS slave server when themaster becomes unavailable:

Note – This process only works if you entered the names of both the NIS

master and the NIS slave servers when you set up the client system byusing theypinit -ccommand The NIS client searches only for serverslisted in the /var/yp/binding/domainname/ypserversfile, which the

ypinit -ccommand creates

a On the NIS master server, stop the NIS services

b On the NIS client, determine to which NIS server to which it isbound It can take a minute or two for the client to bind to theNIS slave

Allow a few moments to pass, and then repeat theypwhich

command Do this until you see that the NIS client has bound tothe slave server

3 On the NIS master, start the NIS services

Trang 6

Exercise: Configuring NIS (Level 2)

16-54 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Task 5 – Adding a Custom Map to the NIS Master Database

If entries for an auto_directmap do not exist in theMakefilefile thatyou are using, complete the following steps to add them:

1 On the NIS master server, edit the/var/yp/Makefilefile, and makethe following changes:

a Addauto.directto the list of maps associated with the target

all These entries exist in the second section of the

/var/yp/Makefilefile:

all: passwd group hosts ipnodes ethers networks rpc services protocols \ netgroup bootparams aliases publickey netid netmasks c2secure \ timezone auto.master auto.home \

auth.attr exec.attr prof.attr user.attr audit.user auto.direct

b Add entries for a the new map in the fourth section of the

/var/yp/Makefilefile Place a corresponding entry for

auto.directandauto_directbelow the entries for

auto.homeand auto_home; for example:

c In the third section of theMakefilefile, add the code required

to build theauto_directmap Duplicate the lines associatedwithauto.home, and substitute auto.director auto_direct

for each instance of auto.homeorauto_homein that code Theresult should look like this:

Trang 7

Exercise: Configuring NIS (Level 2)

Configuring the Network Information Service (NIS) 16-55

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

d Save the modified Makefilefile, and exit the editor

2 On the master server, edit the /etc/auto_masterfile to include anentry for the new direct map Add the following line:

3 On the master server, create a file called /etc/auto_direct, andinsert the following line in it Substitute the name of the masterserver formaster_server

4 On all three hosts, rename the existing/usr/share/mandirectory to

/usr/share/man2

5 Create a new directory called /usr/share/man

6 On the master server, add an entry to the/etc/dfs/dfstabfile toshare the/usr/share/man2directory

7 Share the directory

8 Start the NIS daemons on the servers

Note – If the daemons are already running, perform the

/usr/lib/netsvc/yp/ypstopcommand to stop them

9 On the master server, change the directory to /var/yp

10 Update the NIS maps by running the makeutility

Themakecommand hangs when it tries to push the new

auto.directmap to the slave server Press Control-C to stop the

makecommand when this happens

11 On the NIS slave server, use the ypxfrcommand to transfer the

auto.directmap for the first time

12 On the NIS master server, update the NIS maps again by running the

makecommand This time themakecommand should completesuccessfully

13 On all three hosts, use theinit 6command to reboot

14 Verify that you can use the user accounts you created earlier to log in

to the NIS slave server and in to the NIS client

Trang 8

Exercise: Configuring NIS (Level 2)

16-56 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

15 On the NIS slave and NIS client, verify that your home directoryautomatically mounts from the NIS master server

16 On all systems, attempt to access the/usr/share/mandirectory byusing themancommand

If the content of the man page for thelscommand is displayed,your configuration of the direct map in NIS is correct

Trang 9

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-57

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Exercise: Configuring NIS (Level 3)

Perform the following tasks:

● Configure the following

● An NIS master server

● An NIS slave server

● An NIS client

● Test the dynamic rebind feature

● Add a custom map to NIS

Preparation

Choose two partners for this lab, and determine which systems toconfigure as the NIS master server, the NIS slave server, and the NISclient

NIS_master:

NIS_slave: _

NIS_client: _

domainname: _

On all systems, verify that entries for all three hosts exist in the

/etc/hostsfile Refer to your lecture notes as necessary to perform thesteps listed

Trang 10

Exercise: Configuring NIS (Level 3)

16-58 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Task Summary

Perform the following tasks:

● Create and configure an NIS master server Select an NIS domainname to use for your group of three systems Set the domain name,and record its name in the/etc/defaultdomainfile Enter the

touchcommand to create any files in the/etcdirectory that arerequired by the target allin theMakefilefile Edit the automountmaster map and indirect map to comment out “+” entries

● On the system to be the NIS master server, share the/export/home

directory by using NFS Create three user accounts and setpasswords for these users Configure the/etc/passwdfile and theautomount indirect map to allow the users to mount their homedirectories from the NIS master Use theypinit -mcommand toinitialize the NIS master Configure the/etc/nsswitch.conffile forNIS, and start the NIS server daemons

● Create and configure an NIS slave server Set the NIS domain name

to be the same as in the NIS master Use theypinit -ccommand toconfigure the system as an NIS client Configure the

/etc/nsswitch.conffile for NIS and start the NIS client daemons.Use theypinit -scommand to configure the system as an NISslave server Stop and restart the NIS daemons Verify the list ofservers found in theypserversmap

● Create and configure an NIS client system Set the NIS domain name

to be the same as in the NIS master Use theypinit -ccommand toconfigure the system as an NIS client Configure the

/etc/nsswitch.conffile for NIS, and start the NIS client daemons.Test the configuration with the ypwhichcommand

● Test the dynamic rebind feature by stopping the NIS services on theNIS master server Monitor the NIS client with theypwhich

command, and observe when the client binds to the slave server.Start the NIS services on the NIS master

● Make the appropriate changes in the /var/yp/Makefilefile tosupport a new automount direct map called auto_direct Createthe direct map in the /etcfile Configure the direct map and NFSshares to allow all three systems to automatically mount the manpages from the NIS master server

● Test if the new users can log in on all three systems Verify that theirhome directories automatically mount Verify that the man pages areavailable through theautomountservice on all three systems

Trang 11

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-59

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Tasks and Solutions

This section describes how to create and test the NIS master server, slaveserver, and client

Task 1 – Setting Up the NIS Master

Complete the following steps:

1 Change the directory to/var/yp, and make a backup copy of the

Note – Replace yourdomainwith your chosen domain name

5 Populate the defaultdomainfile with your domain name

# cd /etc

# domainname > defaultdomain

6 Use the touchcommand to create the ethers,bootparams, and

netgroupfiles

# touch ethers bootparams netgroup

7 Create the/etc/timezonefile, and include an appropriate entry foryour time zone and NIS domain

For example, the following entry would set the time zone forsystems located within an NIS domain calledyourdomain

Trang 12

Exercise: Configuring NIS (Level 3)

16-60 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Note – Replace your_timezonetime zone with your local time zone and

yourdomainwith your own domain name

8 Edit the /etc/auto_masterfile, and comment out the

+auto_masterentry

# Master map for automounter#

# +auto_master

/net -hosts -nosuid,nobrowse

/home auto_home -nobrowse

/xfn -xfn

9 Edit the /etc/auto_homefile, and comment out the +auto_home

entry Add a new entry that supports automatically mounting alluser home directories located in the /export/homedirectory on theNIS master server

# Home directory map for automounter

#

# +auto_home

* master_server:/export/home/&

10 Configure the NIS master to share the/export/homedirectory:

a Create an entry in the/etc/dfs/dfstabfile to share the users’home directories

share -d “home dirs” /export/home

b Check if themountdandnfsdNFS server daemons are running

# pgrep -xl mountd

# pgrep -xl nfsd

c If the NFS server daemons are not running, start them Thedirectory listed in/etc/dfs/dfstabwill be automaticallyshared

Trang 13

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-61

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Note – Create their respective home directories in /export/home; forexample: /export/home/user1for user1,/export/home/user2for

user2, and so on If you use the Solaris Management Console application

to create the user accounts, the account is configured to use the

automountcommand, and the/export/home/user1directory istranslated to the /home/user1directory

12 Create a password for each new user account

13 To enable using theautomountservice to mount these users’ homedirectories, you must modify the users’ entries in the/etc/passwd

file on the NIS master server

Edit the/etc/passwdfile, and change the home directory for eachuser from/export/home/usernameto/home/username

14 Copy the /net/nsswitch.nistemplate to the

/etc/nsswitch.conffile

# cp nsswitch.nis nsswitch.conf

15 Set up this system as an NIS master server:

a Use theypinit -mcommand to start the setup process

# ypinit -m

Theypinitcommand lists the current system as an NIS server,and then prompts you for the next host to add as an NIS slaveserver

b Enter the name of the system that you want to use as an NISslave server Press Control-D when the list is complete

next host to add: master_server

next host to add: slave_server

next host to add: <Control–D>

(list of servers)

is this list correct? [y/n: y] y

Trang 14

Exercise: Configuring NIS (Level 3)

16-62 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

c Specify that you do not want theypinitcommand to quit onnonfatal errors

quit on nonfatal errors? [y/n: n] n

Theypinitcommand then proceeds to build the requiredmaps

Note – If the initialization process is successful, the ypinitcommanddisplays a message indicating that the current system was set up as amaster server without any errors This message is displayed even ifnonfatal errors occur in the procedure

d If the initialization process fails, correct the problems indicated

by the error messages and repeat Step a, Step , and Step c

16 Start the NIS daemons

Note – Replace yourdomainwith the NIS domain name you used to set

up the NIS master server

3 Populate the defaultdomainfile with your domain name

# cd /etc

# domainname > defaultdomain

Trang 15

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-63

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

4 Use the ypinitcommand as follows to set up this system as an NISclient:

a Use theypinit -ccommand to start the setup process

# ypinit -c

b When prompted for a list of NIS servers, enter the name of theNIS master server followed by the name of the local host (whichsubsequently becomes a slave server) Press Control–D toterminate the list

next host to add: master_server

next host to add: slave_server

next host to add: <Control–D>

(list of servers)

is this list correct? [y/n: y] y

5 Copy the /etc/nsswitch.nistemplate to the

/etc/nsswitch.conffile

# cp nsswitch.nis nsswitch.conf

6 Start the NIS daemons

# /usr/lib/netsvc/yp/ypstart

7 Verify that this system is using NIS and is bound to the NIS master

by using theypwhichcommand

quit on nonfatal errors? [y/n: n] n

Theypinitcommand then proceeds to retrieve the required mapsfrom the master server

If the initialization process is successful, theypinitcommanddisplays a message that indicates that the NIS database was set upwithout any errors

Trang 16

Exercise: Configuring NIS (Level 3)

16-64 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Note – If you did not add the name of the NIS slave server when you

initially configured the NIS master, this process might fail To correct theproblem, enter the ypinit -mcommand once more on the NIS master,and add the slave server’s host name In the process of updating the NISmaster, the script prompts you for confirmation when it is about todestroy the existing domain database Confirm by typing y Then,initialize the slave server again

9 Stop and restart the NIS daemons on the slave server

# /usr/lib/netsvc/yp/ypstop

# /usr/lib/netsvc/yp/ypstart

10 On the newly configured NIS slave server, test the NIS functionality

by entering the following commands:

# ypwhich -m

# ypcat hosts

Note – The output of theypwhichcommand should include the name ofeach map it provides to the NIS domain and include the name of themaster server that controls the maps

11 List theypserversmap known to the local domain The outputshould include the names of the master and slave servers

# ypcat -k ypservers

slave_server

master_server

Trang 17

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-65

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Task 3 – Setting Up the NIS ClientComplete the following steps:

1 Verify that the/etc/hostsfile contains entries for the NIS masterand slave servers

2 Set the NIS domain for this system using the domainnamecommand

# domainname yourdomain

Note – Replace yourdomainwith the NIS domain name you used to set

up the NIS master server

3 Populate the defaultdomainfile with your domain name

# cd /etc

# domainname > defaultdomain

4 Set up this system as an NIS client:

a Use theypinit -ccommand to start the setup process

# ypinit -c

b Enter the name of the NIS master server and the NIS slaveserver (in order of preference), and press Control-D to terminatethe list

next host to add: master_server

next host to add: slave_server

next host to add: <Control–D>

(list of servers)

is this list correct? [y/n: y] y

5 Copy the /etc/nsswitch.nistemplate to the

Trang 18

Exercise: Configuring NIS (Level 3)

16-66 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Task 4 – Testing Dynamic RebindComplete the following steps:

1 Confirm that the NIS client is bound to the NIS master server byusing theypwhichcommand

# ypwhich

master_server

Note – The output should list the name of the NIS master server.

2 Test the client’s ability to bind to the NIS slave server when themaster becomes unavailable:

Note – This process only works if you entered the names of both the NIS

master and the NIS slave servers when you set up the client system byusing theypinit -ccommand The NIS client searches only for serverslisted in the/var/yp/binding/domainname/ypserversfile, which the

ypinit -ccommand creates

a On the NIS master server, stop the NIS services

# /usr/lib/netsvc/yp/ypstop

b On the NIS client, determine to which NIS server to which it isbound It can take a minute or two for the client to bind to theNIS slave

Allow a few moments to pass, and then repeat theypwhich

command Do this until you see that the NIS client has bound tothe slave server

# ypwhich

3 On the NIS master, start the NIS services

# /usr/lib/netsvc/yp/ypstart

Trang 19

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-67

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Task 5 – Adding a Custom Map to the NIS Master Database

If entries for an auto_directmap do not exist in the Makefilefile thatyou are using, complete the following steps to add them:

1 On the NIS master server, edit the/var/yp/Makefilefile, and makethe following changes:

a Addauto.directto the list of maps associated with the target

all These entries exist in the second section of the

/var/yp/Makefilefile:

all: passwd group hosts ipnodes ethers networks rpc services protocols \ netgroup bootparams aliases publickey netid netmasks c2secure \ timezone auto.master auto.home \

auth.attr exec.attr prof.attr user.attr audit.user auto.direct

b Add entries for a the new map in the fourth section of the

/var/yp/Makefilefile Place a corresponding entry for

auto.directand auto_directbelow the entries for

auto.homeand auto_home; for example:

Trang 20

Exercise: Configuring NIS (Level 3)

16-68 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

c In the third section of theMakefilefile, add the code required

to build theauto_directmap Duplicate the lines associatedwithauto.home, and substitute auto.director auto_direct

for each instance of auto.homeorauto_homein that code Theresult should look like this:

d Save the modifiedMakefilefile, and exit the editor

2 On the master server, edit the/etc/auto_masterfile to include anentry for the new direct map Add the following line:

3 On the master server, create a file called/etc/auto_direct, andinsert the following line in it Substitute the name of the masterserver formaster_server

4 On all three hosts, rename the existing/usr/share/mandirectory to

Trang 21

Exercise: Configuring NIS (Level 3)

Configuring the Network Information Service (NIS) 16-69

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

8 Start the NIS daemons on the servers

Note – If the daemons are already running, perform the

/usr/lib/netsvc/yp/ypstopcommand to stop them

Themakecommand hangs when it tries to push the new

auto.directmap to the slave server Press Control-C to stop the

makecommand when this happens

11 On the NIS slave server, use the ypxfrcommand to transfer the

auto.directmap for the first time

# /usr/lib/netsvc/yp/ypxfr auto.direct

12 On the NIS master server, update the NIS maps again by running the

makecommand This time themakecommand should completesuccessfully

# cd /var/yp

# /usr/ccs/bin/make

13 On all three hosts, use theinit 6 command to reboot

# init 6

14 Verify that you can use the user accounts you created earlier to log in

to the NIS slave server and in to the NIS client

15 On the NIS slave and NIS client, verify that your home directoryautomatically mounts from the NIS master server

Trang 22

Exercise Summary

16-70 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Exercise Summary

?

!

Discussion – Take a few minutes to discuss the experiences, issues, or

discoveries that you had during the lab exercises

● Experiences

● Interpretations

● Conclusions

● Applications

Trang 23

Upon completion of this module, you should be able to:

● Describe the JumpStart procedure

● Implement a basic JumpStart server

● Set up JumpStart software configuration alternatives

● Troubleshoot the JumpStart procedure

The following course map shows how this module fits into the currentinstructional goal

Figure 17-1 Course Map

Performing a Flash Installation

Performing Advanced Installation Procedures

Configuring the Custom JumpStart™

Procedure

Trang 24

Introducing the JumpStart Procedure

17-2 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Introducing the JumpStart Procedure

The JumpStart procedure is an automatic installation process available inthe Solaris 9 OE The JumpStart procedure enables you to install theSolaris OE automatically and configure it differently, depending on thecharacteristics of client systems The JumpStart procedure uses theseidentifying characteristics to select the correct configuration for each clientsystem

Purpose of the JumpStart Procedure

System administrators who need to install multiple systems with similarconfigurations can use the JumpStart procedure to automate the

installation process The JumpStart procedure eliminates the need foroperator intervention during the installation process

The advantages of using the JumpStart procedure include the following:

● It lets system administrators avoid the lengthy question-and-answersession that is part of the interactive installation process

● It lets system administrators install different types of systemssimultaneously

● It allows automatic installation of the Solaris 9 OE and unbundledsoftware

● It simplifies administration tasks when widely used applicationsmust be updated frequently

The JumpStart procedure provides considerable time savings whenmultiple or ongoing installations are required for networked computingenvironments

Four main services support the software installation process using theJumpStart procedure:

● Boot services

● Identification services

● Configuration services

● Installation services

Trang 25

Introducing the JumpStart Procedure

Configuring the Custom JumpStart™ Procedure 17-3

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Configuring the JumpStart procedure program requires setting up theseservices on one or more networked servers You can configure a singleserver to provide all four services for the JumpStart procedure, or you canconfigure the services separately on different servers

Figure 17-2 shows a typical JumpStart block diagram

Figure 17-2 JumpStart Server Component Services

Boot Services

To boot the JumpStart client using the network, clients require supportfrom a server that can respond to their Reverse Address Resolution

Protocol (RARP), Trivial File Transfer Protocol (TFTP), and bootparams

file requests A system that provides these services is called a boot server.You can configure a boot server to provide any of the other requiredJumpStart services, or to only provide boot services

JumpStart Server

Router

Boot, Configuration, Identification, and Installation

Services

Boot Services

Boot Server JumpStart Client

JumpStart Client

JumpStart Client

JumpStart Client JumpStart Client

Trang 26

Introducing the JumpStart Procedure

17-4 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

If other servers provide identification, configuration, and installationservices, the boot server identifies those servers for the JumpStart client

To support client RARP requests, the boot server must reside on the samesubnet as the client, but the servers that provide these other services canreside on other network segments

For boot operations to proceed, the following files must be properlyconfigured on the boot server:

● The /etc/ethersfile

● The /etc/inet/hostsfile

● The /tftpbootfile

● The /etc/inet/inetd.conffile

● The /etc/bootparamsfile

● The /etc/dfs/dfstabfile

The/etc/ethersand/etc/inet/hostsfiles configure the boot server tosupport RARP requests from JumpStart clients

For each JumpStart client that the boot server supports, the/tftpboot

directory must contain a symbolic link that points to a network bootstrapprogram The /etc/inet/inetd.conffile must contain an entry thatallows the in.tftpddaemon to run on demand

The boot server provides access to a boot image (a root (/) file system)that all JumpStart clients on the subnet use during the network bootprocess The /etc/bootparamsfile lists the location of this root (/) filesystem and the locations of other directories that the JumpStart clientrequires The/etc/dfs/dfstabfile configures JumpStart servers to sharethe directories that they provide

You can configure boot services using theadd_install_clientscript.The add_install_clientscript allows you to specify all of the

information required in the files that support boot services This scriptalso creates the required files in the/tftpbootdirectory and

appropriately modifies the/etc/inet/inetd.conffile

Trang 27

Introducing the JumpStart Procedure

Configuring the Custom JumpStart™ Procedure 17-5

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Identification Services

JumpStart clients require support from a server to automatically get theanswers to system identification questions that the client systems issue.The identification service is often provided by a boot server, but theservice can be provided by any network server configured to provideidentification

JumpStart clients can obtain identification information from differentsources, including the /etc/inet/hostsfile on the boot server, the

sysidcfgfile, and a name service such as Network Information Service(NIS) or Network Information Service Plus (NIS+) You can use a

combination of these sources to answer the client’s identification requests.Identification information provided in a sysidcfgfile overrides

information provided by other sources

Configuring a server to provide identification services is, for the mostpart, a manual process You must manually edit the sysidcfgfile, andshare the directory where it resides During the installation process,JumpStart clients use the Network File System (NFS) service to mount thedirectory that contains the sysidcfgfile

If you use a name service, configuring identification services involvesediting the source files that the name service uses and running commands

to update the name service

If the JumpStart client cannot obtain a response from a server for anyidentification item, the client interrupts the automatic identification

process and asks for the information

Trang 28

Introducing the JumpStart Procedure

17-6 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Listing Identification Items and Their Sources

Table 17-1 lists the identification items that JumpStart clients usingSPARC®technology require, and also lists the sources in the Solaris 9 OEthat can provide the information In earlier releases of the Solaris OE, thelist of items and usable sources sometimes differed In systems with IntelArchitecture, you might need to specify additional items in thesysidcfg

file

Table 17-1 JumpStart Client Identification Items

Identification Item Configurable With

the sysidcfg File?

Configurable With a Name Service?

Dynamic Host Configuration

Protocol (DHCP)

Internet Protocol Version 6 (IPv6) Yes No

No if DNS or LightweightDirectory Access Protocol (LDAP)

Power management (auto

shutdown)

Trang 29

Introducing the JumpStart Procedure

Configuring the Custom JumpStart™ Procedure 17-7

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

For more information, refer to the Advanced Installation Guide online at

http://docs.sun.com

Configuration Services

JumpStart clients require support from a server to automatically obtainanswers for system configuration questions that they issue A system thatprovides this service is called a configuration server

A configuration server provides information that specifies how the

Solaris OE installation will proceed on the JumpStart client Configurationinformation can include:

● Installation type

● System type

● Disk partitioning and file system specifications

● Configuration cluster selection

● Software package additions or deletions

On the configuration server, files known as profile files store the

configuration information A file calledruleson the configuration serverallows JumpStart clients to select an appropriate profile file

Trang 30

Introducing the JumpStart Procedure

17-8 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Associating a Configuration With a Client

A configuration server shares a directory (typically the/export/config

directory) that minimally contains the files shown in Table 17-2

Table 17-2 Files in the /export/configDirectory

File Description

Therules file Therules file associates classes of clients with specific

installation profiles Classes in therules file areidentified using predefined keywords that include:

The profile files specify how the installation is toproceed and what software is to be installed A separateprofile file can exist for each class of JumpStart client onyour network

Thecheck

script

Run thecheck script after creating therules andprofile files Thecheck script verifies the syntax in the

rulesand profile files If there are no syntax errors, the

check script creates therules.ok file

Therules.ok

file

Thecheck script creates therules.ok file from the

rules file The JumpStart installation procedure readstherules.ok file during the automatic installationprocess (therules file is not read)

Optionalbegin andfinish scripts

The JumpStart client uses begin and finish scripts toperform preinstallation and postinstallation tasks Youcan use these scripts to further customize the

installation process, such as configuring powermanagement on the JumpStart client The begin andfinish scripts are located in the configuration directoryhierarchy shared by the configuration server

Trang 31

Introducing the JumpStart Procedure

Configuring the Custom JumpStart™ Procedure 17-9

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Installation Services

JumpStart clients require support from a server to find an image of theSolaris OE to install A system that provides this service is called an installserver An install server shares a Solaris OE image from a CD-ROM, from

a DVD, or from a local disk JumpStart clients use the NFS service tomount the installation image during the installation process

Sources of the OE Image

An install server provides the Solaris OE image by sharing one of thefollowing:

● The Solaris 9 Software 1 of 2 CD-ROM

● The Solaris 9 Software DVD

● A spooled image of the Solaris 9 OE obtained from either the

The installation image found on the Solaris 9 Software 1 of 2 CD-ROMonly supports installing the Core and End User configuration clusters.The Solaris 9 Software 2 of 2 CD-ROM contains the remainder of theinstallation image, but there is no support for changing CD-ROMs in themiddle of a JumpStart installation procedure

Beginning with the Solaris 8 2/02 release, the Solaris™ Media Kit hasbeen available on either CD-ROM or DVD media

Trang 32

Introducing the JumpStart Procedure

17-10 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

The Spooled Image

An install server can provide installation services by sharing a spooledimage on local disk When you spool the Solaris OE image from CD-ROM

or DVD, the result is a directory that contains the boot image and theinstallation image:

The setup_install_serverscript enables you to spool the boot andinstallation images from the 1 of 2 CD-ROM or from the DVD

The add_to_install_serverscript enables you to spool additionalinstallation image data from the 2 of 2 CD-ROM

The setup_install_serverscript with the-boption enables you tospool only the boot image from the 1 of 2 CD-ROM or from the DVD Thescript supports creating a boot image on a boot server The boot serverdirects the JumpStart client to a separate install server for the installationimage

A Flash Install Image

Flash installation is significantly faster than the current JumpStartinstallation or a Web Start™ network installation methods Flash allowsdetailed customization of the Solaris OE, hardware configuration, andthird-party software packages prior to creation of the clones In addition,Flash installation can provide enterprise-level disaster recovery whennecessary

The boot image JumpStart clients can boot from the root (/) file

system contained in the boot image For example, ifyou spool the Solaris 9 OE into a directory called

/export/install, the boot image would be located

in the/export/install/Solaris_9/Tools/Boot

directory

The installationimage

JumpStart clients install the Solaris OE from theinstallation image

For example, if you spool the Solaris 9 OE into adirectory called/export/install, the installationimage would be located in the

/export/install/Solaris_9/Product directory

Trang 33

Implementing a Basic JumpStart Server

Configuring the Custom JumpStart™ Procedure 17-11

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

Implementing a Basic JumpStart Server

A JumpStart server configuration includes:

● A single server that provides boot, identification, configuration, andinstallation services

● Boot and installation services provided by the Solaris 9 OE boot andinstallation images spooled to the local disk of the server

● Identification services provided by files on the server and a

sysidcfgfile, with no name service in place

● Configuration services provided by a rulesfile that contains anentry for a single JumpStart client, and a profile file that installs theentire Solaris 9 OE distribution into a single slice on the JumpStartclient

The following tasks are required to configure a single JumpStart server toprovide basic software installation services using the JumpStart

procedures:

1 Spool the operating system image

2 Edit the sysidcfgfile

3 Edit the rulesand profile files

4 Run the checkscript

5 Run the add_install_clientscript

6 Boot the client

Spooling the Operating System Image

Spooling the Solaris OE boot and installation image to disk is the mostcommon method of supplying boot and installation services to JumpStartclients You can spool the boot image and installation image to differentservers The following example shows how one server provides both bootand installation services

When you use the Solaris 9 CD-ROM source media, you must use the

setup_install_serverscript to spool the Solaris 9 OE image from the

1 of 2 CD-ROM and use the add_to_install_serverscript to spool theSolaris 9 OE image from the 2 of 2 CD-ROM

Trang 34

Implementing a Basic JumpStart Server

17-12 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

The 1 of 2 CD-ROM provides the boot image and the required portion of

the installation image to install the End User configuration cluster The

2 of 2 CD-ROM provides the remainder of the installation image,containing the data required to install the Developer, Entire Distribution,

or the Entire Distribution with OEM Support configuration cluster

When you use the Solaris 9 DVD source media, you are using the

setup_install_serverscript to spool the Solaris 9 OE boot image andcomplete the installation image to disk

When the spooling procedure is complete, the server has the dataavailable to support boot and installation services for JumpStart clients.The spooled image also contains theadd_install_clientscript that letsyou establish boot and installation support for specific JumpStart clients

To spool the Solaris 9 OE boot and installation images to a local disk,complete the following steps:

1 Create a directory with at least 800 Mbytes of space available to holdthe Solaris OE image Usually the/export/installdirectory isused

# mkdir /export/install

2 Insert the Solaris 9 Software 1 of 2 CD-ROM in the CD-ROM drive orthe Solaris 9 DVD in the DVD drive Allow the volddaemon toautomatically mount the media

3 Change the directory to the location of the setup_install_server

script

# cd /cdrom/cdrom0/s0/Solaris_9/Tools

4 Run thesetup_install_serverscript to copy the Solaris 9 OE bootand installation images to the local disk (this process can take aboutone hour)

Trang 35

Implementing a Basic JumpStart Server

Configuring the Custom JumpStart™ Procedure 17-13

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

6 If you use CD-ROM media, insert the Solaris 9 Software 2 of 2CD-ROM in the CD-ROM drive, and allow thevolddaemon toautomatically mount it

a Change the directory to the location of the

add_to_install_serverscript

# cd /cdrom/cdrom0/Solaris_9/Tools

b Run theadd_to_install_serverscript to copy the remainder

of the installation image to the local disk (this process can takeabout 20 minutes)

# /add_to_install_server /export/install

c Whenadd_to_install_serverfinishes, change the directory

to root (/), and eject the CD-ROM

# cd /

# eject cdrom

To provide complete identification services in the absence of a nameservice, the JumpStart server must provide information in thesysidcfg

file that answers the following questions:

● Will the client be configured to use IPv6 networking?

● What netmask will the client use?

● What is the Internet Protocol (IP) address of the default router?

● What security policy will the client implement?

● What name service will the client use?

● What time zone will the client use?

● What system locale will the client use?

● What system will provide the time-of-day information?

● What is the rootpassword?

Trang 36

Implementing a Basic JumpStart Server

17-14 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

The following example shows the possible entries in a sysidcfgfile thatanswers all of these questions The example contains entries that can beused by any JumpStart client on the same subnet

network_interface=primary {protocol_ipv6=no netmask=255.255.255.0 default_route=192.10.10.100}security_policy=none

name_service=nonetimezone=US/Mountainsystem_locale=en_UStimeserver=192.10.10.100root_password=Hx23475vABDDM

For all of these items listed, you must specify values that are appropriatefor your own systems, location, and network

To configure a genericsysidcfgfile on a JumpStart server, complete thefollowing steps:

1 Create a directory to hold the sysidcfgfile Typically the

/export/configdirectory holds the sysidcfgfile

# mkdir /export/config

2 Change the directory to/export/config, and create a file called

sysidcfgusing a text editor

Trang 37

Implementing a Basic JumpStart Server

Configuring the Custom JumpStart™ Procedure 17-15

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

c For the timezonevalue, enter the correct time zone for yourlocation Time zones are listed in the directory structure belowthe/usr/share/lib/zoneinfodirectory For example, the

US/Mountaintime zone refers to the

4 Save thesysidcfgfile, and exit your edit session

To provide configuration services, the JumpStart server must provide a

rulesfile that allows the JumpStart client to select a profile file Theprofile file must contain information that answers all of the configurationquestions that the JumpStart client requires

If the JumpStart client cannot obtain a response from a server for anyconfiguration item, the client interrupts the automatic configurationprocess and asks for the information

A very basicrulesfile can contain a single entry that allows a singleclient to select a profile file according to its host name For example:

hostname client1 profile1

-This rulesfile causes a JumpStart client calledclient1to use a profilefile called profile1 The dash (-) characters before and after the

profile1file indicate that theclient1system will not run a begin or afinish script

Trang 38

Implementing a Basic JumpStart Server

17-16 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

The name of the profile file must match the name listed in therulesfile,and the profile file must supply all of the configuration information thatthe client requires For example, a simple profile file can contain thefollowing information:

128 Mbytes to the swap area, and allocates the remainder of the disk space

to the root (/) file system, and that the client will install the EntireDistribution with OEM support configuration cluster

To configure a simple rulesand profile file on a JumpStart server,complete the following steps:

1 Create a directory to hold the rulesfile if this directory does notalready exist Usually, the /export/configdirectory holds the

rulesfile

# mkdir /export/config

2 Change the directory to/export/config, and create a file called

rulesusing a text editor

# cd /export/config

# vi rules

3 In therulesfile, add the following line For client_name,substitute the name of your JumpStart client

hostname client_name profile1

-4 Save therulesfile, and exit your edit session

5 Create a file calledprofile1by using a text editor

# vi profile1

Trang 39

Implementing a Basic JumpStart Server

Configuring the Custom JumpStart™ Procedure 17-17

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

6 Add the following lines to the profile1file:

7 Save theprofile1file, and exit your edit session

Before a JumpStart client can use a configuration provided by a JumpStartserver, you must run the checkscript to produce a file called rules.ok.The checkscript validates the syntax of the rulesfile and the profilefiles If the validation completes successfully, the check script creates the

rules.okfile

This procedure assumes that the rulesand profile file that you intend touse exist in the /export/configdirectory, and that the Solaris 9 OE hasbeen spooled below the /export/installdirectory To run thecheck

script on a JumpStart server, complete the following steps:

1 Change the directory to the location of thecheckscript

# cd /export/install/Solaris_9/Misc/JumpStart_sample

2 Copy the checkscript to the/export/configdirectory

# cp check /export/config

Trang 40

Implementing a Basic JumpStart Server

17-18 Advanced System Administration for the Solaris™ 9 Operating Environment

Copyright 2002 Sun Microsystems, Inc All Rights Reserved Enterprise Services, Revision A

3 Change the directory to/export/config, and run thecheckscript

# cd /export/config

# /check

Validating rules

Validating profile profile1

The custom JumpStart configuration is ok

Validating rules

Validating profile profile1

Error in file "profile1", line 4

fileys c0t0d0s0 free /

ERROR: Invalid keyword

Theadd_install_clientscript configures the boot server to provide thenetwork boot services that JumpStart clients require Options to the

add_install_clientscript also let you specify what servers and whatdirectories offer identification, configuration, and installation services

Theadd_install_clientscript options and arguments must match howyou have configured these services on the servers that you intend to use

In the following example, one server provides all the services for theJumpStart procedure Run the add_install_clientscript only on theserver that provides the boot image

You must run theadd_install_clientscript once for each JumpStartclient

Before you run theadd_install_clientscript, edit the

/etc/inet/hostsand /etc/ethersfiles on the boot server, and add aJumpStart client entry to each file The following example shows how anentry for client1in the/etc/inet/hostsfile appears:

192.10.10.4 client1

Ngày đăng: 14/08/2014, 02:22

TỪ KHÓA LIÊN QUAN