setup-ds-dsgw: 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/setup-ds-dsgw - from package: 389-dsgw

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

On Debian possible default full paths are:

/usr/sbin/setup-ds-dsgw - from package: 389-dsgw

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