In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about the configuration of NIS services under linux. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.
[NIS server-side configuration]
Step 1: install the relevant software
Install ypserv-2.19-3 and portmap-4.0-65.2.2.1 on the third CD, and yp-tools-2.9.0.1 and ypbind-1.19-7.e15 on the second CD. Ypserv is the server-side program of NIS, yp-tools and ypbind are client-side programs, and portmap is the port assignment program. Generally, only ypserv and portmap need to be installed on the NIS server, but since the server itself is its own client, we install all four packages on the server. The command is as follows:
# rpm-ivh / mnt/cdrom/Servers/ypserv-2.19-3
# rpm-ivh / mnt/cdrom/Servers/portmap-4.0-65.2.2.1
# rpm-ivh / mnt/cdrom/Servers/yp-tools-2.9.0.1
# rpm-ivh / mnt/cdrom/Servers/ypbind-1.19-7.e15
Step 2: configure the server side
① sets the NIS domain name to dne.com through the following command:
# nisdomainname dne.com
In order to do this automatically after the system starts, you can add this command to the file / etc/rc.local. The command is echo "/ bin/nisdomainname dne.com" > >
/ etc/rc.local
② configuration server-side master configuration file
Edit the file / etc/ypserv.conf and add control parameters at the end of the file to allow some clients to access the nis server.
127.0.0.0Universe 255.255.255.0: *: none
192.168.20.0 none 255.255.255.0: *: *
All: *:: deny
Just keep the default values for other parameters!
③ initializes the NIS database
Run the command: / usr/lib/yp/ypinit-m, then set the name of the main database storage host, then press the CTRL+ D key, and finally press Y to confirm, finally, the program will create the initialized NIS database, and after the creation is completed, there will be corresponding file record settings in the directory / var/yp.
④ Startup Service
The relevant services on the startup server side include portmap and ypserv,yppasswdd, with the following commands:
# / etc/init.d/portmap start
# / etc/init.d/ypserv start
# / etc/init.d/yppasswdd start
[NIS client configuration]
Step 1: install the NIS client program
Install the client packages portmap,ypbind and yp-tools for NIS.
# rpm-ivh / mnt/cdrom/Servers/portmap-4.0-65.2.2.1
# rpm-ivh / mnt/cdrom/Servers/yp-tools-2.9.0.1
# rpm-ivh / mnt/cdrom/Servers/ypbind-1.19-7.e15
Step 2: set the NIS domain name to dne.com, through the following command:
# nisdomainname dne.com
Step 3: set the NIS domain where the Nic is located, through the following command:
# echo "NISDOMAIN=dne.com" > > / etc/sysconfig/network
Step 4: configure the nis client profile
Edit the file / etc/yp.conf and add the following parameters at the end of the file:
Domain dne.com server 192.168.20.200
Step 5: edit the file / etc/nsswitch.conf and change the password query order.
Shadow files nis
Passwd files nis
Group files nis
Step 6: start the service portmap,ypbind
# / etc/init.d/portmap start
# / etc/init.d/ypbind start
Step 7: test the nis client
With the following command: ypcat passwd, if you can output the account information of an ordinary user on the server, the NIS configuration is successful. Other test commands include yptest,ypwhich-x and so on.
[extended function]
The predecessor of NIS is an information-sharing software called Yellow Page developed by SUN, which was later renamed NIS because of trademark registration. NIS can be used to centrally manage resources and share account information between LINUX. When the NIS client authenticates the account through the NIS server, the time of the two systems needs to be the same, so when configuring NIS, it is generally necessary to configure the NTPD service, that is, the network time protocol, and then synchronize the clock through cron timing, so as to achieve the purpose of system time consistency. In addition to the above, NIS can also be combined with NFS to achieve the purpose of roaming user profiles. We can use the / home directory on the NFS shared server, and then automatically mount the / home directory to the client when the NIS client system starts. The command is: mount-t nfs 192.168.20.200:/home / home can add this command to the file / etc/rc.local, or you can configure the file / etc/fstab to make the system mount automatically when the user logs in on the nis client. Its host directory on the server is automatically used.
The above is the configuration of the NIS service under linux shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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.