See here:
http://forums.overclockers.co.uk/showthread.php?t=18629732
for a discussion of Depth of Focus (DoF).
What you want to do is use a small aperture (so a large F-number), and try to increase you focus distance to the subject.
How to really maximise the Depth of focus you want to focus at (or slightly beyond) the "hyperfocal focusing point". it is clear when you take a photo that there is subject distance behind the focus point that is sharp, and some distance in fornt of the focus point that is sharp. If you focus to infinity then you throw away a large amount of that background focus. Hyperfocal focusing simply suggest to move the focus point a bit further from the background so you benefits from both sides of the depth of focus. The hyperfocal point is the distance that will maximize Depth of focus for a given lens and aperture.
Obviously you can't accurately know the distance to you have to guess. In general you don't need to be too precise. For landscape work without a foreground element then anything 50-100ft away works. When you have a strong foreground element you will need to bring the focus point much closer (start at 5-10ft, you might be able to get a little closer even, this is for a lens at 18mm stopped down to f/11).
Review the images on the LCD screen to get an idea of whether the foreground and background are sharp.
Something else to consider is that you sometimes don't really need the far, far background to be 100% in focus. Humans rarely see the background as that sharp anyway, we use the slight softness and low contrast of distance mountains to give us a depth cue. Atmospheric distortions, heat haze, dust etc. all work to reduce distant sharpness, colour and contrast so i wouldn't worry too much about trying to maximize sharpness at infinity.