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/10/02 19:54]
koudai [計算ノード]
自作クラスタ計算機:nisの基本設定 [2021/01/24 06:33]
koudai
Line 19: Line 19:
 $ sudo vi /etc/defalut/nis $ sudo vi /etc/defalut/nis
 </code><file - nis> </code><file - nis>
 +...
 +# Are we a NIS server and if so what kind (values: false, slave, master)?
 NISSERVER=master NISSERVER=master
 +
 +# Are we a NIS client?
 +NISCLIENT=false
 +...
 </file> </file>
   - /etc/yp.conf にNISサーバのIPアドレスまたはホスト名を指定する<code>   - /etc/yp.conf にNISサーバのIPアドレスまたはホスト名を指定する<code>
Line 35: Line 41:
 </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 60:
 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 60: Line 67:
 ===== 計算ノード ===== ===== 計算ノード =====
  
 +  - NISによってUbuntuがハングアップするのを防ぎます。<code>
 +$ sudo vim /lib/systemd/system/systemd-logind.service
 +# IPAddressDeny=any をコメントアウト
 +$ sudo systemctl daemon-reload
 +</code>
 +    * https://qiita.com/kakinaguru_zo/items/18258d4dd296a755badd
   - NISのパッケージをインストールする<code>   - NISのパッケージをインストールする<code>
 $ sudo apt install nis $ sudo apt install nis
Line 69: Line 82:
 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 98:
     * グループの管理は管理ノードのみで行いたいため、gshadow(グループのパスワードが暗号化されて入っているファイル)は共有しません     * グループの管理は管理ノードのみで行いたいため、gshadow(グループのパスワードが暗号化されて入っているファイル)は共有しません
   - NISを再起動します<code>   - NISを再起動します<code>
-sudo systemctl restart nis+$ systemctl restart rpcbind nis 
 </code> </code>
 +    * 割と時間がかかります。
  
  
Line 96: Line 110:
 $ 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
自作クラスタ計算機/nisの基本設定.txt · Last modified: 2024/01/20 17:32 by koudai