Nacos cluster deployment and installation steps

Nacos cluster deployment and installation steps;

linux system installation steps:

Environment configuration:

1、JDK;
2、Git;
3、Maven;

Take three servers as an example:

1. On the first server:
编译nacos: 下载nacos-server-1.4版本源码;
git clone https://github.com/alibaba/nacos.git
cd nacos
mvn -Prelease-nacos-Dmavem.test.skip=true clean install -U
ls -al distribution/target/

Then enter the (distribution/target) directory just now;

Insert picture description here
Choose different compression packages according to different systems;

2. Install nacos on three servers:

Upload the tar installation package to the /usr/local directory of the three servers;

Unzip the tar package, and then nacos as the root directory;
1. Enter the conf directory and modify the configuration file name;

 [root@izm5e6j8qikrz6tmzcydfcz target]# cd nacos/conf/
[root@izm5e6j8qikrz6tmzcydfcz conf]# mv cluster.conf.example cluster.conf

2. Modify the configuration file and configure the IP and ports of the three servers;

vim cluster.conf 

Insert the picture here upside down and four descriptions
Write the IP + port of the three servers;

3. This version needs to use the mysql database as the data source; download the nacos-mysql.sql file in the same directory, and create the database and data table in your own database;

Insert picture description here

4. Modify application.properties in the same directory

vim application.properties

Insert picture description here
5. Then enter the bin directory to start the project;

./bin/startup.sh 

View the startup log:

tail -f logs/start.out 

As shown in the figure, the startup is successful:
Insert picture description here
6. Access the nacos client: ip+port/nacos of any server;
http://139.129.22.121:8848/nacos

Account password: nacos
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_37521174/article/details/109317881