创建三个名称不一样的包
nacos1,nacos2,nacos3
application.properties下修改为不同的ip
分别为8848,8858,8868
配置好数据库信息,我的为
#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
# spring.datasource.platform=mysql
spring.sql.init.platform=mysql
### Count of DB:
db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=xxx
db.password.0=xxx
修改或新增cluster.conf
添加
127.0.0.1:8848
127.0.0.1:8858
127.0.0.1:8868
分别启动:
bash startup.sh