Linux 関係覚え書き

環境

RHEL 5.8

NIS サービス範囲の設定

# cd /usr/share/doc/ypserv-2.19
# cp securenets /var/yp
# cd /var/yp
# vi securenets
--------------------------------------
# Always allow access for localhost
255.0.0.0       127.0.0.0

255.255.255.0   192.168.1.0

# This line gives access to everybody. PLEASE ADJUST!
#0.0.0.0                0.0.0.0
--------------------------------------

NIS マスターの初期設定

# ypdomainname nisdomain.example.com
# service ypserv start
# /usr/lib64/yp/ypinit -m
At this point, we have to construct a list of the hosts which will run NIS
servers.  ns.nisdomain.example.com is in the list of NIS server hosts.  Please continue to add
the names for the other hosts, one per line.  When you are done with the
list, type a <control D>.
 next host to add:  ns.nisdomain.example.com
 next host to add:
The current list of NIS servers looks like this:

ns.nisdomain.example.com

Is this correct?  [y/n: y]  y
We need a few minutes to build the databases...
Building /var/yp/nisdomain.example.com/ypservers...
Running /var/yp/Makefile...
gmake[1]: ディレクトリ `/var/yp/nisdomain.example.com' に入ります
Updating passwd.byname...
Updating passwd.byuid...
Updating group.byname...
Updating group.bygid...
Updating hosts.byname...
Updating hosts.byaddr...
Updating rpc.byname...
Updating rpc.bynumber...
Updating services.byname...
Updating services.byservicename...
Updating netid.byname...
Updating protocols.bynumber...
Updating protocols.byname...
Updating mail.aliases...
gmake[1]: ディレクトリ `/var/yp/nisdomain.examplecom' から出ます

ns.nisdomain.example.com has been set up as a NIS master server.

Now you can run ypinit -s ns.nisdomain.example.com on all slave server.
#
# service yppasswdd start

/etc/sysconfig/network に以下の行を追加

START_YPSERV=yes
START_YPPASSWDD=yes
START_YPBIND=yes
NISDOMAIN=nisdomain.example.com

/etc/yp.conf に以下の行を追加

domain nisdomain.example.com server 127.0.0.1
# chkconfig ypserv on
# chkconfig yppasswd on
# chkconfig ypbind on

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2012-09-25 (火) 13:11:17