What does "def" above an equals sign mean? I am reading this:
https://www.cs.ubc.ca/~murphyk/Papers/bayesGauss.pdf
and on equation (17), there is a def on top of the equal sign. What does this mean?

 A: The "def" can be read as "definition", "is defined" or "is defined to be".
See for example Wikipedia, in the last sentence of this section (just before the subsection labelled "Science"):
https://en.wikipedia.org/wiki/Triple_bar#Mathematics_and_philosophy
which says (the first sentence refers to the triple bar symbol, but the second sentence talks about what you ask about):

This symbol is also sometimes used in place of an equal sign for equations that define the symbol on the left-hand side of the equation, to contrast them with equations in which the terms on both sides of the equation were already defined.[13] An alternative notation for this usage is to typeset the letters "def" above an ordinary equality sign.[14]

I think the actual definition of $\sigma^2_n$ and $\mu_n$ follow equation 17 in 19 and 24.
See $(19)$ just under the part you quote, which defines $\sigma^2_n$ via $\frac{1}{\sigma^2_n}=\frac{1}{\sigma^2_0}+\frac{n}{\sigma^2}$.

But isn't (19) derived by matching coefficients of (16) and (17)? 

Essentially, yes -- but Murphy is sort of putting the cart before the horse; he's sort of saying "I know how it is going to look like this, so here's what the variance and mean terms in it must be". Which if you've done these things a
lot makes sense. It's actually no harder to derive it directly though, and even though the terms may differ from one problem to another, the structure of the solution is of the same form.]
(17) explicitly states that it's definition, but really that is where the term-matching takes place and the definition of the symbol $\sigma^2_n$ is then made explicit in (18) and (19) and $\mu_n$ in the following equations (down to (24)). I regard (19) and (24) as the definitions of the new symbols introduced in (17).
(17) is saying "when we complete the square, we collect the terms that represent the posterior variance and call that thing $\sigma^2_n$". (18) and (19) then simply explicitly state what those terms are (i.e. defines them) from simple inspection of (16).
Outlining the derivation more directly: at (16), having collected the terms in $\mu^2$, $\mu$ and $\mu^0$, you have in the exponent something of the form $-\frac12(A\mu^2-2B\mu + C)$, at that point you can write it as $-\frac12 A[(\mu-B/A)^2] -\frac12[C-B^2/A]$ which (ignoring the constants at the end for the present) is by inspection a normal distribution with mean $B/A$ and variance $1/A$. That manipulation is called "completing the square" (write it out in smaller steps to see in detail what happens). He's just calling the $B/A$ (i.e. posterior mean) term "$\mu_n$" and the $1/A$ (posterior variance) term "$\sigma^2_n$" in order to have symbols to write down instead of writing the formulas every time -- and then writes out what that means in terms of what $B/A$ and $1/A$ consist of in the original setup.
