1.安装多个nacos
2.修改配置文件 修改3个集群的端口号分别为3333、4444、5555
修改端口号:
server.port=3333/4444/5555
在最底下添加mysql配置,(次步很重要,保证多个nacos集群数据一致)
3.复制cluster.conf.example改名为cluster.conf
配置cluster.conf文件
4.分别启动nacos3333、4444、5555服务
5.启动后测试http://localhost:3333/nacos, http://localhost:4444/nacos, http://localhost:5555/nacos
nacos
nacos
登录
6.配置nginx.
配置中 新增
upstream nacos {
server 127.0.0.1:3333;
server 127.0.0.1:4444;
server 127.0.0.1:5555;
}
server {
listen 8866;
server_name 192.168.1.88;
location /nacos/ {
proxy_pass http://nacos/nacos/;
}
}
7.重启nginx
service nginx restart
8.测试 访问 http://localhost:8866/nacos



