If you are converting your bicycle from a fixed-gear or single-speed to a multi-speed road or mountain bike, or have irreparably damaged your existing derailleur, you will need to install a new one. Shimano derailleurs must be properly adjusted before use, or the gears will not shift properly, resulting in damage to the wheel, chain or the derailleur, and possible injury. Most Shimano derailleurs are installed the same as other brands' derailleurs, with the exception of the Rapid Rise model, which is adjusted using the largest cog first.
Locate the derailleur hanger on your bicycle. It is at the very bottom-most corner of the frame, shaped like a hook that sits on the rear axle, with threaded holes to mount to the frame and hold the derailleur. Align the derailleur using the alignment block, which holds the cage open until you need to make the limit adjustments. Firmly tighten the 5 mm hex bolt through the mounting hole with the hex wrench.
Thread your chain around the largest cogs, both front and rear, and through the derailleur. Connect the ends and use a chain tool to complete the chain. If you are installing a new chain and don't know the proper length to use, manually thread the new chain around the largest cog in both the front and rear, through the derailleur, pull the chain tight and measure this length. Let the chain out two links' worth and use the chain tool to fasten the chain together.
Pull the rear derailleur cable tight and thread it through the barrel adjuster and into the anchor bolt, which clamps the end of the cable to hold it in place. It should have a groove that the cable rests in. Use pliers to keep the cable taught as you tighten the bolt, as this can be very stressful on your fingers. Tighten the bolt with a hex wrench.
Remove the alignment block and adjust the indexing of the shifter. Move the chain around the smallest sprocket, then shift to the next largest gear. If the chain does not shift, tighten the barrel adjuster and try shifting again. The barrel adjuster is used to add or relieve tension in the cable. Continue shifting through the gears and making adjustments with the barrel adjuster as necessary.
Adjust the lower limit screw to limit the derailleur movement toward the wheel. This screw is the lower of the two adjusting screws, which are located on the rear or outer face of the derailleur, and labeled "L." Shift the derailleur to the largest sprocket and turn the screw clockwise to push the limit away from the wheel, or counterclockwise to move the limit toward the wheel. As the pedals are turned, the chain should not jump from the socket or rub against the derailleur cage.
Adjust the upper limit screw to limit the derailleur movement toward the wheel. This screw is right above the lower of the two adjusting screws and is labeled "H." Shift the derailleur to the smallest sprocket and turn the screw clockwise to push the limit away from the wheel, or counterclockwise to move the limit toward the wheel. Again, the chain should move along unimpeded as the pedals turn.
Adjust the B-tensioner screw, labeled with the letter "B," to change the height of the jockey pulley. It is most often located on the rear-facing side of the derailleur. The closer the jockey pulley is to the sprocket, the faster the gear will change, but do not adjust it so close that the pulley will rub against the smallest sprocket.