How to install the php environment in deepin: 1. Install apache and php through the command "sudo apt install php"; 2. Modify the apache configuration file; 3. Install the php extension.
The operating environment of this article: Windows7 system, PHP7.2 version, DELL G3 computer
deepin installation php running environment
Install apache and php
Command: sudo apt install php
After executing the above command, apache2 and php7.2 will be automatically installed.
The apache configuration file is in /etc/apache2
The php configuration file is in /etc/php/7.2/apache
The php installation directory is in /usr/lib/ php
The php extension directory is in /usr/lib/php/20170718
Enable apache rewriting
Modify the apache configuration file
File location:/etc/apache2/apache2.conf
Change AllowOverride None in the file and change None to All
<Directory /> ... AllowOverride All ... </Directory>
Install php extension
Command: sudo apt install php7.2-extension
Install mysql
Recommended study: "PHP Video Tutorial"
The above is the detailed content of How to install php environment in deepin. For more information, please follow other related articles on the PHP Chinese website!