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

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

On Debian possible default full paths are:

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

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