Createdb probably isn't working because its not in your PATH variable.
Try using the full path to the pgsql bin directory. i.e. on my system its
/usr/local/pgsql/bin/createdb
Or often its just in
/usr/bin
Not sure what you mean by 'number 8 instead of 7' but that looks like a red herring... just ignore.
Of course I'm assuming you have postgres installed. (if not then createdb won't exist).