48
Chapter 3
Step 2: Define the root domain and its relationship to the Math domain
On server1, you now have a local domain that is configured to bind statically to a root
domain. Use the following procedure to create the actual root domain you want and define
the Math domain as a child of the root domain:
1
Log in as root to server1.
2
Open the Terminal application, located in /Applications/Utilities/, and enter the following
niutil command to create the new root domain. The argument “myschool” will be the root
domain’s NetInfo tag:
[server1:~] root# nidomain -m myschool
NetInfo creates a domain that contains a machine record for server1. The name property of
the record is “server1,” and its ip_address property is the IP address of server1.
3
Add a serves property to server1’s machine record in the new domain to indicate it serves a
domain named Math that has the NetInfo tag “network:”
[server1:~] root# niutil -createprop -t server1/myschool
/machines/server1 serves./myschool Math/network
m
“-createprop” is the niutil command for creating a new property (or overwriting an
existing one).
m
“-t server1/myschool” identifies the database in which you want to create the property.
Since it is not yet connected to a hierarchy, you must identify it by host name and NetInfo
tag.
m
“/machines/server1” indicates you want to create the new property in the record named
server1 in the machines directory of the new domain.
m
“serves” indicates that you want to create a serves property.
m
“./myschool” provides the first value for the new serves property. The value indicates that
server1 serves the current domain (.) from the database with the NetInfo tag “myschool.”
m
“Math/network” provides the second value for the serves property. It indicates that
server1 also serves a domain named Math from the database with the NetInfo tag
“network.”
4
Now add a serves property with three values to the machine record named server1 in the
Math domain, referred to using its NetInfo tag, network, and the notation for current (.):
[server1:~] root# niutil -createprop -t server1/network
/machines/server1 serves server1/local ./network ../myschool
The three serves property values indicate that server1 serves the Math domain’s child
(server1) from the database tagged local, the current domain (.) from the database tagged
network, and the Math domain’s parent (..) from the database tagged myschool.