That is advanced aquascaping and very difficult. The answer, trick, and god that everybody who has ever attempted anything like that (or dreams of it) relies on is aquarium silicone.
You can buy aquarium silicone at most good hardware/DIY stores and it's not even expensive. I bought mine at the local Mitre 10 (which is an Australian hardware chain). It will usually be marketed as glass silicone. When I went in, they had a whole wall covered in different silicone products and it took a bit of looking to find it. It was listed as glass silicone, but there was a note: Suitable for constructing and repairing small aquariums, larger aquariums require specialist design. Allow to cure for 7 days.
Basically they only include the specialist design bit to excuse themselves from blame if some idiot decides to silicone together some window panels to make a fish tank and manages to kill themselves. Aquarium Silicone Is God. It sticks to ANYTHING basically except concrete - including smooth rock.
In tanks with large cichlids or other powerful fish you've really got to do it properly and it does take some serious time. The stuff skins in five minutes, but you have to have clamps for about twelve to 24 hours. What you do is you silicone the first rocks to the bottom of the tank. Then after 2 days when it's set, you silicone the next ones on top. And so on and so forth until the structure is completed. Then you wait 7 days forthe acetic to cure. You bring in a hose. Wash the whole thing out thoroughly. Drain it. Add your substrate. Add your filters, heaters etc. Fill the tank, add any plants, cycle, add fish.