HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 94

To Schedule Regular Map Transfers from the NIS Master Server, To Add a Slave Server to Your NIS

Page 94 highlights

NIS 8. Issue the following commands to run the NIS startup scripts: # /sbin/init.d/nis.server start # /sbin/init.d/nis.client start Do not issue the nis.client start command until at least one NIS server is running on the same subnetwork as the client. If you start the NIS client before it has an NIS server to which to bind, the client will hang indefinitely. In order to receive map updates from the NIS master server, you must add the new slave server to the ypservers map on the master server. To Schedule Regular Map Transfers from the NIS Master Server Follow these steps to schedule regular map transfers from the NIS master server: 1. Login as root to the slave server. 2. Copy the ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour scripts from the /usr/newconfig/var/yp directory to the /var/yp directory. # cp /usr/newconfig/var/yp/ypxfr_1perday /var/yp # cp /usr/newconfig/var/yp/ypxfr_2perday /var/yp # cp /usr/newconfig/var/yp/ypxfr_1perhour /var/yp 3. Create a crontab file that invokes these files at regular times. The following is an example crontab file: 0 21 * * * /var/yp/ypxfr_1perday 30 5,19 * * * /var/yp/ypxfr_2perday 15 * * * * /var/yp/ypxfr_1perhour This file runs the ypxfr_1perday script at 9:00 PM every night. It runs the ypxfr_2perday script at 5:30 AM and 7:30 PM every day. It runs the ypxfr_1perhour at 15 minutes past every hour. 4. Issue the following command to enter the file into crontab, # crontab filename where filename is the contab file you just created. If you have created customized NIS maps for your domain, you will have to add them to the appropriate scripts. You can also use the scripts provided as templates for creating your own scripts. In some domains, transferring the passwd maps once per hour generates too much network traffic. If you encounter this problem, schedule transfers of the passwd maps for less frequent intervals. If you have multiple slave servers, schedule the map transfers for different times on different servers, so all the servers are not performing transfers at the same time. To Add a Slave Server to Your NIS Domain Follow these steps to add a slave server to your NIS domain: 1. Login as root to the NIS master server. 2. Issue the following command, where domainname is the name of the domain to which you want to add the slave server: 89

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

NIS
89
8.
Issue the following commands to run the NIS startup scripts:
# /sbin/init.d/nis.server start
# /sbin/init.d/nis.client start
Do not issue the
nis.client start
command until at least one NIS server is running on the same subnetwork
as the client. If you start the NIS client before it has an NIS server to which to bind, the client will hang
indefinitely.
In order to receive map updates from the NIS master server, you must add the new slave server to the
ypservers
map on the master server.
To Schedule Regular Map Transfers from the NIS Master Server
Follow these steps to schedule regular map transfers from the NIS master server:
1.
Login as
root
to the slave server.
2.
Copy the
ypxfr_1perday
,
ypxfr_2perday
, and
ypxfr_1perhour
scripts from the
/usr/newconfig/var/yp
directory to the
/var/yp
directory.
# cp /usr/newconfig/var/yp/ypxfr_1perday /var/yp
# cp /usr/newconfig/var/yp/ypxfr_2perday /var/yp
# cp /usr/newconfig/var/yp/ypxfr_1perhour /var/yp
3.
Create a
crontab
file that invokes these files at regular times. The following is an example
crontab
file:
0 21 * * * /var/yp/ypxfr_1perday
30 5,19 * * * /var/yp/ypxfr_2perday
15 * * * * /var/yp/ypxfr_1perhour
This file runs the
ypxfr_1perday
script at 9:00 PM every night. It runs the
ypxfr_2perday
script at
5:30 AM and 7:30 PM every day. It runs the
ypxfr_1perhour
at 15 minutes past every hour.
4.
Issue the following command to enter the file into
crontab
,
# crontab filename
where
filename
is the contab file you just created.
If you have created customized NIS maps for your domain, you will have to add them to the appropriate
scripts. You can also use the scripts provided as templates for creating your own scripts.
In some domains, transferring the
passwd
maps once per hour generates too much network traffic. If you
encounter this problem, schedule transfers of the
passwd
maps for less frequent intervals.
If you have multiple slave servers, schedule the map transfers for different times on different servers, so all
the servers are not performing transfers at the same time.
To Add a Slave Server to Your NIS Domain
Follow these steps to add a slave server to your NIS domain:
1.
Login as
root
to the NIS master server.
2.
Issue the following command, where
domainname
is the name of the domain to which you want to
add the slave server: