The normal approach is to use something like a Manfrotto Super Clamp, perhaps in conjunction with a tripod head (if the clamp itself needs to be attached at an inconvenient angle) and/or a Magic Arm.
But that's the walk-into-the-camera-store, off-the-shelf solution. You can use any sufficiently secure clamping system (available at most hardware/home improvement stores). Almost all cameras use a standard 1/4"-20 screw to mount to, well, a mount; almost all tripod heads meant for small and medium format cameras use a standard 3/8"-16 screw on the bottom side (where it would normally attach to a tripod). Cobbling something together is pretty easy, and you can use a short piece of aircraft cable as a safety harness, running from the camera's strap loops to the overhead beam/joist/rafter/strut. It's not as versatile and quick to set up on location, but if you're not normally rigging facilities for rempote cameras, it's an awful lot cheaper.