As others said fibre and lots of water are both very good; something oily in your diet is good too, as is exercise.
If you want to take medication (understand people not wanting to, but equally you really don't want this to get out of hand and it is easier to treat before you become really bunged up!) then a stimulant and a softening laxative together is often your best bet. Bulk-forming laxatives don't tend to work so well, but they can be effective if combined with a stimulant laxative. Stimulant laxatives can cause cramps and you need to be careful you don't overdo them or they can irritate your gut.
Stimulant laxatives include Senna and bisacodyl, softening includes PEG and docusate (also a stimulant), bulk-forming includes ispaghula hulk (eg Fybogel) and various other fibre preparations.
I did have a study on the most effective laxatives for opioid induced constipation but I can't find it right now..
Suppositories can be helpful but only really for clearing the rectum/distal colon. Enemas can obviously be very effective but if you get on top of things early you shouldn't need to resort to them, plus as opioid constipation results from a slow bowel it can easily back up further than an enema can reach.