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

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

On Debian possible default full paths are:

/usr/bin/createdb - from package: postgresql-client-common
/usr/lib/postgresql/9.4/bin/createdb - from package: postgresql-client-9.4

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