Updating Asterisk
If your Linux distribution includes pre-compiled Asterisk packages, then you can just use your package manager. Likewise if some third party has created pre-compiled packages (and you trust them).
However, you usually are best off installing Asterisk from Source Code anyway, as you can then omit all the bits you don’t need (and it’s not hard, if you miss a bit you later found you needed after all; just turn it on in menuconfig and repeat the make command).
Of course it is possible, when you build Asterisk, to do so as though you were building a .deb or .rpm to distribute. For this you will require another computer of the same architecture and running (a fairly minimal installation of, so you can be sure of the dependencies) the same OS as your Asterisk server, and the relevant developer documentation from your distro’s homepage.