First tip is not to use household glues such as craft glue or a glue gun, neither will give a permanent bond to the metal setting. You can use E6000, which many jewelry designers and crafters use and gives a great bond. I use G-S Hypo Cement because I like the tiny precision applicator, which works great for tiny rhinestones to the larger cameos. Both of these glues are jewelry quality and dry clear.
Be sure to make sure that your base or setting is clean and dry first, you might want to clean them with rubbing alcohol first. Also make sure that the back of your cabochon or cameo is also clean and dry. I would not recommend using rubbing alcohol to clean gold foiled back stones, the rubbing alcohol might damage or remove the gold foil!
Now, spread a thin film of glue onto your base, make sure that you have enough for a good grip onto the cabochons, but not so much that the glue will ooze out. Set your cabochon or stone onto the setting and let dry for at least for 24 hours! For items such as the earring posts be sure to prop-up so that the cabochon remains centered, I usually use a small dish of rice to set the earring post in until they are dry.
If you did apply too much glue, do not use a paper towel to remove the access, it will end-up sticking to the cabochon or setting and making a mess. I use toothpicks to remove any access glue from the edges.
Be sure to work in a well ventilated area, the glue fumes can get overwhelming if you are gluing a lot of cabochons or stones.
As always thanks for stopping by and Happy Crafting!