He was appointed as assistant to the astronomer Giovanni Battista Donati in 1862 , professor at the technological institute of Bologna in 1864 , professor of physics at the University of Cagliari in 1873 , and , finally , successor to his father in 1881 in the chair of technological physics at the University of Pisa .