You can try to kill it.... but its incredibly difficult, But well ill write a little walkthrough here best I can remember it.
In the first room head due north from where you start north being keeping room the rancor came out of being on your right hand side, then you need to reach the far side wall to the north, you'll go past a big container on the way thats blocking the door you need but at the wall youre heading for their should be a raised platform, on there there will be a switch which will lift the canister so you can get through the door. Two sith will be in the tunnel through the little door so kill them, all the others just let the rancor eat them.
K now we are in next room you can take a breath as it has to smash through the doors first, although sometimes it does this really fast so dont take a breather for too long you basically want to head directly across from the door that you came out of and then take a right turn when you reach the partition dividing the room halfway through, kill sith if you have time... but mostly just avoid them its easier that way. When you reach end of this corridor there will be lots of sith same again kill or avoid them til the rancor breaks through the big doors I mentioned beforehand then the little door will open and you run through.
Follow the new corridor along to the end and on the left will be an alcove with a switch flick this switch and it'll move the box in the wall of boxes to your rear leaving a gap just within force jump distance, go through this, head directly in front of you and you will see a sort of control booth in the distance overlooking a huge conveyer belt you want to head for this but before you enter the corridors leading to it you want to flick the switch to your left in another little alcove.
Moving on in the next little room will be a few fairly tough sith if your saber skills aint up to much a favourite trick of mine is to grip+ force push them through the window down to the belt. Then when big Mr beastly rancor catches up with you and is staring you in the face so to speak Just flick the switch in the control roon your standing in and watch the big beastie get put out of its misery in an amusing cutscene ^^
Hope that helps