Fix a screw into your corner post and run a string line back to the house. This gives you a straight line to measure your posts against. Mark on the wall where your fence will finish and insert another screw to tie the string line to. The easiest way to fix off a string line is to twist it onto itself a couple of times then put it over the screw. Make another half twist and loop it over the screw to lock it in place.
Measure and mark where your posts are going to go. Use spray paint to mark the centre of your holes. Also spray down your string line so you can check your holes are centred. Before you dig, check with your local council to find out how deep your holes should be. Also check there are no cables for telephone, power, gas or water before you dig.