disregard that entire article. that article is stale.
It is quite easy. But there is a problem with this. Apt repositories may not contain the latest version of OpenCV always. For example, at the time of writing this tutorial, apt repository contains 2.4.8 while latest OpenCV version is 3.x
it doesn’t even say when it was written. probably over 5 years ago. “articles” in the OpenCV docs are usually written once by someone who is not a core developer, then forgotten about.