There are people who only do it that way, people who only do it fishless etc. In a 5g its going to be hard to keep the ammonia/nitrites down where they need to be for your fish for at least a month you'll probably be doing water changes every day or every other day...but if you're committed it'll work out just fine. I would suggest getting maybe two zebra danios to cycle with...although they wouldn't do that great in a 5g indefinitely because they like to have lots of room to swim. Hopefully at the end of the cycle you'd be able to trade them back to your local store?
I love fishless cycling because I dont have to worry about any fish in the process, and then when its finished I can put whatever fish I want to in the tank without worrying how sensitive they are to ammonia and nitrite spikes.