Holing up is the best form of defence against viral zombies, EG 28 days later and I am Legend.
But for Solanum and Radiation Zombies, or "The Undead" which have no nervous or mobile control. Mobility is the best form of defence as they are slow and easy targets, but are dangerous in large numbers, by keeping mobile you limit exposure to 1 or 2 at a time as different from 10 to 20. Also, Viral turns humans into animals, so they rely on light, sight, smell and sound. Holing up and hiding will work well, and as they are living zombies (I know it sounds dumb) they will starve or dehydrate to extinction once there are no more hosts.
The Undead will remain forever, so steadily killing them 1 at a time, or finding an area with enough resources and weapons and of course survivors to fight off substantial numbers to join on to is the key. If these dont exist as in total subjugation by the zombie hoardes. Run and gun is how its done!