Windows安装Nacos【超详细图解】

目录

一、下载 Nacos

二、解压 Nacos

三、编辑配置文件

四、创建数据库

五、启动 Nacos

六、进入控制台

 


 

一、下载 Nacos

Nacos v2.3.2 官方网址

二、解压 Nacos

三、编辑配置文件

主要修改数据库用户名、密码、鉴权是否开启、key value和token 

#
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##*************** Spring Boot Related Configurations ***************#
### Default web context path:
server.servlet.contextPath=/nacos
### Include message field
server.error.include-message=ALWAYS
### Default web server port:
server.port=8848#*************** Network Related Configurations ***************#
### If prefer hostname over ip for Nacos server addresses in cluster.conf:
# nacos.inetutils.prefer-hostname-over-ip=false### Specify local server's IP:
# nacos.inetutils.ip-address=#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
spring.datasource.platform=mysql
# spring.sql.init.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=xxxxxx### Connection pool configuration: hikariCP
db.pool.config.connectionTimeout=30000
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2### the maximum retry times for push
nacos.config.push.maxRetryTime=50#*************** Naming Module Related Configurations ***************#### 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### Add in 2.0.0
### The interval to clean empty service, unit: milliseconds.
# nacos.naming.clean.empty-service.interval=60000### The expired time to clean empty service, unit: milliseconds.
# nacos.naming.clean.empty-service.expired-time=60000### The interval to clean expired metadata, unit: milliseconds.
# nacos.naming.clean.expired-metadata.interval=5000### The expired time to clean metadata, unit: milliseconds.
# nacos.naming.clean.expired-metadata.expired-time=60000### The delay time before push task to execute from service changed, unit: milliseconds.
# nacos.naming.push.pushTaskDelay=500### The timeout for push task execute, unit: milliseconds.
# nacos.naming.push.pushTaskTimeout=5000### The delay time for retrying failed push task, unit: milliseconds.
# nacos.naming.push.pushTaskRetryDelay=1000### Since 2.0.3
### The expired time for inactive client, unit: milliseconds.
# nacos.naming.client.expired.time=180000#*************** CMDB Module Related Configurations ***************#
### The interval to dump external CMDB in seconds:
# nacos.cmdb.dumpTaskInterval=3600### The interval of polling data change event in seconds:
# nacos.cmdb.eventTaskInterval=10### The interval of loading labels in seconds:
# nacos.cmdb.labelTaskInterval=300### If turn on data loading task:
# nacos.cmdb.loadDataAtStart=false#***********Metrics for tomcat **************************#
server.tomcat.mbeanregistry.enabled=true#***********Expose prometheus and health **************************#
#management.endpoints.web.exposure.include=prometheus,health### Metrics for elastic search
management.metrics.export.elastic.enabled=false
#management.metrics.export.elastic.host=http://localhost:9200### Metrics for influx
management.metrics.export.influx.enabled=false
#management.metrics.export.influx.db=springboot
#management.metrics.export.influx.uri=http://localhost:8086
#management.metrics.export.influx.auto-create-db=true
#management.metrics.export.influx.consistency=one
#management.metrics.export.influx.compressed=true#*************** Access Log Related Configurations ***************#
### If turn on the access log:
server.tomcat.accesslog.enabled=true### file name pattern, one file per hour
server.tomcat.accesslog.rotate=true
server.tomcat.accesslog.file-date-format=.yyyy-MM-dd-HH
### The access log pattern:
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i### The directory of access log:
server.tomcat.basedir=file:.#*************** Access Control Related Configurations ***************#
### If enable spring security, this option is deprecated in 1.2.0:
#spring.security.enabled=false### The ignore urls of auth
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**### The auth system to use, currently only 'nacos' and 'ldap' is supported:
nacos.core.auth.system.type=nacos### If turn on auth system:
nacos.core.auth.enabled=true### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
nacos.core.auth.caching.enabled=true### Since 1.4.1, Turn on/off white auth for user-agent: nacos-server, only for upgrade from old version.
nacos.core.auth.enable.userAgentAuthWhite=false### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
### The two properties is the white list for auth and used by identity the request from other server.
nacos.core.auth.server.identity.key=authkey
nacos.core.auth.server.identity.value=shigzh### worked when nacos.core.auth.system.type=nacos
### The token expiration in seconds:
nacos.core.auth.plugin.nacos.token.cache.enable=false
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
### The default token (Base64 String):
nacos.core.auth.plugin.nacos.token.secret.key=bmFjb3NfMjAyNDAxMTBfc2hpZ3poX25hY29zX3RvaZVu### worked when nacos.core.auth.system.type=ldap,{0} is Placeholder,replace login username
#nacos.core.auth.ldap.url=ldap://localhost:389
#nacos.core.auth.ldap.basedc=dc=example,dc=org
#nacos.core.auth.ldap.userDn=cn=admin,${nacos.core.auth.ldap.basedc}
#nacos.core.auth.ldap.password=admin
#nacos.core.auth.ldap.userdn=cn={0},dc=example,dc=org
#nacos.core.auth.ldap.filter.prefix=uid
#nacos.core.auth.ldap.case.sensitive=true
#nacos.core.auth.ldap.ignore.partial.result.exception=false#*************** Control Plugin Related Configurations ***************#
# plugin type
#nacos.plugin.control.manager.type=nacos# local control rule storage dir, default ${nacos.home}/data/connection and ${nacos.home}/data/tps
#nacos.plugin.control.rule.local.basedir=${nacos.home}# external control rule storage type, if exist
#nacos.plugin.control.rule.external.storage=#*************** Config Change Plugin Related Configurations ***************#
# webhook
#nacos.core.config.plugin.webhook.enabled=false
# It is recommended to use EB https://help.aliyun.com/document_detail/413974.html
#nacos.core.config.plugin.webhook.url=http://localhost:8080/webhook/send?token=***
# The content push max capacity ,byte
#nacos.core.config.plugin.webhook.contentMaxCapacity=102400# whitelist
#nacos.core.config.plugin.whitelist.enabled=false
# The import file suffixs
#nacos.core.config.plugin.whitelist.suffixs=xml,text,properties,yaml,html
# fileformatcheck,which validate the import file of type and content
#nacos.core.config.plugin.fileformatcheck.enabled=false#*************** Istio Related Configurations ***************#
### If turn on the MCP server:
nacos.istio.mcp.server.enabled=false#*************** Core Related Configurations ***************#### set the WorkerID manually
# nacos.core.snowflake.worker-id=### Member-MetaData
# nacos.core.member.meta.site=
# nacos.core.member.meta.adweight=
# nacos.core.member.meta.weight=### MemberLookup
### Addressing pattern category, If set, the priority is highest
# nacos.core.member.lookup.type=[file,address-server]
## Set the cluster list with a configuration file or command-line argument
# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
## for AddressServerMemberLookup
# Maximum number of retries to query the address server upon initialization
# nacos.core.address-server.retry=5
## Server domain name address of [address-server] mode
# address.server.domain=jmenv.tbsite.net
## Server port of [address-server] mode
# address.server.port=8080
## Request address of [address-server] mode
# address.server.url=/nacos/serverlist#*************** JRaft Related Configurations ***************#### Sets the Raft cluster election timeout, default value is 5 second
# nacos.core.protocol.raft.data.election_timeout_ms=5000
### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
# nacos.core.protocol.raft.data.snapshot_interval_secs=30
### raft internal worker threads
# nacos.core.protocol.raft.data.core_thread_num=8
### Number of threads required for raft business request processing
# nacos.core.protocol.raft.data.cli_service_thread_num=4
### raft linear read strategy. Safe linear reads are used by default, that is, the Leader tenure is confirmed by heartbeat
# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
### rpc request timeout, default 5 seconds
# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000#*************** Distro Related Configurations ***************#### Distro data sync delay time, when sync task delayed, task will be merged for same data key. Default 1 second.
# nacos.core.protocol.distro.data.sync.delayMs=1000### Distro data sync timeout for one sync data, default 3 seconds.
# nacos.core.protocol.distro.data.sync.timeoutMs=3000### Distro data sync retry delay time when sync data failed or timeout, same behavior with delayMs, default 3 seconds.
# nacos.core.protocol.distro.data.sync.retryDelayMs=3000### Distro data verify interval time, verify synced data whether expired for a interval. Default 5 seconds.
# nacos.core.protocol.distro.data.verify.intervalMs=5000### Distro data verify timeout for one verify, default 3 seconds.
# nacos.core.protocol.distro.data.verify.timeoutMs=3000### Distro data load retry delay when load snapshot data failed, default 30 seconds.
# nacos.core.protocol.distro.data.load.retryDelayMs=30000### enable to support prometheus service discovery
#nacos.prometheus.metrics.enabled=true### Since 2.3
#*************** Grpc Configurations ***************### sdk grpc(between nacos server and client) configuration
## Sets the maximum message size allowed to be received on the server.
#nacos.remote.server.grpc.sdk.max-inbound-message-size=10485760## Sets the time(milliseconds) without read activity before sending a keepalive ping. The typical default is two hours.
#nacos.remote.server.grpc.sdk.keep-alive-time=7200000## Sets a time(milliseconds) waiting for read activity after sending a keepalive ping. Defaults to 20 seconds.
#nacos.remote.server.grpc.sdk.keep-alive-timeout=20000## Sets a time(milliseconds) that specify the most aggressive keep-alive time clients are permitted to configure. The typical default is 5 minutes
#nacos.remote.server.grpc.sdk.permit-keep-alive-time=300000## cluster grpc(inside the nacos server) configuration
#nacos.remote.server.grpc.cluster.max-inbound-message-size=10485760## Sets the time(milliseconds) without read activity before sending a keepalive ping. The typical default is two hours.
#nacos.remote.server.grpc.cluster.keep-alive-time=7200000## Sets a time(milliseconds) waiting for read activity after sending a keepalive ping. Defaults to 20 seconds.
#nacos.remote.server.grpc.cluster.keep-alive-timeout=20000## Sets a time(milliseconds) that specify the most aggressive keep-alive time clients are permitted to configure. The typical default is 5 minutes
#nacos.remote.server.grpc.cluster.permit-keep-alive-time=300000## open nacos default console ui
#nacos.console.ui.enabled=true

四、创建数据库

1.打开黑窗口

Win+R -> 输入cmd

2.进入数据库

mysql -u root -p

3.输入数据库密码

4.创建Nacos库

create database nacos;

5.执行 Nacos的conf文件夹下的mysql-schema.sql

source xxxxxxx你的路径/mysql-schema.sql

如果执行不了,就打开mysql-schema.sql文件,讲DDL语句全部复制粘贴执行一遍即可

五、启动 Nacos

进入Nacos安装目录的bin文件夹下执行

startup.cmd -m standalone

六、进入控制台

打开浏览器输入localhost:8848/nacos,账号密码默认都是nacos 

 

 

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/47216.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

elasticsearch中模板的创建和使用

template是es集群内快速生成批量索引的一种快捷方式。 官方解释: 模板是一种在索引创建时配置索引的方法。 7.x之后ES支持两种模板创建方式,一种是传统的或者叫普通的创建方式,即在一次请求中指定 mappings, settings, and aliases等模板的内…

Template execution failed: ReferenceError: name is not defined

问题 我们使用了html-webpack-plugin(webpack)进行编译html,导致的错误。 排查结果 连接地址 html-webpack-plugin版本低(2.30.1),html模板里面不能有符号,注释都不行 // var reg new RegExp((^|&)${name}([^&…

基于LAMMPS模拟岩石表面润湿性

润湿性是指不相混的两相流体与岩石固相表面接触时,其中一相流体沿着岩石表面铺开的现象,该相称为润湿相。润湿性一般采用接触角法来确定,通常根据水在固体表面的角度θ来定义系统的润湿性,接触角为0~75为水润湿&#x…

40、PHP 实现对称的二叉树(含源码)

题目&#xff1a; PHP 实现对称的二叉树 描述&#xff1a; 请实现一个函数&#xff0c;用来判断一颗二叉树是不是对称的。 注意&#xff0c;如果一个二叉树同此二叉树的镜像是同样的&#xff0c;定义其为对称的。 <?php/*class TreeNode{var $val;var $left NULL;var $r…

WPF项目实战视频《一》(主要为WPF基础知识)

1.WPF布局&#xff1a; Grid&#xff0c;stackPanel&#xff0c;wrapPanel&#xff0c;DockPanel&#xff0c;UniformGrid Grid 按行列布局&#xff0c; Grid.ColumnDefinitions列&#xff0c;Grid.RowDefinitions行 Grid.Row“0” Grid.Column“0” stackPanel 默认从上往下排…

Hadoop3:MR程序压测实验

一、环境要求 内存&#xff1a;128G CPU&#xff1a;32C 磁盘&#xff1a;8T 注&#xff1a;一个虚拟机不超过150G磁盘尽量不要执行这段代码 二、案例 1、需求 使用Sort程序评测MapReduce 2、操作步骤 1、使用RandomWriter来产生随机数&#xff0c;每个节点运行10个Map任…

LabVIEW机器学习实现外观检测

介绍如何利用LabVIEW平台结合机器学习技术实现对被测样品的外观检测。详细说明了硬件选择、算法使用、操作步骤以及注意事项。 硬件选择 工业相机&#xff1a;高分辨率工业相机&#xff08;如Basler、FLIR等&#xff09;用于采集样品的图像。 照明设备&#xff1a;均匀的LED照…

C++ 多态:探索对象的动态行为

C 多态&#xff1a;探索对象的动态行为 在C中&#xff0c;多态性是一种强大的特性&#xff0c;它允许我们通过基类指针或引用来调用派生类的方法。多态性不仅增加了程序的灵活性&#xff0c;还使得代码更加易于扩展和维护。本文将深入探讨C中的多态性&#xff0c;包括静态多态&…

代理高并发如何去解决?

代理高并发问题的解决方法涉及多个层面&#xff0c;包括架构设计、资源优化、技术选型等方面。以下是一些具体的解决方案&#xff1a; 1. 架构设计 分布式架构&#xff1a; 微服务架构&#xff1a;将大型应用拆分为多个小型服务&#xff0c;每个服务独立部署、扩展和升级&…

C++:现代软件开发的驱动力与未来展望

随着技术的不断进步和软件工程的日益复杂&#xff0c;C作为一门历史悠久但充满活力的编程语言&#xff0c;在现代软件开发中扮演着越来越重要的角色。本文将探讨C在现代软件开发中的应用现状及其未来发展趋势。 一、现代软件开发中的C 高性能计算&#xff1a;随着大数据、人工…

模型优化—数据增强

一、背景 增加训练数据&#xff0c;肯定能解决过拟合问题&#xff0c;但是数据的获取往往是特别难的。故针对已有数据的数据增强应运而生。 二、数据增强 数据增强是一种生成合成数据的方法&#xff0c;通过调整原来样本来创建新样本&#xff0c;这样就可以获得大量的数据&a…

沪金和伦敦金一致吗?什么因素在作怪?

沪金也就是上海金&#xff0c;是上海黄金交易所推出的一款的黄金投资理财交易品种&#xff0c;其交易特性与国际市场上的伦敦金相类似&#xff0c;二者都是采用双向式杠杆保证金交易。但它们也有不同之处&#xff0c;比如货币和重量的计价单位的差异&#xff0c;伦敦金是用美元…

汽修工厂的安全守护者!防滑耐磨劳保鞋,匠心守护你的每一步

在城市的喧嚣中&#xff0c;有这样一群匠人&#xff0c;他们手持扳手&#xff0c;脚踏油渍&#xff0c;用汗水与智慧守护着机械的脉动——他们就是汽修工人。面对飞溅的油渍、尖锐的金属部件以及不时滑动的地面&#xff0c;汽修工人们需要时刻保持警惕&#xff0c;确保工作安全…

Spring Cloud Eureka快读入门Demo

1.什么是Eureka&#xff1f; Eureka 由 Netflix 开发&#xff0c;是一种基于REST&#xff08;Representational State Transfer&#xff09;的服务&#xff0c;用于定位服务&#xff08;服务注册与发现&#xff09;&#xff0c;以实现中间层服务的负载均衡和故障转移&#xff…

Java小白入门到实战应用教程-开发环境搭建-IDEA2024安装激huo详细教程

writer:eleven 安装IDEA2024 一、下载IDEA 推荐大家去官网下载 我这里也给大家直接准备了安装包&#xff0c;和激huo教程&#xff0c;大家可以自行下载使用。 注意&#xff1a;激huo教程只用于学习交流&#xff0c;不可商用。 IDEA2024安装包及激huo教程 说明&#xff1a…

HarmonyOS NEXT学习——@Builder装饰器自定义构建函数

1.自定义组件内使用 Component //自定义组件修饰器 struct Com{ //自定义组件内使用Build修饰器Builder show(){ Text(Hello World)}build() {this.show() //使用自定义组件内的需要this} }2全局自定义构建函数 如果不涉及组件状态变化&#xff0c;建议使用全局的自定义构建…

HCIE之Qos(十七)

QoS 一、哪些问题会影响网络的数据传输二、QoS服务模型三、IntServ3.1 资源预留的过程分为5步3.2 资源预留方式可分为两类&#xff1a; 四、DiffServ五、分类和标识的方法5.1、二层标记方法5.2、三层标记方法5.2.1 传统的IPP方式 六、拥塞管理&#xff08;队列技术&#xff09…

pytorch-pytorch之LSTM

目录 1. nn.LSTM2. nn.LSTMCell 1. nn.LSTM 初始化函数输入参数与RNN相同&#xff0c;分别是input_size&#xff0c;hidden_size和num_layer foward函数也与RNN类似&#xff0c;只不过返回值除了out外&#xff0c;ht变为(ht,ct) 代码见下图&#xff1a; 2. nn.LSTMCell 初…

【保姆级】Python项目部署到Linux生产环境(uwsgi+python+flask+nginx服务器)

1.安装python 我这里是3.9.5版本 安装依赖&#xff1a; yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make -y 根据自己的需要下载对应的python版本&#xff1a; cd /usr/local wget https://www.python.or…

利用联邦学习和基于自动编码器模型的分布式学习架构

首先&#xff0c;在每个训练回合中&#xff0c;随机选择一个客户子集&#x1d45a; &#x1d45a;&#x1d44e;&#x1d465;(&#x1d436;&#x1d43e;, 1)参加当前回合&#xff0c;使得 C 是被选中参与的客户的比例&#xff1b; 其次&#xff0c;每个客户端接收全局模型…