summary
Install the web server software Apache in a Linux environment.
Apache installation
What is Apache?
It is one of the most famous “Web server software” in the world.
The web server software accepts HTTP requests from clients.
Executes a script language such as PHP in response to a request and responds the execution result to the client.
Abbreviation for “HyperText Transfer Protocol”, which is a communication protocol (procedure, convention) for sending and receiving message data between a client and a server.
Check software package “httpd”
Check the apache package.
sudo dnf module list httpd

Software package installation
Install the default v2.4.
sudo dnf -y install httpd
Confirmation after installation
httpd -v

Apache startup
Use the “systemctl” command to start Apache.
A command that operates systemd (system management daemon).
Start, Stop, and Check the status of the service.
systemctl command {Unit name}.service
command | processing | example |
status | status check | systemctl status httpd |
start | Start of the service | systemctl start httpd |
restart | Service restart | systemctl restart httpd |
stop | End of service | systemctl stop httpd |
enable | Service automatic startup | systemctl enable httpd |
disable | Service automatic startup stop | systemctl disable httpd |
Execute the command to execute the command.
sudo systemctl enable --now httpd
Check the status.
systemctl status httpd

Change firewall settings
Open the port that accepts https requests from the outside.
sudo firewall-cmd --zone=public --add-service=http --permanent
Reboot firewall
sudo firewall-cmd --reload
Check firewall
sudo systemctl status firewalld

Access the web server
Access the web server from the web browser (Edge, chrome) of the host OS.
http://{Web server IP}:80/
If the IP of the Web server is “192.168.0.100”, it will be as follows.
http://192.168.0.100:80/

Apache has been successfully installed.