Over twenty-one years of age; A registered elector of the city and; A resident of the city or of territory annexed to the city, or both, for at least six months immediately preceding his election or appointment, if a person be appointed to fill a vacancy in an elective office.