ypserv: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/sbin/ypserv - from package: ypserv

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/sbin/ypserv - from package: nis

You may install the required package with command apt-get install {package}
Error in other languages:
ypserv: bevel nie gevind nie
ypserv: comandă negăsită
ypserv: comando não encontrado
ypserv: commande introuvable
ypserv: command not found
ypserv: käsku ei ole
ypserv: không tìm thấy lệnh
ypserv: komanda nerasta
ypserv: Kommando nicht gefunden.
ypserv: kommandot finns inte
ypserv: komut yok
ypserv: nie znaleziono polecenia
ypserv: níor aimsíodh an t-ordú
ypserv: no se encontró la orden
ypserv: no s'ha trobat l'ordre
ypserv: opdracht niet gevonden
ypserv: parancs nem található
ypserv: perintah tidak ditemukan
ypserv: príkaz nenájdený
ypserv: příkaz nenalezen
ypserv: команда не найдена
ypserv: командата не е открита
ypserv: 命令找不到
ypserv: コマンドが見つかりません