There are several things that can be done in addition to the normal precautions for a business or home to protect computer equipment. Every room should have smoke and fire detection alarms installed, including any computer or server rooms. In addition to that standard precaution, there are some other precautions that can help.
Sprinkler systems are very useful when combating and containing a fire but can damage computers. As an alternative, in rooms with valuable computer equipment, clean agent fire suppression systems can be used instead of sprinklers. While more expensive to install and maintain, they are more likely to protect computer systems in the event of a fire.
Another precaution is having portable and appropriate fire extinguishers available. Class C extinguishers are ideal for electrical fires. Halon and Carbon Dioxide are common inert gasses used for such fires and will minimize any further damage. When choosing an extinguisher, it is important to identify your specific needs and then choose accordingly. Having the extinguisher is the first step, the second is knowing how to use it. Remember PASS and review extinguisher use during drills to stay ready in case of fire.
Finally, the most basic step to protect any system is doing regular backups. While computer backups are fundamental, there are some extra steps that can be taken to safeguard against damage from fire as well as other misfortunes. If you back up locally, investing in a fire safe for the drives will help keep your backups relatively safe from fire. Off-site storage is another option that will keep the data safe from anything that happens locally, including a fire. Either way, this will not prevent hardware damage, but it will keep your data safe so you can recover more quickly.