To attach a trapeze bar to the ceiling you should first mark the place in which you want to mount it. With a drilling machine, you should drill the holes for the fasteners. Attach the ceiling bar to the ceiling with fasteners made especially for the ceiling. The trapeze bar should have a hook that you should attach to the ceiling bar.
After you adjust the length of the straps so that you can easily grab the trapeze bar while lying down, you have to slide the trapeze onto the straps.
To attach it to your bed you should first decide where to put it. You should install the trapeze holder into the socket of the bed bracket that you find in the lower part of the bed. Of course, it depends on what kind of bed you have and on what the trapeze bar model allows you to do.