precondition
-
Before installation, make sure that the system is clean and no environment has been installed, such as Apache/Nginx/PHP/MySQL/MariaDB. Otherwise, there will be port conflicts. -
Please install docker and docker compose by yourself: -
Docker installation method: https://docs.docker.com/engine/install/ -
Docker compose installation method: https://docs.docker.com/compose/install/
-
Supported Operating Systems
-
Support mainstream Linux distributions (based on Debian/RedHat macOS, including OpenKylin and other domestic operating systems)
| | |
---|---|---|
| | |
| | |
Technology stack supported by LDNMP
| |
---|---|
| |
| |
| |
| |
| |
directory structure
| |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
docker-compose.yaml
Installed and supported PHP extensions
| |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Quick Start
-
Download online deployment package wget https://renwole.com/ldnmp/v1.1.tar.gz -
decompression tar zxf v1.1.tar.gz -
Set directory permissions chmod -R 777 ldnmp* -
Enter the project directory and execute the following command to start the service Docker compose up - d or docker compose up - d -
After installation, access: http://localhost:8084 or https://localhost:8085 (Self signed HTTPS) can see the effect after installation. The PHP code is in the file/ web/index.php -
Accessible http://localhost:8086 Access Administrator to manage MySQL database -
After installation, execute the following command to view the MySQL password. The default account is root cat docker-compose.yaml | grep MYSQL_ROOT_PASSWORD
custom installation
-
Automatically installed by default docker-compose.yaml All services in, namely: Nginx, MySQL, PHP, Administrator -
Only install Nginx docker-compose up -d nginx -
Install PHP only docker-compose up -d php -
Only install MySQL docker-compose up -d mysql
PHP extension
-
Editable as needed docker-compose.yaml find PHP_EXTENSIONS By default, all PHP extensions are deleted or added as needed https://github.com/mlocati/docker-php-extension-installer PHP extensions supported in. Multiple extensions are separated by spaces (build supports multi platform operations, refer to: https://docs.docker.com/build/building/multi-platform/ ) -
After editing, execute the following command to start building docker-compose build or docker compose build -
Execute the following command to start the built service docker-compose up -d or docker compose up -d
Administration
docker restart nginx
docker restart mysql
docker restart php
docker restart adminer
Optional parameters: docker<stop | start | restart>servicename
Default Port
| | |
---|---|---|
| | |
| | |
| | |
| | |
docker-compose.yaml
uninstall
-
Find the directory where the docker-compose.yaml file is located, and execute the following command to stop the service docker-compose down -
Execute the following command on the terminal to delete all data rm -rf apps docker-compose.yaml web -
Execute the following command on the terminal to delete the Docker image docker rmi $(docker images | grep 'php|nginx|mysql' | awk '{print $3}')
Uninstalling and deleting means that all data will no longer exist and be irreversible. Please back up first. Uninstalling and deleting means that all data will no longer exist and be irreversible. Please back up first.