1.文章教程使用配置环境:
[root@izwz91quxhnlk8xexo852xz ~]# docker --version
Docker version 19.03.1, build 74b1e89
[root@izwz91quxhnlk8xexo852xz ~]# df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 19G 19G 51% /
devtmpfs 909M 0 909M 0% /dev
tmpfs 920M 0 920M 0% /dev/shm
tmpfs 920M 556K 919M 1% /run
tmpfs 920M 0 920M 0% /sys/fs/cgroup
tmpfs 184M 0 184M 0% /run/user/0
overlay 40G 19G 19G 51% /var/lib/docker/overlay2/22a5b83dd224ee73588dcbc58c5d618e9d91398f57389ba3a3632aed7e853365/merged
[root@izwz91quxhnlk8xexo852xz ~]# nginx -V
nginx version: nginx/1.16.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
built with OpenSSL 1.1.1b 26 Feb 2019
2.lnmp环境搭建成功的详细信息:
php7:
[root@9c73e764fc4b bin]# ./php --version
PHP 7.3.8 (cli) (built: Aug 22 2019 09:34:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.7, Copyright (c) 2002-2019, by ionCube Ltd.
with Zend OPcache v7.3.8, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
Segmentation fault (core dumped)
[root@9c73e764fc4b bin]# ./php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
ionCube Loader
json
libxml
mbstring
memcache
memcached
mongodb
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
phalcon
Phar
posix
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
swoole
sysvsem
tokenizer
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaf
Zend OPcache
zip
zlib
php5.6:
[root@9c73e764fc4b bin]# ./php --version
PHP 5.6.40 (cli) (built: Aug 22 2019 10:06:15)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.7, Copyright (c) 2002-2019, by ionCube Ltd.
with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
[root@9c73e764fc4b bin]# ./php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
ionCube Loader
json
libxml
mbstring
mcrypt
memcache
memcached
mhash
mongodb
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
phalcon
Phar
posix
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
swoole
sysvsem
tokenizer
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend Guard Loader
Zend OPcache
zip
zlib
mysql8.0:
[root@9c73e764fc4b bin]# ./mysql --version
./mysql Ver 8.0.17 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)
nginx:
[root@9c73e764fc4b sbin]# ./nginx -V
nginx version: nginx/1.16.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
3.宿主机中通过以下命令可拉取我的阿里云仓库里最新的的centos-lnmp镜像,欢迎大家下载使用。有问题可以加微信与我沟通:
registry.cn-shenzhen.aliyuncs.com/eric_zhou/public:lnmp-v2.0
[root@izwz91quxhnlk8xexo852xz ~]# docker pull registry.cn-shenzhen.aliyuncs.com/eric_zhou/public:lnmp-v2.0
[root@izwz91quxhnlk8xexo852xz ~]# docker exec -it [imageID] /bin/bash
-----------------------------------------------------------------------------------------
php mysql nginx 已经加入全局变量,需要执行以下命令方可生效:
source /etc/profile