It is known who invented the beer? And when was beer invented?
As your link indicates there is evidence of beer going back to around 5000 BC, however, this is only the first time that it is known to have been recorded. Alcoholic drinks made by naturally fermenting fruit are drunk by monkeys and elephants and probably long pre-date the evolution of humans. Evidence of breads, which could result in a type of beer if allowed to ferment in the same way as the fruits if the mixture was left with yeast in too long, exists from 30,000 years and pre-dates the advent writing ( http://en.wikipedia.org/wiki/History_of_bread ). It is likely therefore that beers existed tens of thousands of years ago through accident at first and eventually design and were likely to be similar to traditional African beers such as the Kenyan busaa, which by coincidence is still made by my girlfriend's grandmother for the elder men of her tribe. I.e. these beers would be a form of thick, alcoholic liquid bread. In other words we cannot know who "invented" beer as
the date was probably some time over 20,000 years ago but that is unknowable for the same reasons. Interestingly, as it is a drink made from a cheap foodstuff that was widely consumed by the people rather than by nobility who could record such things, it is not known who invented lager either. It is likely that Lambics were the precursors of Lagers though.
As MD-Tech mentioned, beer wasn't exactly invented. However, the answer of when seems to be that it followed the production of wine.
Here's a clip from a paper I had written a while back.
Based on available evidence, it is likely that S. cerevisiae was first used in the production of wine. DNA evidence dates winemaking to 3150 BC, and the earliest molecular evidence available indicates winemaking having taken place at least as early as 7000 BC in China. (Fay J. C. and Benavides J. A. 2005)
One issue with production of alcohol is that it takes away precious food supplies and so is a lot easier to produce when agriculture is in place than when it is not.
Please also see this question
Which has more information