Error: couldn't connect to server - Linux -

Start a mongod that listen to 127.0.0.1:27017.

Or specify the appropriate server when running mongo.