We put the vinyl down over unpainted wood. We did use a layer of adhesive primer over the wood, but mostly because we had some leftover from doing the floor on our porch. As long as you seal the seams (such as along the wall), it won't make a difference whether you paint first or not. As to the kind of paint, we have a lot of "kitchen and bathroom paint" (which I believe is mildew resistant and supposed to be more durable for scrubbing) left over from remodeling the bathroom so we're just going to use that. I think it's semigloss, but any finish will work. If we didn't have the bathroom paint we'd be using leftover flat exterior paint.