Should definition of terms section be included in the introduction or the literature review chapter?
I've often encountered this type of problem in my own academic writing (and not only in theses). The problem is that it's often difficult to talk about something before you've defined what it is. But at the same time, it's awkward to write so much expository material before being able to talk about your own stuff. It's up to you to work out, for your document in particular, the best way to present these necessary definitions.

Given that you want to say what your work is about as soon as possible, you can't avoid mentioning at least a few of these technical terms before introducing them formally. For one thing, you may well have to put them in the title! Often, you can present just enough in the abstract and introduction to allow readers to get an idea of the technicalities, but not overwhelm them with detail. The trick is to make sure your presentation is accurate and useful. If you make it too vague ("the Riemann Hypothesis is a very hard problem") then nobody is helped.

A literature review chapter is often a natural place to put definitions. It's hard to say anything meaningful about the literature if you haven't introduced the terms that the literature talks about. Also, exploring the past contributions to your subject certainly includes identifying who came up with particular definitions, who disagreed, how they adapted the definitions, and so on. This is the case for the dissertation in your first link, which defines "research" in the literature review, in the context of conflicting definitions of what research actually is (p19). The author still talks about research in the preceding pages - but that is the point where she sets the scene for her own work, using that definition in particular.

Material which is more basic or less contested could be introduced earlier, if you like. If it is general background, which readers need to know in order to understand anything you've done, but which the thesis is not particularly "about", then the introduction is a fine place for it.

Equally, definitions could be in their own section - either towards the beginning, or as an appendix. I often see this in documents where the definitions are basic reference material. Some readers will know them already, and skip the chapter; others can read in more detail. Again, this option separates the definitions from the literature review, on the basis that the definitions are simply fundamental to the field.

Ultimately, the choice is yours, unless your institution tells you what to do. I hope these thoughts will be helpful as you consider which option is best for presenting your work.