According to Fortune, this is how to store coffee:
If possible, buy beans within two to three days of roasting, and purchase no more than you can drink within a week. Roasted whole beans remain fresh for up to two weeks, but if exposed to light, heat or humidity, they’ll make a less than stellar brew.
To store, tightly reseal open bags of beans with a clip or rubber band and tuck them into an airtight opaque container. Store beans in a cool spot away from the stove, but not in the refrigerator or the freezer. [Food Network Kitchens]
There is more detail at Food Networks.
Food Network Kitchens. “How to buy and store beans for fresher coffee.” Alameda Times-Star. 28 April 2004. <www.timesstar.com/Stories/0,1413,125~1549~2113210,00.html> (29 April 2004).