slurm_config/nis.server.sh
2024-12-17 14:40:01 +08:00

39 lines
1.0 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 安装和启动rpcbind, nis
echo sudo apt-get install rpcbind nis -y
sudo apt-get install rpcbind nis -y
echo systemctl enable rpcbind
sudo systemctl enable rpcbind
echo systemctl start rpcbind
sudo systemctl start rpcbind
# 设置nis域名
echo sudp cp ~/config/nis/defaultdomain /etc/defaultdomain
sudp cp ~/config/nis/defaultdomain /etc/defaultdomain
# 编辑/etc/default/nis将NISCLIENT=false改为true
echo "sudo cp ~/config/nis/nis.server /etc/default/nis"
sudo cp ~/config/nis/nis.server /etc/default/nis
# 编辑/etc/yp.conf指定nis服务器
echo sudo cp ~/config/nis/yp.conf /etc/yp.conf
sudo cp ~/config/nis/yp.conf /etc/yp.conf
# NIS 访问IP
echo "sudo cp ~/config/nis/ypserv.securenets /etc/ypserv.securenets"
sudo cp ~/config/nis/ypserv.securenets /etc/ypserv.securenets
# 初始化数据库 #出现提示按Ctrl+D或回车
echo sudo /usr/lib/yp/ypinit -m
sudo /usr/lib/yp/ypinit -m
# 启动ypserv
echo systemctl start ypserv
sudo systemctl start ypserv
echo systemctl enable ypserv
sudo systemctl enable ypserv