官网地址:https://github.com/alibaba/nacos/releases
解压tar -zxvf nacos
启动Nacos目录到nacos的bin目录下
cd nacos/bin/
后端启动命令
sh startup.sh -m standalone
备注:
1.nacos端口时8848,要访问时记得开通端口防火墙
2.目前使用1.4.1稳定版;如果使用高版本启动会报错会提示classNotFound
启动成功后打开http://localhost:8848/nacos/index.html 输入账号密码即可进入
pom.xml依赖
org.springframework.cloud spring-cloud-starter-alibaba-nacos-discoveryorg.springframework.boot spring-boot-starter-web
备注:添加spring-boot-starter-web,不能是spring-web 不然启动容易报错或者注册不成功
yml配置文件
spring:
cloud:
nacos:
discovery:
server-addr: 192.168.1.117:8848



