Measure the inside of your cabinet door frame and the free space inside your cabinet. These measurements are important because you'll need to make sure that your can fits both on your door and in your cabinet.
Purchase a mounting kit at your favorite hardware, big-box or online store. Make sure the measurements fit the measurements of your cabinet.
Install the mounting kit according to directions. Oftentimes, the kit consists of a wire or metal hook that the lid of the trash can sits on.
Find a small, metal wire basket that is wide enough to hold your trash can. You can typically find these at hardware and big-box stores. Make sure the basket will fit within the door frame of your cabinet.
Put the trash can in the basket and hold the basket on the inside of the door where it will sit. Mark two corners on the inside cabinet door with a pencil to note where you will attach the basket.
Take the basket out and drill two small screws into the holes you just marked until the screws are stable -- but not all the way in. Make sure the screws are not longer than the cabinet door is thick.
Hang the wire basket on top of the screws and finish screwing the screws in.
Place a third and fourth screw -- if necessary -- toward the center of the basket in the same way you installed the first two screws. These additional screws will add support to your basket. Place the trash can in the basket and close the door.