1) Head to a large multi-story building (like a big school)
2) Destroy all staircases leading up from the ground level
3) Grow food on the roof, use rope ladders to send out raiding parties for other supplies as needed
Seriously, I am so sick of the protagonists in zombie movies & shows always hiding behind stuff that can simply be pushed over by a mindless horde (chain link fences, doors, etc). Gain some elevation that requires equipment to ascend. Or even use something like a simple commando-style rope bridge that requires intelligent motor co-ordination to traverse.
Humans are infinitely more mobile & dextrous than zombies (esp. with the use of tools), there's no reason they shouldn't be able to exploit that to create a haven which is completely inaccessible to zombies by its very nature.
Of course this presupposes the typical George Romero/28 Days Later/Walking Dead type of zombie, as opposed to the World War Z ones which conquer every obstacle with self-organizing meat mountains.