Quick Start

precondition

Supported Operating Systems

  • Support mainstream Linux distributions (based on Debian/RedHat macOS, including OpenKylin and other domestic operating systems)
operating system framework Software requirements
linux/amd64 x86_64 docker、docker compose
linux/arm64 aarch64 docker、docker compose

Technology stack supported by LDNMP

service edition
Nginx 1.27.x
MySQL 9.0.x
PHP 8.3.x
Adminer latest
Redis 7.x
The application version is updated in sync with the official.

directory structure

Relative directory describe
./apps/mysql/conf Path of MySQL configuration file
./apps/mysql/data MySQL data storage directory
./apps/mysql/logs MySQL log storage path
./apps/nginx Nginx configuration file directory
./apps/nginx/ssl Nginx certificate storage directory
./apps/nginx/logs Nginx log storage directory
./web Website storage directory
./apps/php PHP configuration file directory
./apps/php/logs PHP-FPM log directory
./apps/php/etc Php.ini php-fpm.conf Configuration Directory
./apps/redis/conf Redis configuration file directory
./apps/redis/data Data store directory
The installation relative directory can be edited as needed docker-compose.yaml Modification.

Installed and supported PHP extensions

Extension PHP 8.3
amqp
apcu
ast
bcmath
bitset
blackfire
bz2
calendar
Core
csv
ctype
curl
date
dba
ddtrace
decimal
dom
ds
enchant
ev
event
excimer
exif
FFI
fileinfo
filter
ftp
gd
gearman
geos
geospatial
gettext
gmagick
gmp
gnupg
grpc
hash
http
iconv
igbinary
imap
inotify
intl
ion
json
json_post
jsonpath
ldap
libsmbclient
libxml
luasandbox
lzf
mailparse
maxminddb
mbstring
mcrypt
memcache
memcached
mongodb
msgpack
mysqli
mysqlnd
newrelic
OAuth
oci8
odbc
openssl
parle
pcntl
pcov
pcre
PDO
pdo_dblib
PDO_Firebird
pdo_mysql
PDO_OCI
PDO_ODBC
pdo_pgsql
pdo_sqlite
pdo_sqlsrv
pgsql
Phar
php_trie
phpy
pkcs11
posix
pq
protobuf
pspell
random
raphf
rdkafka
readline
redis
Reflection
relay
SeasClick
SeasLog
session
shmop
SimpleXML
smbclient
snappy
snmp
snuffleupagus
soap
sockets
sodium
solr
SourceGuardian
SPL
SPX
sqlite3
ssh2
standard
Stomp
swoole
sync
sysvmsg
sysvsem
sysvshm
tideways
tidy
timezonedb
tokenizer
uploadprogress
uuid
uv
vld
xdebug
xdiff
xhprof
xlswriter
xml
xmldiff
xmlreader
xmlrpc
xmlwriter
xsl
yac
yaml
yar
Zend OPcache
zephir_parser
zip
zlib
zmq
zstd
This extension comes from https://github.com/mlocati/docker-php-extension-installer Reference sample file

Quick Start

Start process: pull code – pull image – start service, where PHP image is based on the official PHP image, and all PHP extensions are installed by default, so there is no need to install PHP extensions, and it is ready for use out of the box.

  1. Download online deployment package
     wget  https://renwole.com/ldnmp/v1.1.tar.gz
  2. decompression
     tar zxf v1.1.tar.gz
  3. Set directory permissions
     chmod -R 777 ldnmp*
  4. Enter the project directory and execute the following command to start the service
     Docker compose up - d or docker compose up - d
  5. 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
  6. Accessible http://localhost:8086 Access Administrator to manage MySQL database
  7. 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

  1. Automatically installed by default docker-compose.yaml All services in, namely: Nginx, MySQL, PHP, Administrator
  2. Only install Nginx
     docker-compose up -d nginx 
  3. Install PHP only
     docker-compose up -d php
  4. Only install MySQL
     docker-compose up -d mysql

PHP extension

  1. 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/
  2. After editing, execute the following command to start building
     docker-compose build 

    or

     docker compose build
  3. Execute the following command to start the built service
     docker-compose up -d 

    or

     docker compose up -d

Administration

Restart Nginx

 docker restart nginx

Restart MySQL

 docker restart mysql

Restart PHP

 docker restart php

Restart the Administrator

 docker restart adminer

Optional parameters: docker<stop | start | restart>servicename

Default Port

service Container exposed port Default Port
Nginx 8084(http)/ 8085(https) 80/443
PHP nine thousand nine thousand
MySQL three thousand three hundred and seven three thousand three hundred and six
Adminer eight thousand and eighty-six eight thousand and eighty
Editable docker-compose.yaml Modify the container exposure port of the corresponding service

uninstall

  1. Find the directory where the docker-compose.yaml file is located, and execute the following command to stop the service
     docker-compose down
  2. Execute the following command on the terminal to delete all data
     rm -rf apps docker-compose.yaml web
  3. 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.

Quick Start 》8 ideas

  1. qfns

    After the installation is completed, can the source code not be deleted? For example, PHP needs to add modules and source code

    reply
  2. ilnmp-mysql

    The mysql source reports an error. If the source is changed, the installation fails. The prompt: centos7 mysql The server quit without updating PID file

    reply
    1. Node Author

      The memory of the previous virtual machine was small, so when it was shut down, it would not cause the kill to fail due to insufficient memory when compiling. However, with the improvement of the machine specification and the cost performance ratio, this parameter can be turned off or on according to your own needs.

      reply

Post reply

Your email address will not be disclosed. Required items have been used * tagging

 Captcha Code