This is the common question developers searching. They try the simplest solution to install Apache on CentOs Linux or Fedora Linux.
These are the steps to install Apache or httpd using SSH
Connect SSH using following command in terminal and enter password.
# SSH rootusername@hostname
ONE08:~ nikeshyadav$ ssh firstname.lastname@example.org
# email@example.com's password:
Type following command
# yum install httpd
Now, start the Apache/httpd
# chkconfig httpd on
# /etc/init.d/httpd start
Now, Type your url on my case it is http://126.96.36.199/
And its done.
You are ready to use Apache.