I need to know how to upgrade splunk 5.x to 6.1 on linux machine step by step
this is completely covered by the documentation. You can also find the step by step guide for your other question in this chapter of the splunk docu.
Splunk Doku Upgrade and Migration
View solution in original post