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;
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
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;
4. Modify application.properties in the same directory
vim application.properties
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:
6. Access the nacos client: ip+port/nacos of any server;
http://139.129.22.121:8848/nacos
Account password: nacos