标签:lib ror resolve 编码 serve pen 服务 end 目录
1:docker配置
安装依赖包
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
设置阿里云镜像源
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装 Docker-CE
sudo yum install docker-ce
启动docker
# 开机自启
sudo systemctl enable docker
# 启动docker服务
sudo systemctl start docker
设置阿里云镜像加速
# 加速器地址 :
# 阿里云控制台搜索容器镜像服务
# 进入容器镜像服务, 左侧最下方容器镜像服务中复制加速器地址
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["你的加速器地址"]
}
EOF
# 重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
启动docker
# 开机自启
sudo systemctl enable docker
# 启动docker服务
sudo systemctl start docker
2:myql配置
拉取镜像
docker pull mysql:5.7
挂载目录、映射端口启动myql
docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7
新建配置文件my.conf
插入:设置编码、跳过域名解析
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
[mysqld]
init_connect=‘SET collation_connection = utf8_unicode_ci‘
init_connect=‘SET NAMES utf8‘
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
skip-name-resolve
3:redis 配置
拉取镜像
docker pull redis
新建配置文件:
mkdir -p /mydata/redis/conf
touch /mydata/redis/conf/redis.conf
添加持久化:
redis.conf文件中插入:
appendonly yes
启动reids容器:
docker run -p 6379:6379 --name redis -v /mydata/redis/data:/data \
-v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \
-d redis redis-server /etc/redis/redis.conf
标签:lib ror resolve 编码 serve pen 服务 end 目录
原文地址:https://www.cnblogs.com/afublog/p/12763073.html