The big thing is to use harsh direct lighting. Normally in lighting, you are trying to diffuse light to soften shadows, but in this kind of look, hard and dark shadows is actually what you want. On a budget, place a couple of unshaded lamp bulbs out to light the scene. The brighter the lamps, the darker you can get the shadow. Note that you will also want a room with fairly dark walls so that light isn't reflected in to the shadows or you may need to use guides to keep the light directed towards your scene.
If you want a slightly less dark look like the second link, you may also want a base of dim diffused soft light. If you are using something to direct the direct lights towards the scene and away from the ceiling, you can accomplish the diffused lighting by pointing a light at the ceiling and blocking it from hitting the scene directly. This gives you a large surface area for the light being reflected in to the scene which makes it very soft and should fill in the shadows just enough to keep detail in the darker parts of the image.
I also highly recommend checking out the link Scott Walter posted in the comments on the main question as it is a fantastic tutorial that shows what you are getting from each light.