You can either make a stone pen with a ramp and a door way then lead the bear up the ramp into the pen and you can escape through the door, or you can just find a clif or rock the bear can't climb and tranq it from a safe distance.

More Direbear Taming & KO Tips