Home > Backend Development > PHP Tutorial > Step introduction to the two methods of LAMP configuration

Step introduction to the two methods of LAMP configuration

不言
Release: 2023-04-04 13:20:01
forward
3678 people have browsed it

This article brings you a step-by-step introduction to the two methods of LAMP configuration. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Step introduction to the two methods of LAMP configuration

There are two ways to configure LAMP

  • Download separately Per file, install

  • Use integration package

Download each file individually, install

Install apache2

>apt-get install apache2
Copy after login

Check whether apache2 is installed successfully

>apache2 -v
Copy after login

Install php5/php7

>apt-get install php5/php7
Copy after login

Check if php is installed successfully

> php5/php7 -v
Copy after login

Check if there is a php.load module in apache2

>cat /etc/apache2/mods-enabled/{php5.load | php7.load}
Copy after login

If there is no corresponding PHP version of .load, install libapache2-mod-php5/libapache2-mod-php7

Install MySQL

>apt-get install mysql-server
Copy after login

Check whether MySQL is installed successfully

>mysql -V
Copy after login

Check if php has a mysql configuration file

>cat /etc/{php5/php7}/conf.d/mysql.ini
Copy after login

If there is no mysql.ini corresponding to the php version, install php5-mysql/php7-mysql

Restart the service

>service mysql restart

>service apache2 restart
Copy after login

Use the integration package to install

>tasksel install lamp-server
Copy after login

Recommended learning: "PHP Video Tutorial

The above is the detailed content of Step introduction to the two methods of LAMP configuration. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template