. . . "establish and enforce such regulations as may be necessary to prevent or extinguish fires within said city; to regulate the erection" .