restart-dirsrv: 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/restart-dirsrv - from package: 389-ds-base

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

On Debian possible default full paths are:

/usr/sbin/restart-dirsrv - from package: 389-ds-base

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