{"id":42192351,"url":"https://github.com/2233466866/lnmp","last_synced_at":"2026-01-26T23:12:09.937Z","repository":{"id":210158512,"uuid":"237905162","full_name":"2233466866/lnmp","owner":"2233466866","description":"Docker Linux+Nignx+MySQL+PHP+Node.js+Redis","archived":false,"fork":false,"pushed_at":"2023-01-12T04:26:05.000Z","size":245125,"stargazers_count":61,"open_issues_count":4,"forks_count":31,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-01T05:22:46.009Z","etag":null,"topics":["mysql","nginx","php","php-fpm","redis"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/2233466866/lnmp","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2233466866.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-03T07:06:01.000Z","updated_at":"2023-12-01T05:22:48.494Z","dependencies_parsed_at":"2023-12-01T05:33:36.500Z","dependency_job_id":null,"html_url":"https://github.com/2233466866/lnmp","commit_stats":null,"previous_names":["2233466866/lnmp"],"tags_count":6,"template":null,"template_full_name":null,"purl":"pkg:github/2233466866/lnmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2233466866%2Flnmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2233466866%2Flnmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2233466866%2Flnmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2233466866%2Flnmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2233466866","download_url":"https://codeload.github.com/2233466866/lnmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2233466866%2Flnmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28791166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mysql","nginx","php","php-fpm","redis"],"created_at":"2026-01-26T23:12:09.099Z","updated_at":"2026-01-26T23:12:09.923Z","avatar_url":"https://github.com/2233466866.png","language":"Dockerfile","readme":"## QQ群669756510\r\n\r\n## 使用教程(Quick start)\r\n\r\n### 下载(Download)\r\n```\r\n# 主流版本\r\n## CentOS7 + Nginx + Node.js + MySQL + php-^7.4 + php5.6.40\r\ndocker pull 2233466866/lnmp\r\ndocker pull 2233466866/lnmp:1.13\r\n\r\n# nosql版本\r\n## CentOS7 + Nginx + Node.js + MySQL + php-^7.4 + php5.6.40 + Redis\r\ndocker pull 2233466866/lnmp:nosql\r\ndocker pull 2233466866/lnmp:1.13-nosql\r\n\r\n# newest版本\r\n## CentOS7 + Nginx + Node.js + MySQL + php-^8.1 + php-^7.4 + php5.6.40 + Redis\r\ndocker pull 2233466866/lnmp:newest\r\n\r\n# mini版本\r\n## CentOS7 + Nginx + php-^7.4\r\ndocker pull 2233466866/lnmp:mini\r\n```\r\n\r\n### 配置(Config)\r\n```\r\n# 配置文件路径(Config file path)\r\n# Nginx\r\n/usr/local/nginx/conf/nginx.conf\r\n\r\n# MySQL\r\n/etc/my.cnf\r\n\r\n# Redis\r\n/usr/local/redis/redis.conf\r\n\r\n# php-5\r\n/usr/local/php5/lib/php.ini\r\n/usr/local/php5/etc/php-fpm.conf\r\n\r\n# php-7\r\n/usr/local/php7/lib/php.ini\r\n/usr/local/php7/etc/php-fpm.conf\r\n/usr/local/php7/etc/php-fpm.d/www.conf\r\n\r\n# php-8\r\n/usr/local/php8/lib/php.ini\r\n/usr/local/php8/etc/php-fpm.conf\r\n/usr/local/php8/etc/php-fpm.d/www.conf\r\n```\r\n\r\n### 启动(Start)\r\n```\r\n# 端口映射自行指定,容器名称自行指定为lnmp\r\ndocker run -dit --privileged=true --name=lnmp 2233466866/lnmp\r\n\r\n# 高级用法(Advanced usage)\r\ndocker run -dit \\\r\n-p 80:80 \\\r\n-p 443:443 \\\r\n-p 3306:3306 \\\r\n-p 9000:9000 \\\r\n-v /宿主机自定义目录/www:/www \\\r\n-v /宿主机自定义目录/mysql:/data/mysql \\\r\n--privileged=true \\\r\n--name=lnmp \\\r\n2233466866/lnmp\r\n\r\n# 如对配置文件比较熟悉，也可以通过宿主机挂载使用自定义的配置文件\r\n```\r\n\r\n### 连接(Connect)\r\n```\r\n# 容器名称与上一步保持一致\r\ndocker exec -it lnmp /bin/bash\r\n```\r\n\r\n### 状态(Status)\r\n```\r\nps aux|grep nginx\r\nps aux|grep mysql\r\nps aux|grep php5\r\nps aux|grep php7\r\nps aux|grep php8\r\nps aux|grep redis\r\n# 或者(Or)\r\nsystemctl status nginx\r\nsystemctl status mysqld\r\nsystemctl status php5\r\nsystemctl status php7\r\nsystemctl status php8\r\nsystemctl status redis\r\n```\r\n\r\n### 初始密码(Default password)\r\n```\r\ncat /var/log/mysqld.log|grep 'A temporary password'\r\n# 或\r\npassword=`cat /var/log/mysqld.log|grep 'A temporary password'`;password=${password:91};echo $password\r\n```\r\n\r\n### 初始化(initialize)\r\n```\r\n如你的mysql数据是全新的，那么你可以在^1.11 or ^1.11-nosql版本中，使\r\n用 mysql_init 脚本将数据库密码初始化为：ASDFqwer1234####，该脚本如无\r\n法正常运行，请通过上一步获取的初始密码，用mysql_secure_installation\r\n手动初始化mysql。\r\n```\r\n\r\n### 警告(Warning)\r\n```\r\n# 请保持清醒头脑，明确自己是在容器内还是在服务器本身执行命令，以及-v挂载对文件的影响，以免造成不可挽回的损失\r\n```\r\n\r\n### PHP扩展(PHP extension)\r\n```\r\n# 默认已安装部分扩展在目录：/usr/local/php7/lib/php/extensions/no-debug-non-zts-20170718/\r\n# 如果要启用指定扩展，则需要修改php.ini，加上\r\nextension=xxx.so\r\n# xxx为PHP扩展的文件名，然后重启php\r\nsystemctl restart php7\r\n```\r\n\r\n### 版本(Version)\r\n```\r\n# 各版本详细信息请参考\r\nhttps://github.com/2233466866/lnmp/wiki\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2233466866%2Flnmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2233466866%2Flnmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2233466866%2Flnmp/lists"}