当前位置:网站首页>Nacos cluster construction
Nacos cluster construction
2022-08-05 06:50:00 【User Nickname 23】
Nacos cluster construction
I. Introduction
This article mainly introduces how to build a nacos cluster. The example uses 3 servers to build.
Tips: The following is the text of this article, the following cases are for reference
Second, installation preparation
Nacos is developed based on java, and its operation depends on the java environment.Depends on 64 bit JDK 1.8+, please install jdk by yourself.
1. Download
The download of nacos project is slow from github due to the influence of the network, and it can be downloaded from gitee
git clone https://gitee.com/mirrors/Nacos.git2. Compile
Open the command line in the downloaded nacos root directory, execute mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U to compile and package (maven environment needs to be installed), it is recommended to download the official compiled onepackage, the address is: https://github.com/alibaba/nacos/releases/download/1.3.0/nacos-server-1.3.0.tar.gz.
Copy nacos/distribution/target/nacos-server-1.3.0.tar.gz to the /app directory of server1.
Extract the tar -zxf nacos-server-1.3.0.tar.gz.
Third, modify related configuration
1. Modify the cluster configuration file /app/nacos/conf/cluster.conf
#Open the directory where the configuration file is located
cd /data/nacos/conf/#Modify the cluster configuration file name
mv cluster.conf.example cluster.conf#Modify cluster configuration
vim cluster.conf10.18.10.148:884810.18.10.149:884810.18.10.150:88482. Modify the data source configuration file /app/nacos/conf/application.properties
### If use MySQL as datasource:spring.datasource.platform=mysql### Count of DB:db.num=1### Connect URL of DB:db.url.0=jdbc:mysql://192.168.2.168:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTCdb.user=nacosdb.password=nacos1233. Create database nacos and create account nacos/nacos123
CREATE USER 'nacos'@'%' IDENTIFIED BY 'nacos123';GRANT ALL ON nacos.* TO 'nacos'@'%';4. Execute /app/nacos/conf/nacos-mysql.sql script
Fourth, copy nacos to the other two servers
scp -r /app/nacos/ [email protected]:/app/scp -r /app/nacos/ [email protected]:/app/V. Start and log in to test
1. Start nacos with 3 servers
Execute the following command to start the nacos service
sh /app/nacos/startup.sh2. Login test, default account password nacos/nacos
http://10.18.10.148:8848/nacos
http://10.18.10.149:8848/nacos
http://10.18.10.150:8848/nacos

Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢

Late night drinking, 50 classic SQL questions, really fragrant~
D45_Camera assembly Camera

Tencent Internal Technology: Evolution of Server Architecture of "The Legend of Xuanyuan"

Alibaba Cloud Video on Demand

花花省V5淘宝客APP源码无加密社交电商自营商城系统带抖音接口

Nacos配置服务的源码解析(全)

MyCat安装

cs231n学习记录

Email management Filter emails

LaTeX uses frame to make PPT pictures without labels
随机推荐
2022杭电多校六 1006-Maex (树形DP)
错误记录集锦(遇到则记下)
微信小程序仿input组件、虚拟键盘
浮点数基础知识
淘宝客APP带自营商城本地生活CPS外卖优惠电影票话费更新渠道跟单生活特权V3
更改小程序原生radio的颜色及大小
自营商城提高用户留存小技巧,商城对接小游戏分享
Seven Ways to Center a Box Horizontally and Vertically
文本样式这一篇文章就够了
亚马逊美国站:马术头盔CPC认证标准要求
config.js related configuration summary
lingo入门——河北省第三届研究生建模竞赛B题
Transformer详细解读与预测实例记录
多用户商城多商户B2B2C拼团砍价秒杀支持小程序H5+APP全开源
D45_Camera assembly Camera
NACOS配置中心设置配置文件
The future of cloud gaming
Media query, rem mobile terminal adaptation
Collision, character controller, Cloth components (cloth), joints in the Unity physics engine
uniapp打包次数限制怎么办?只需两步就能解决