For the later (categories, pages,...) I recomendrecommend using the various dumps that are available from the Wikidata project. The dumps are available at the wikimediaWikimedia dumps source. The RDF format is described pretty well in the Wikidata RDF dump description.
Use the Wikidata Toolkit to process it and get the specific information you want. Or import it into a triple store like blazegraph.
For the Wikipedia article content, there are dumps provided by certain mirror servers in diffrentdifferent formats and chnunkschunks. A promising example is this mirror. Others can be found at the wikimediaWikimedia XML dump project