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.
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
Check whether apache2 is installed successfully
>apache2 -v
Install php5/php7
>apt-get install php5/php7
Check if php is installed successfully
> php5/php7 -v
Check if there is a php.load module in apache2
>cat /etc/apache2/mods-enabled/{php5.load | php7.load}
If there is no corresponding PHP version of .load, install libapache2-mod-php5/libapache2-mod-php7
Install MySQL
>apt-get install mysql-server
Check whether MySQL is installed successfully
>mysql -V
Check if php has a mysql configuration file
>cat /etc/{php5/php7}/conf.d/mysql.ini
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
Use the integration package to install
>tasksel install lamp-server
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!