you can do it a couple of ways. First off you can pre-drill holes and just bolt them on. What I would do though, is get some really strong(industrial shit) epoxy like JB Weld or PL-400 glue. Apply a good amount of the epoxy and just c-clamp the wood and the pipe together for a couple of days. Money!