Section 26A. A city, by accepting the provisions of this section and sections twenty-six B to twenty-six E, inclusive, by vote of the city council and approval of the mayor, and a town, by accepting the provisions of said sections by vote of the town, may create a health department to replace the board of health therein. Such health department shall consist of a commissioner of health who shall perform and exercise the duties and powers of a board of health, with the advice of an advisory council of health.