How to install old iPhone software?

I want to use an older iOS software on my iPhone but I don't know where to find it. What should I do to get the software onto my phone?

You need to download an ipsw file of the iOS version you want to install.
HERE: http://www.iclarified.com/entry/index.php?enid=750

Then go to itunes, connect your phone, you might need to put your iPhone in DFU Mode. Then itunes will detect it in recovery mode.

Not press down Shift key, and select Restore option.
Then it should allow you to browse for ipsw file.
Now select the ipsw file you downloaded.
Continue and it should restore it.