目录:
(1).下载
(2).集群配置文件修改
(3).友情提示
(1).下载
下载可执行程序:
https://github.com/alibaba/nacos/releases
wget https://github.com/alibaba/nacos/releases/download/2.0.2/nacos-server-2.0.2.zip
unzip nacos-server-2.0.2.zip
mv nacos nacos-server-2.0.2
(2).集群配置文件修改
1.修改application.properties
1.1.配置mysql数据库
#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
spring.datasource.platform=mysql
### Count of DB:
db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://mysql-url:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=nacos
db.password.0=nacos
1.2.配置local-ip
### Specify local server's IP:
nacos.inetutils.ip-address=10.0.40.242
2.配置cluster.conf
10.0.38.14:8848
10.0.43.66:8848
10.0.40.242:8848
(3).友情提示
如果不是历史原因的迫不得已,不要用nacos,为啥?坑,用之前知道他会有坑,但没想到如此之坑。坑中之王中王。
参考资料:
1.Nacos部署环境:
https://nacos.io/zh-cn/docs/deployment.html