According to the Shariah, there is no problem in rearing a cat, provided its food, etc. is well taken care of. Keeping an animal and not taking caring of is punishable, about which there is a Hadith in Sahih Bukhari:
Translation: It is narrated on the authority of Hadhrat ‘Abdullah bin ‘Umar (May Allah be well pleased with them) that the Holy Prophet (Sallallahu alaihi wa sallam) said: A woman went to hell because of a cat. She kept the cat with her until it died of hunger. That woman was sent to hell because of a cat. Hadhrat ‘Abdullah bin ‘Umar (May Allah be well pleased with them) said that the Holy Prophet (Sallallahu alaihi wa sallam) also said: Allah knows it better that when you held the cat, you did not give it food or water and did not set it free either so that it could catch and eat. (Sahih Bukhari, Hadith No: 2192)
After having a cat as a pet, you can also set it free if you want to.
Ref : www.ziaislamic.com/english/news1descr1.php?ids=1140&&key=food