nacos之springboot

   本地操作系统:ubuntu18,我使用docker的方式启动nacos服务

docker image方式启动nacos

    在docker hub上可以搜到nacos-server

 

    List-1.1 拉去最新的版本

mjduan@mjduan-ubuntu:/opt/software$ docker pull nacos/nacos-server
Using default tag: latest
latest: Pulling from nacos/nacos-server
7dc0dca2b151: Pull complete 
a46f26868cab: Pull complete 
58b2bce5f680: Pull complete 
506f1b119cf6: Pull complete 
3da2026c16ad: Pull complete 
22d13405f5c0: Pull complete 
a5b6fe7ac72b: Pull complete 
df8f86d655e4: Pull complete 
Digest: sha256:59d40cfe7fd6c9db209faeff27352c7600b887755bcdafcea5e668b2335ec540
Status: Downloaded newer image for nacos/nacos-server:latest

    List-1.2 映射出端口8848,指定mode为standalone,即单机模式

mjduan@mjduan-ubuntu:/opt/software$ docker run -i -p 8848:8848 -e MODE=standalone --name nacos nacos/nacos-server:latest 
......

         ,--.
       ,--.'|
   ,--,:  : |                                           Nacos 0.9.0
,`--.'`|  ' :                       ,---.               Running in stand alone mode, All function modules
|   :  :  | |                      '   ,'\   .--.--.    Port: 8848
:   |   \ | :  ,--.--.     ,---.  /   /   | /  /    '   Pid: 25
|   : '  '; | /       \   /     \.   ; ,. :|  :  /`./   Console: http://172.172.172.2:8848/nacos/index.html
'   ' ;.    ;.--.  .-. | /    / ''   | |: :|  :  ;_
|   | | \   | \__\/: . ..    ' / '   | .; : \  \    `.      https://nacos.io
'   : |  ; .' ," .--.; |'   ; :__|   :    |  `----.   \
|   | '`--'  /  /  ,.  |'   | '.'|\   \  /  /  /`--'  /
'   : |     ;  :   .'   \   :    : `----'  '--'.     /
;   |.'     |  ,     .-./\   \  /            `--'---'
'---'        `--`---'     `----'


......

    之后在浏览器中输入http://localhost:8848/nacos,提示输入账号密码,nacos/nacos,就登录控制台界面了。

配置更新、服务发现

    参考官网,因为要描述清楚还要很多文字描述,参考官网,官网描述详细。

 

Reference

  1. https://nacos.io/zh-cn/docs/quick-start-spring-boot.html

转载于:https://my.oschina.net/u/2518341/blog/3027015

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值