Installing httpd in my virtual box

Installing httpd in my virtual box i am facing issue , as im trying to install httpd using sudo yum install httpd even i have updated im facing same problem kindly provide me the solution for this

Hey ramkumar,

The logs show that your virtual machine is not connected to network or you haven’t set up DNS.

Firstly, check virtual machine network configuration.
If this is correct (the simplest working configuration is NAT option), add “nameserver” to /etc/resolv.conf (i’m use debian linux and i’m not sure in centos is this same file)