Web Server installation in Redhat OS / CentOS
A web server is a computer system that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. The web server may be a entire system or may a software that serves the http requests.
Steps to install web server :-
Step 1 :- First check that the httpd package is instaaled or not by the following command:-
- rpm -q httpd
Step 2 :- If it is not installed then run the following command:-
- yum install httpd
Step 3 :- Now to check the configuration files run the following command:-
- rpm -qc httpd
The main configuration file is in /etc/httpd/conf/httpd.conf.
Step 4 :- Now after installation the service will have to restart by the following command:-
- systemctl restart httpd
- systemctl enable httpd
- systemctl status httpd
According to web server, it reads the configure file from /var/www/html/.
Now put the webpage on this location named as index.html. If it is put in the different name then it will not run.
Now type the webpage name in the browser and the page runs in it.