Make sure before flashing this rom make sure you are on android lollipop 5.1.1 and also have TWRP recovery in your device.So lets start the step by step on How to install Cm12.1 rom in samsung Galaxy E5.
#How to install Official CM12.1 rom in Galaxy E5
1.Download Cm12.1 rom for Galaxy E5 and the appropriate Gapps package from link given below Copy it in your in your device.
2.Now place the Cm12.1 rom and gapps zip file in sd card.
3.Now reboot to Recovery mode.
4.Then flash CM12.1 rom and Gapps from recovery in it.
5.Now Clear cache and Clear Data.
6.Reboot your device.Done! you just flash Official cyanogenmod 12.1 rom in your Samsung Galaxy E5.