Hello Headon, and Welcome to the Forum:
The whirlybird may be placed wherever it will look the best, but it will remove more attic heat if it is near the ridge. (Personally, I prefer ridge vent)
You will need to cut a hole the size of the pipe then make a slit straight out to each side, to the size of the base plate. Now set the whirlybird on the roof below the hole and slide the base through the slits up to the pipe fitting the hole. Silicone under the lower side and screw it down; now silicone the up-slope half of the pipe and the two slits, go into the attic and silicone the up-slope half of the base, have someone to hold it in place (or install a 2 X 4 block between the rafters to hold it up), go back outside and put 2 screws into the plate from outside and cover all the screw heads with silicone.
My personal beef with whirllybirds is; they are not doing half what they appear to be doing, for some reason they attract black garbage bags and duct tape in winter months. If the ventilation is needed, then it is needed year-around. Caution: the metal will be very sharp, wear leather gloves while doing this work.