ypserv_test: 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_test - from package: yp-tools

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

On Debian possible default full paths are:

/usr/sbin/ypserv_test - from package: nis

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