Coder Social home page Coder Social logo

docker-lnmp's Introduction

docker run -h lam -p 80:80 -p 8080:8080 -p 9001:9001 -p 3306:3306 -p 6379:6379 -p 27017:27017 --name lnmp -d
-v /usr/local/var/nginx:/etc/nginx
-v /usr/local/var/mysql:/data/mysql
-v /usr/local/var/log:/var/log
-v /Users/long/sites:/usr/local/nginx/html haohonglong/lnmp:1.0

export PATH=$PATH:/usr/local/nginx/sbin

the grant of mysql

drop database if exists litemall;
drop user if exists 'litemall'@'%';
-- 支持emoji:需要mysql数据库参数: character_set_server=utf8mb4
create database litemall default character set utf8mb4 collate utf8mb4_unicode_ci;
use litemall;
create user 'litemall'@'%' identified by 'litemall123456';
grant all privileges on litemall.* to 'litemall'@'%';
flush privileges;

CREATE USER 'lam'@'%' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON *.* TO 'lam'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH   PRIVILEGES;

docker-lnmp's People

Contributors

haohonglong avatar

Watchers

James Cloos avatar  avatar

docker-lnmp's Issues

ERROR: `phpize' failed

pecl install yaf
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading yaf-3.3.0.tgz ...
Starting to download yaf-3.3.0.tgz (123,592 bytes)
............................done: 123,592 bytes
68 source files, building

image

解决方法:执行下面命令
apk add --no-cache --update --virtual .phpize-deps $PHPIZE_DEPS

image

摘抄:
https://segmentfault.com/q/1010000011294465

docker 删除全部镜像

删除所有容器
docker rm -f $(docker ps -aq)

删除所有镜像
docker rmi -f $(docker images -aq)

解决Nginx服务连接超时 404

nginx
fastcgi_connect_timeout 75; #链接
fastcgi_read_timeout 600; #读取
fastcgi_send_timeout 600; #发请求

php.ini
max_execution_time = 0
max_input_time = -1

docker registry-mirrors

{
"registry-mirrors": [
"https://6kx4zyno.mirror.aliyuncs.com",
"https://registry.docker-cn.com"
],
"experimental": true,
"debug": true
}

php 错误日志 redis' already loaded in Unknown on line 0

问题原因:
报错信息给出的意思是:redis模块已经加载过

问题解决:
php加载模块有两种方式,一种是通过php.ini 加载模块,另一种是通过编译时的参数加载模块。
这里,报错信息提示已经加载过,我尝试将php.ini 文件中的相关extensions注释掉并且重启php-fpm

docker面板--portainer

docker run -d -p 9005:9000 \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
--name prtainer \
docker.io/portainer/portainer

there are problems of vagrant

  1. Vagrant was unable to mount VirtualBox shared folders. This is usually
    because the filesystem "vboxsf" is not available
    vagrant plugin install vagrant-vbguest

解决vim 中的中文乱码

sudo vim /etc/vimrc

set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8

baota

docker run -tid -h baota --name baota -p 8088:80 -p 443:443 -p 8888:8888 -p 888:888 --privileged=true --shm-size=1g --restart always -v /Users/long/wwwroot:/www/wwwroot pch18/baota

docker network

docker network create --subnet 192.168.0.0/16 --gateway 192.168.0.1 mynet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.