I'm going into my 5th year with electric fence keeping all varmits out of my garden 100' below the house. I've 2 strands. One is at about 6" for the rabbits and groundhogs and raccoons. The second is about 4'. The deer tend to go between them. They've stretched the top wire a couple times and broke it once. Used to bait it about once/month with tinfoil and peanut butter, but I think you really only need to do this initially to get them used to knowing it's there.
Only time I ever had a deer in there was when I forgot to put the jumper wire in place that goes from my knife switch to the hot wire. A rabbit got in there last year while I was having trouble with the chargers. He was living in there underneath a squash vine and eating all my bean plants. Finally got my chargers back and rousted him.
Most problem I've had is with the chargers, 6-12v Zareba ones run off 12v batteries that last about a month. Had to send both in last year for the first time. This year, I've sent both in again. The second one at least lasted until I got the first one back. Have told them that this one is on their buck because it wasn't used after being fixed last year until about 2 weeks this year. Otherwise, it's about $46 to repair and about $9 postage each time. Think they're about $70 new.
They do have solar powered ones. When one of my batteries quits, what I plan to do is buy one of those "mule" solar panels from TSC. They have them for running the remote gate openers. They're 12v.
I use those plastic posts available from TSC that just push into the ground on little steel spikes on the end. The posts are about 10' apart. At the corners, I've 4x4 posts with insulators on them. Only put those in this year to put the fence on them at 2 ends of the garden in off season so I can get the tractor in and out of the rows. I've 4 of those fence gate things at the ends of the wires to unclip them and wind them back onto the one fence line parallel to the rows. The other fence line will just stay. I used to wind the wires around 5 gallon plastic containers attached to a 4x4 pole. I keep the battery inside the 5 gallon container. Got another container attached to another 4x4 pole to hold odds and ends.
Ralph