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、9.1.x
PHP 8.3.x、8.4.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.4 PHP 8.3
amqp
apcu
apcu_bc
ast
bcmath
bitset
blackfire
brotli
bz2
calendar
cassandra *
cmark
csv
dba
ddtrace *
decimal
ds
ecma_intl *
enchant
ev
event
excimer
exif
ffi
ftp
gd
gearman
geoip
geos *
geospatial
gettext
gmagick
gmp
gnupg
grpc
http
igbinary
imagick
imap
inotify
interbase
intl
ion
ioncube_loader
jsmin
json_post
jsonpath
ldap
luasandbox
lz4 *
lzf
mailparse
maxminddb
mcrypt
md4c
memcache
memcached
memprof *
mongo
mongodb
mosquitto
msgpack
mssql
mysql
mysqli
newrelic
oauth
oci8
odbc
opcache
opencensus
openswoole
opentelemetry
parallel *
parle *
pcntl
pcov
pdo_dblib
pdo_firebird
pdo_mysql
pdo_oci
pdo_odbc
pdo_pgsql
pdo_sqlsrv
pgsql
phalcon
php_trie
phpy *
pkcs11
pq
propro
protobuf
pspell
psr
pthreads *
raphf
rdkafka
recode
redis
relay
saxon *
seasclick
seaslog
shmop
simdjson *
smbclient
snappy
snmp
snuffleupagus
soap
sockets
sodium *
solr
sourceguardian
spx
sqlsrv *
ssh2
stomp
swoole
sybase_ct
sync
sysvmsg
sysvsem
sysvshm
tensor
tideways
tidy
timezonedb
uopz
uploadprogress
uuid
uv
vips *
vld
wddx
wikidiff2 *
xdebug
xdiff
xhprof
xlswriter
xmldiff
xmlrpc
xpass *
xsl
yac
yaml
yar
zephir_parser
zip
zmq
zookeeper
zstd

This extension comes from https://github.com/mlocati/docker-php-extension-installer Reference sample file

PS: the pre-installed PHP extensions are excluded from this list. You can list them with the following command (change  php:8.4.2-fpm-alpine  to reflect the PHP version you are interested in):

 $ docker run --rm php:8.4.2-fpm-alpine  php -m [PHP Modules] Core ctype curl date dom fileinfo filter hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix random readline Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules]

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/ldnmp-1.4.1.tar.gz
  2. decompression
     tar zxf ldnmp-1.4.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
Redis six thousand three hundred and seventy-nine six thousand three hundred and seventy-nine
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.

8 thoughts on “ Quick Start

  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 Post 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

Leave a Reply

Your email address will not be published. Required fields are marked *