It is normal that the commands in http://fiware-orion.readthedocs.io/en/1.10.0/user/walkthrough_apiv2/index.html#introduction doesn't work if Orion is not running (it seems so by the questions you are asking ;)
Note the /etc/init.d/contextBroker start only works if you have installed Orion from the RPM. If you have installed from sources, you should use contextBroker command directly, as described in this piece of documentation.
First, check that Context Broker is properly installed running:
contextBroker --version
Next, to run Context Broker in foreground in a terminal, just use:
contextBroker -fg
You can also run in background is you ommit -fg switch (in which cases you will need to use kill command to stop the ContextBroker process):
contextBroker
Whichever the option chosen to start ContextBroker you can check it is working with (in the same host where ContextBroker runs):
curl localhost:1026/version
Which regards to log file the default location is /tmp/contextBroker.log. It may happen that the file doesn't exist if ContextBroker has not traced yet anything. Use -logLevel to increase log level:
contextBroker -fg -logLevel INFO
and try again with the curl localhost:1026/version.
Which regards to where is the Context Broker information hosted, Context Broker uses a MongoDB database instance. By default it assumes that the DB is located in the same host where Orion runs, but it can be changed using -dbhost CLI parameter. Have a look to the aforementioned documentation for information about this (and other) CLI parameters.
Note that failing in connecting to MongoDB instance is one of the causes that may cause Context Broker not starting. You would get an error message like this in that case:
Database Startup Error (cannot connect to mongo - doing 100 retries with a 1000 microsecond interval)