Win安装Nacos

安装、启动步骤

1.github搜nacos,在alibaba/nacos项目的readme下,点击最新稳定版的跳转页,下载nacos-server的压缩包,然后解压(注:解压的路径不要带中文)

2.进入nacos的文件夹,点击bin目录,win系统选择startup启动项目。

由于启动脚本默认set MODE = "cluster"的集群模式,需要单机则改成set MODE="standalone",或者在执行cmd脚本时加上-m standalone

(启动脚本需要读取%JAVA_HOME的环境变量。有个注意点,若此前没配置JAVA_HOME,配置该环境变量后,cmd读得到环境变量,但是nacos启动脚本读取不到,需要重启下系统)

3.启动成功后,可以看到

4.直接访问http://localhost:8848/或者http://localhost:8848/nacos,默认用户名和密码为nacos/nacos

 

常见报错:

1.缺少vc++ 2015导致如下报错。下载链接:https://www.microsoft.com/zh-CN/download/details.aspx?id=48145

2022-06-29 09:18:04,065 ERROR Startup errors :

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'instanceOperatorClientImpl' defined in URL [jar:file:/D:/java_project/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.1.0.ja
r!/com/alibaba/nacos/naming/core/InstanceOperatorClientImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creati
ng bean with name 'clientOperationServiceProxy' defined in URL [jar:file:/D:/java_project/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.1.0.jar!/com/alibaba/nacos/naming/core/v2/service/ClientOperationServiceProxy.class
]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistentClientOperationServiceImpl' defined in URL [j
ar:file:/D:/java_project/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.1.0.jar!/com/alibaba/nacos/naming/core/v2/service/impl/PersistentClientOperationServiceImpl.class]: Bean instantiation via constructor failed; neste
d exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.l
 

 

IDEA配置启动脚本

主要配置参数如图所示

 

  • 6
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值