User Tools

Site Tools


自作クラスタ計算機:nisの基本設定

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
自作クラスタ計算機:nisの基本設定 [2020/08/17 09:41]
koudai [計算ノード]
自作クラスタ計算機:nisの基本設定 [2021/01/23 20:28]
koudai
Line 1: Line 1:
 ====== 概要 ====== ====== 概要 ======
  
-  * プライベートLAN内でコンピュータの設定を共有するシステムをNetwork Information Service (NIS) と呼びます +  * プライベートLAN内でコンピュータの設定(ユーザー情報など)を共有するシステムをNetwork Information Service (NIS) と呼びます 
-  * 複数人でクラスタ計算機を使用するとき、それぞれの計算ノードに各自のアカウントを一つずつ作成するのは非常に手間であるので、このシステムを使+  * 複数人でクラスタ計算機を使用するとき、それぞれの計算ノードに各自のアカウントを一つずつ作成するのは非常に手間であるので、このシステムを使います
   * 共有する設定を管理するサーバをNISサーバと呼び、今回は管理ノードをその役割に当てます   * 共有する設定を管理するサーバをNISサーバと呼び、今回は管理ノードをその役割に当てます
  
Line 19: Line 19:
 $ sudo vi /etc/defalut/nis $ sudo vi /etc/defalut/nis
 </code><file - nis> </code><file - nis>
 +...
 NISSERVER=master NISSERVER=master
 +...
 </file> </file>
   - /etc/yp.conf にNISサーバのIPアドレスまたはホスト名を指定する<code>   - /etc/yp.conf にNISサーバのIPアドレスまたはホスト名を指定する<code>
Line 35: Line 37:
 </file> </file>
     * これによりプライベートネットワークからのみNISサーバへの接続を許可します     * これによりプライベートネットワークからのみNISサーバへの接続を許可します
 +  - NISを再起動します<code>
 +$ sudo systemctl restart rpcbind nis 
 +</code>
   - NISデータベースを更新する<code>   - NISデータベースを更新する<code>
 $ sudo /usr/lib/yp/ypinit -m $ sudo /usr/lib/yp/ypinit -m
  
 At this point, we have to construct a list of the hosts which will run NIS At this point, we have to construct a list of the hosts which will run NIS
-servers.  dlp.srv.world is in the list of NIS server hosts.  Please continue to add+servers.  kanri 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 the names for the other hosts, one per line.  When you are done with the
 list, type a <control D>. list, type a <control D>.
Line 51: Line 56:
 We need a few minutes to build the databases... We need a few minutes to build the databases...
 (以下略) (以下略)
-</code> 
-  - NISを再起動します(いらない?)<code> 
-$ sudo systemctl restart nis 
 </code> </code>
 +
  
  
Line 63: Line 66:
 $ sudo apt install nis $ sudo apt install nis
 </code> </code>
-    * NISドメイン名はNISサバのときに設定したものと同じにする+    * NISドメイン名は管理ノドで設定したものと同じにする
   - /etc/yp.conf にNISドメイン名とNISサーバのIPアドレスを指定する<code>   - /etc/yp.conf にNISドメイン名とNISサーバのIPアドレスを指定する<code>
 $ sudo vi /etc/yp.conf $ sudo vi /etc/yp.conf
Line 69: Line 72:
 domain kanri.nis server 192.168.0.1 domain kanri.nis server 192.168.0.1
 </file> </file>
-  - /etc/nsswitch.conf に、/etc/ にある passwd, group, shadow, hosts はNISサーバのものを使用するように指定する(OSのバージョンによって微妙に変わってくるが、それぞれの項目の先頭に nis 付け加えるだけでオーケー)<code>+  - /etc/nsswitch.conf に、/etc/ にある passwd, group, shadow, hosts はNISサーバのものを使用するように指定する(OSのバージョンによって微妙に変わってくるが、それぞれの項目の先頭に nis 付け加えるだけでオーケー)<code>
 $ sudo vi /etc/nsswitch.conf $ sudo vi /etc/nsswitch.conf
 </code><file - nsswitch.conf> </code><file - nsswitch.conf>
Line 85: Line 88:
     * グループの管理は管理ノードのみで行いたいため、gshadow(グループのパスワードが暗号化されて入っているファイル)は共有しません     * グループの管理は管理ノードのみで行いたいため、gshadow(グループのパスワードが暗号化されて入っているファイル)は共有しません
   - NISを再起動します<code>   - NISを再起動します<code>
-sudo systemctl restart nis+$ systemctl restart rpcbind nis 
 </code> </code>
 +    * 割と時間がかかります。
  
  
Line 96: Line 100:
 $ sudo make -C /var/yp $ sudo make -C /var/yp
 </code> </code>
-    * **NISサーバの共有する情報を変更したときは、その都度 make -C /var/yp を実行する必要があります**+    * **NISサーバの共有する情報を変更したとき(つまりユーザーの追加したり、ホストファイルを編集したりしたとき)は、その都度 make -C /var/yp を実行する必要があります**
   - 新しいユーザで計算ノードにログインできるか確認します<code>   - 新しいユーザで計算ノードにログインできるか確認します<code>
 $ ssh sugimoto@keisan11 $ ssh sugimoto@keisan11
Line 117: Line 121:
 ===== udevのアップデートに失敗する場合 ===== ===== udevのアップデートに失敗する場合 =====
  
 +  * apt upgrade をすると次のエラーを吐きます<code>
 +Job for systemd-udevd.service failed because a timeout was exceeded.
 +See "systemctl status systemd-udevd.service" and "journalctl -xe" for details.
 +invoke-rc.d: initscript udev, action "restart" failed.
 +● systemd-udevd.service - udev Kernel Device Manager
 +     Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static; vendor preset: enabled)
 +     Active: activating (start) since Xxx xxxx-xx-xx xx:xx:xx UTC; 20ms ago
 +TriggeredBy: ● systemd-udevd-kernel.socket
 +             ● systemd-udevd-control.socket
 +       Docs: man:systemd-udevd.service(8)
 +             man:udev(7)
 +   Main PID: 50463 (systemd-udevd)
 +      Tasks: 1
 +     Memory: 940.0K
 +     CGroup: /system.slice/systemd-udevd.service
 +             └─50463 /lib/systemd/systemd-udevd
 +
 +xxx xx xx:xx:xx keisan11 systemd[1]: Starting udev Kernel Device Manager...
 +dpkg: error processing package udev (--configure):
 + installed udev package post-installation script subprocess returned error exit status 1
 +</code>
   * Ubuntu 18.04, 20.04 で発生を確認   * Ubuntu 18.04, 20.04 で発生を確認
  
自作クラスタ計算機/nisの基本設定.txt · Last modified: 2024/01/20 17:32 by koudai