Methods of payment Abuse

How to install LAMP stack on CentOS Stream server

13.12.2022, 12:58

Step-by-step instructions on how to install LAMP on CentOS Stream, you need to develop and test PHP applications.

What is the LAMP stack

The LAMP stack is an acronym that stands for:

  • L - Linux (OS);
  • A - Apache (web server);
  • M - MySQL (DB);
  • P - interpreter.

As a rule, it is necessary to add nginx here, as Apache and nginx have different algorithms for processing requests. If the server is used for development (minimal number of requests), then Apache will do. If you need a server to process a large number of requests and work in conditions of high load, additionally choose nginx as reverse-proxy.

Step-by-step instructions on how to install Apache (web-server)

Installing apache on CentOS involves a number of actions:

1. Install Apache with the command

dnf install httpd

2. Adding Apache to automatic downloads and starting the service.

3. Accessing the ports (usually on the server it is closed by a regular Firewall Firewall. The command is used:

firewall-cmd --permanent --zone=public --add-service=http

Similarly for https. Next reboot and see if the ports opened after changing the default settings.

If everything is fine, you can try to make a simple page for the test. Check it simply: the IP-address of the VPS is typed into the address bar of the browser. If everything works and opens, go to the settings. It is necessary to create a configuration file and check Apache for syntax errors.