In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to configure NIS in Centos7, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.
principle
NIS(Network Information Service)
In an environment where there are multiple linux servers, and there are many accounts on a linux server that may be the same, it will be difficult for administrators to manage. NIS's main function is to provide centralized management of system information such as host account systems.
When the NIS client needs to authenticate information about a user login, it sends a query request to the NIS server. When one NIS server in the system provides services for multiple NIS clients, any NIS client in the user login system will perform login authentication from the NIS server, thus realizing the function of centralized management of user accounts.
network environment preparation name ip address host name NIS server 13.10.29.2node292NIS client 13.10.29.3node293 preparation before installation
1. Stop firewall
systemctl stop firewalld
2. Disable firewall startup
systemctl disable firewalld.service
2. Modify selinux
vi /etc/selinux/config
Replace SELINUX=enforcing with SELINUX=disabled
, and execute setenforce 0 to make it take effect immediately, of course you can also restart the machine
NIS Server Operations
1. Install the software package
yum -y install ypserv ypbind yp-tools rpcbind
2. Set NIS network name
vi /etc/sysconfig/network
Add the line NISDOMAIN=nisdomain to specify that the NIS server domain name is nisdomain
3, Add boot automatically join NIS domain
vi /etc/rc.d/rc.local
Add the line/bin/nisdomainname nisdomain
Note ~~ At this time, you can use nisdomainname to view directly. If you find a domain name without display settings, enter nisdomainname nisdomain again.
4. Create domain users (groups)
useradd -s /bin/bash nisuser
And set the user password
passwd nisuser
create user groups
groupadd nisgroup
5. Set the main configuration file to add permissions
vi /etc/ypserv.conf
Add the following three lines to restrict servers that can only join the 13.10 segment
6. Add NIS client information to NIS domain server
vi /etc/hosts
Add the following two lines:
13.10.29.2 node292
13.10.29.3 node293
7. Start NIS service
systemctl start rpcbindsystemctl start yppasswddsystemctl start ypserv
8. Initialize the database
/usr/lib64/yp/ypinit -m
Then do "ctrl+D" and type y.
Note ~~ If there are changes to NIS server configuration files during this period, you need to reinitialize the database
9. Restart service after initializing database
systemctl start rpcbind systemctl start yppasswdd systemctl start ypserv
10. Set up the service to boot automatically
systemctl enable rpcbindsystemctl enable yppasswddsystemctl enable ypservNIS client operations
1. Install the software package
yum -y install ypbind yp-tools rpcbind
Add NIS domain to network
vi /etc/sysconfig/network
Add the line NISDOMAIN=nisdomain
3. Set up to automatically join NIS domain when booting
vi /etc/rc.d/rc.local
Add/bin/nisdomainname nisdomain
Also note that oh ~~ at this time you can use nisdomainname to view directly, if you find no domain name display settings, then enter nisdomainname nisdomain
Add NIS server information to NIS client
vi /etc/hosts
13.10.29.3 node293
13.10.29.2 node292
5. Use the graphical interface to configure NIS and enter directly:
authconfig-tui
6. Start-up service
systemctl start rpcbindsystemctl start ypbind
At this point, you can verify whether the deployment is successful. Enter yptest on the client. If you can see the users on the nis server, congratulations on the deployment.
The NIS environment above has been deployed!!
Thank you for reading this article carefully. I hope that the article "How to configure NIS in Centos7" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.