Set one end post, preferably where you can measure off another structure to know where your property line is; then place a nail on the inside of the post leaving the nail slightly out of the wood. The lower the string is to the ground without touching the better. Pull the string to where you are placing the opposite end post.
Once you have decided on the location of the post, set the post and put another nail on the inside of the post at roughly the same height as the other. Pull the string hard and tie it off. Then take a can of spray paint and measure out the distance between each post hole along the string line. Estimate how many posts you need. Take the length of the span and divide it by how many posts you estimated you needed.
Place the post in the hole using a level to make sure it is straight up and down in both directions. You want the insides of your posts to all be the same, so if the string was a board, it would be lying smoothly across the inside of all the post. From here begin to adjust each post straight up and down and flush with the string. The string should just barely be touching the post as to not disturb the accuracy of the string line.
