Check your city codes to determine whether there is a maximum height that your fence can be. This is the case in many communities. You also must double check any property lines to ensure that you won't be installing your fence somewhere it shouldn't be.
Map out your design. You will need to go out and measure the length that the fence will be and determine exactly how much material you will need to start the project. Use a spool of twine or a spool of string to help you with the top of the fence. The string will need to be long enough to reach from one fence post to another from the top of a hill to the bottom.
Plot out your fence line by marking the places your fence posts will go using wooden stakes. Set fence posts every 6 to 7 feet, but avoid going more than 8. Whenever possible, set the fence posts on the top of the hill rather than on the side of the hill. This will make it easier to plan for each peak and valley.
Determine how you will set the top of your fence posts. You have two primary options. The first is to allow the top of the fence to run parallel to the slope of the hill. The second is to create a step-down fence. The step down fence remains level at the top, while the fence planks extend all the way to the ground, regardless of the slope. With these you can measure the distance from the top of the hill to the bottom of the hill and then divide that number by the number of fence posts that will be placed on that hill. The resulting number is the amount you need to "step down" each section.
Dig your post holes using the post hole digger. Fence posts should be set with about one-third of the post in the ground, or about 36 inches in most cases. The diameter of the hole should be about three to four times the thickness of the fence post itself. Pour gravel into the bottom of the hole to provide drainage and prevent additional settling of the fence later on.
Secure the posts in place with concrete. Mix the concrete. Pay attention to the ratios on the bags of concrete you buy. Each one should tell you how much concrete and water to mix. Mix this in a wheel barrel or rent a mixer from one of the major national home improvement chains. Unless you are doing a step-down fence, fence posts placed at the bottom of the hill should be allowed to stick out farther than those at the top of the hill. All of the fence posts should stick out far enough above the top of the intended fence line so that you can connect the fence sections easily and trim off the tops of the posts if necessary. Fill the holes around the posts with the concrete and allow it to set.
Connect each section of fence by running a string from the top of one fence post to another. This will help you to determine how much you will need to cut from the planks for each section of fence. Cut your fence rails so that each end will fall somewhere in the middle of the fence post.This will require that you measure each time that you cut and go from one post to the next. Attach the rails to the fence posts using 3-inch deck screws.
Measure each plank for the pickets by turning it upside down and using the string as a basic straightedge to determine how you should cut the bottom of the plank. This will give you the proper angle for the bottom of the fence as it runs along the ground. You may need to use a ruler or another straightedge to draw a straight line, but use the string as your guide.
Flip each plank over and line up the bottom of the plank so that it matches the lay of the hill slope. Allow the planks to touch the ground just barely to ensure that they will form as straight a line as possible along the top and avoid leaving any significant gaps along the ground Attach the pickets to the railings using 3-inch deck screws.