Nacos 2.0.0 安装

Windows 安装

1. 基本介绍并安装

  • 下载地址:https://github.com/alibaba/nacos/releases
    在这里插入图片描述

  • Nacos 官方文档:https://nacos.io/zh-cn/docs/what-is-nacos.html

  • 网盘地址:链接: https://pan.baidu.com/s/15CrTF9Xw8DNBEYjnADRIrQ 提取码: eha9

2. 初始化SQL

在MySQL中创建 nacoss 数据库库下面两个脚本文件

  • acos/conf/nacos-mysql.sql
  • acos/conf/schema.sql

3. 修改 nacos/conf/application.properties

修改内容如下:

spring.datasource.platform=mysql

### Count of DB:
	db.num=1

### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=root
db.password.0=123456

### Connection pool configuration: hikariCP
db.pool.config.connectionTimeout=30000
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2

#*************** Naming Module Related Configurations ***************#
### Data dispatch task execution period in milliseconds:
# nacos.naming.distro.taskDispatchPeriod=200

### Data count of batch sync task:
# nacos.naming.distro.batchSyncKeyCount=1000

### Retry delay in milliseconds if sync task failed:
# nacos.naming.distro.syncRetryDelay=5000

### If enable data warmup. If set to false, the server would accept request without local data preparation:
# nacos.naming.data.warmup=true

### If enable the instance auto expiration, kind like of health check of instance:
# nacos.naming.expireInstance=true

nacos.naming.empty-service.auto-clean=true
nacos.naming.empty-service.clean.initial-delay-ms=50000
nacos.naming.empty-service.clean.period-time-ms=30000

4. 修改 nacos/bin/startup.cmd

把里面的 set MODE="cluster" 改为 set MODE="standalone"

5. 双击启动 nacos/bin/startup.cmd

在这里插入图片描述

6. 测试

浏览器访问 http://localhost:8848/nacos 并登录,账号/密码均为 nacos
下面是登录成功之后的页面
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值