Nacos 2.0.3启动与配置

官网下载

nacos官网:https://nacos.io/zh-cn/index.html

nacos下载地址:评论留言,稍后整理。

单机模式(MySQL)

在0.7版本之前,在单机模式时nacos使用嵌入式数据库实现数据的存储,不方便观察数据存储的基本情况。0.7版本增加了支持mysql数据源能力。

创建本地nacos数据库,执行conf文件夹下的 nacos-mysql.sql文件
在这里插入图片描述

打开nacos根目录conf文件夹中的 application.properties 文件,添加下面配置

#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
spring.datasource.platform=mysql

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

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

启动nacos

startup.cmd -m standalon

最后访问:http://localhost:8848/nacos/
nacos/nacos
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u014641168/article/details/121208656