Elstci search and installation questions

I got error when using curl -XGET 'localhost:9200'

couldn't connect to host

I am new to logstash and elasticsearch.

I follow this link to set it up but not 100% working.

http://logstash.net/docs/1.4.2/tutorials/getting-started-with-logstash