A derailleur cable doesn't need to pull as hard as a brake cable but - if the system is indexed - it needs to transmit energy precisely from the shifter to the derailleur.
Thread derailleur Cable Into The Shifter
Select the position that pulls the least derailleur cable. Usually the highest gear at the rear and the lowest gear at the front. Thread the cable into the shifter. This is easiest if you take careful note of the path of the old derailleur cable before removing it. You may need to undo a cover or a stopper to change the cable. Check the manufacturers precise instructions for the shifter. These are usually available on-line.
Measure The Outer-cable
If the shifter is mounted on the handlebars you need the first run of cable to be long enough to allow the handlebars to turn fully without pulling on the derailleur cable. If you are replacing an old cable, and you’re sure the cable was the right length, and you don’t plan to move the position of the controls or the handlebars, you can match the new cable to old. New bikes are often set up with cables that are too long, so you may be able to replace the old cables with shorter ones which look tidier, transmit power better and create less turbulence in the air-flow.
Cut The Outer Cable
Cut the outer-cable carefully, use a spike to re-open the plastice liner, and fit ferrules at each end.
Thread Into Outer
Thread the inner-cable into the outer.
Continue down the cable run setting up any other section of outer cable. On some bikes the derailleur cables run under the bottom bracket shell before they reach the derailleur. The last run into a rear derailleur needs to be long enough for the derailleur to move – it changes position for different gears – without pulling the derailleur cable.
Screw down any barrel adjusters on the cable run. They may be at the exit of the shifter, at a stop on the down-tube, or on the entry to the rear derailleur. Some system have an in-line barrel adjuster that just sits in the cable.
Clamp The Inner-cable
The inner cable must be clamped in exactly the right position. There is usually a groove under the plate on the clamp-bolt that shows where the derailleur cable must lie.
Stress The Cable
Clamp the inner cable in place. Pull on any exposed section of cable to fully seat all the ferrules and settle the outer-cable into the stops. If the outer-cable runs the full length of the inner-cable you can do the same job by pedalling the bike and working the shifter hard to change gear.
Take Up Slack
Make sure the shifters are fully released – usually by selecting the highest gear at the back and the lowest gear at the front – then loosen the clamp bolt, pull any slack through and reclamp the derailleur cable.
If you have a friction system – where the rider decides how far to pull the lever and the shifter doesn’t ‘click’ – the gear is set up and ready for testing. If the system is indexed, with the shifter clicking precisely between the gear positions, it is now ready to be tuned.