mall-cloud/ReadMe/环境搭建/创建Nacos.md

35 lines
823 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 搭建Nacos环境
这里使用普通的Docker方式进行环境的搭建。
如果当前存在Nacos停止并移除Nacos
```sh
docker stop nacos
docker rm nacos
```
创建Nacos。
```sh
docker run -d \
--name nacos \
--restart=always \
-e MODE=standalone \
-e SPRING_DATASOURCE_PLATFORM=mysql \
-e MYSQL_SERVICE_HOST=rm-bp12z6hlv46vi6g8mro.mysql.rds.aliyuncs.com \
-e MYSQL_SERVICE_PORT=3306 \
-e MYSQL_SERVICE_DB_NAME=nacos \
-e MYSQL_SERVICE_USER=gulimall \
-e MYSQL_SERVICE_PASSWORD=0212Gulimall \
-e MYSQL_SERVICE_DB_PARAM="characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true" \
-e JVM_XMS=256m \
-e JVM_XMX=256m \
-e TZ=Asia/Shanghai \
-p 8848:8848 \
-p 9848:9848 \
-p 9849:9849 \
nacos/nacos-server:v2.4.3
```