#yum install httpd --> You need to be root to install any package.
#service httpd restart
#chkconfig httpd on --> It will ensure httpd will be started on the required run level
Note: Home/default directory of httpd is /var/www/html/
Download the file from the given URL in the question to your home directory or to the location mentioned using wget:
Note: Refrain using 'move' unless mentioned in question. Because 'mv' will not allow to open the web page due to the selinux set up.
If in exam 'move' is mentioned, do below steps:
#mv index.html /var/www/html
#cd /var/www/html
#restorecon * --> It sets the selinux of the selinux context of the file similar to the parent folder
#service httpd restart
#chkconfig httpd on --> It will ensure httpd will be started on the required run level
Note: Home/default directory of httpd is /var/www/html/
Download the file from the given URL in the question to your home directory or to the location mentioned using wget:
Now we have to copy this file 'index.html' from home directory to '/var/www/html'
#cp index.html /var/www/htmlNote: Refrain using 'move' unless mentioned in question. Because 'mv' will not allow to open the web page due to the selinux set up.
If in exam 'move' is mentioned, do below steps:
#mv index.html /var/www/html
#cd /var/www/html
#restorecon * --> It sets the selinux of the selinux context of the file similar to the parent folder


No comments:
Post a Comment