Dear Learner,

Please follow the below given steps to install apache2 on ubuntu.

sudo apt-get update
sudo apt-get install apache2

Please refer the below given screenshot for more details.