193.112.177.68 47.98.226.154 49.232.174.xx
docker pull nacos/nacos-server
#因为MODE默认是单机启动的,所以我们需要指定其为cluster集群模式MODE
docker run --env MODE=cluster -dit --name nacos -p 8848:8848 nacos/nacos-server
[root@VM-0-6-centos ~]# docker exec -it nacos /bin/bash
[root@cf8e95ee96de nacos]# ls
LICENSE NOTICE bin conf data init.d logs nohup.out target work
[root@cf8e95ee96de nacos]# cd conf/
[root@cf8e95ee96de conf]# ls
1.4.0-ipv6_support-update.sql application.properties cluster.conf nacos-logback.xml schema.sql
[root@cf8e95ee96de conf]# vim application.properties
#配置mysql如下:
spring.datasource.platform=mysql
db.num=1
db.url.0=jdbc:mysql://47.98.226.154:3306/nacos\_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.user=root
db.password=123456
193.112.177.68:8848 47.98.226.154:8848 49.232.174.xx:8848