dnsname: 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/bin/dnsname - from package: ndjbdns

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