How To Install yp-tools on CentOS 7

In this tutorial we learn how to install yp-tools on CentOS 7. yp-tools is NIS (or YP) client programs

Introduction

In this tutorial we learn how to install yp-tools on CentOS 7.

What is yp-tools

The Network Information Service (NIS) is a system which provides network information (login names, passwords, home directories, group information) to all of the machines on a network. NIS can enable users to login on any machine on the network, as long as the machine has the NIS client programs running and the user’s password is recorded in the NIS passwd database. NIS was formerly known as Sun Yellow Pages (YP). This package’s NIS implementation is based on FreeBSD’s YP and is a special port for glibc 2.x and libc versions 5.4.21 and later. This package only provides the NIS client programs. In order to use the clients, you’ll need to already have an NIS server running on your network. An NIS server is provided in the ypserv package. Install the yp-tools package if you need NIS client programs for machines on your network. You will also need to install the ypbind package on every machine running NIS client programs. If you need an NIS server, you’ll need to install the ypserv package on one machine on the network.

We can use yum or dnf to install yp-tools on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install yp-tools.

Install yp-tools on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install yp-tools using yum by running the following command:

sudo yum -y install yp-tools

Install yp-tools on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install yp-tools using dnf by running the following command:

sudo dnf -y install yp-tools

How To Uninstall yp-tools on CentOS 7

To uninstall only the yp-tools package we can use the following command:

sudo dnf remove yp-tools

References

Summary

In this tutorial we learn how to install yp-tools on CentOS 7 using yum and dnf.