dia: 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/dia - from package: dia

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