sudo apt get install tomcat 9

Shell
< role rolename=" manager-gui" /> 
< role rolename=" admin-gui" /> 
< user username=" admin"  password=" password"  roles=" manager-gui,admin-gui" /> 
Source

Also in Shell: