当前位置:网站首页>High availability of Nacos series

High availability of Nacos series

2022-06-13 05:39:00 codain

We have to install 2.0.0 Version as an example , The download link of the installation package is as follows :

nacos-server-2.0.0-Java Document resources -CSDN download 1、 Execute first readme Some key points in 2、 After successful startup , visit http://ip:port/nacos More download resources 、 For learning materials, please visit CSDN Download channel .https://download.csdn.net/download/qq_38377525/81368532

1、 Download and unzip

2、 Configure clusters

stay conf In the directory cluster.conf.example file , Then copy and paste a copy cluster.conf file , In this file, fill in the cluster's ip+ port , as follows

192.168.80.100:8848
192.168.80.101:8848
192.168.80.102:8848

3、 Configuration persistence Mysql database

① stay conf There is a file named nacos-mysql.sql Script file for , You can create a database directly

② Then, you need to set up a server in each cluster nacos The configuration file application.properties, Modify these values

// explain nacos It uses mysql database 
spring.datasource.platform=mysql
// A database 
db.num=1
db.url.0:jdbc:mysql://192.168.80.110:3306/nacos-mysql
db.user.0=root
db.password.0=root

4、 start-up Nacos service

Start in each node server nacos, But this startup cannot be a stand-alone version , Cluster version is required

linux command :sh startup.sh

windows command :startup.cmd -m cluster

If it appears in the log :Nacos started successfully in cluster mode

Indicating successful startup , Then go to nacos View the node list on the web page , The corresponding node list can be found  

原网站

版权声明
本文为[codain]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280508407288.html