Spring Cloud Alibaba Nacos(二):启动Nacos Server

本文档介绍了在不同操作系统上启动Nacos服务器的步骤,包括环境要求和启动命令。推荐使用64位JDK1.8+和Linux/Unix/Mac系统。启动Nacos可以通过下载编译后的压缩包,然后在bin目录下执行相应的启动脚本。启动成功后,访问http://localhost:8848/nacos/可看到管理页面。

1、环境要求

Nacos依赖Java环境来运行。

  1. 64 bit OS,支持 Linux/Unix/Mac/Windows,推荐选用 Linux/Unix/Mac。
  2. 64 bit JDK 1.8+

如果是从代码开始构建并运行Nacos,还需要为此配置 Maven环境,请确保是在以下版本环境中安装使用: Maven 3.2.x+

2、启动Nacos Server

有以下两种方式来获取Nacos:

  • 从Github上下载源码方式
  • 下载编译后压缩包方式

如果选择从Github上下载源码方式,请参照官网介绍:https://nacos.io/zh-cn/docs/quick-start.html

我们选择下载编译后压缩包方式,地址https://github.com/alibaba/nacos/releases,目前最新版本:1.4.0

解压后,进入到bin目录,执行启动命令

Linux/Unix/Mac
启动命令(standalone代表着单机模式运行,非集群模式):

sh startup.sh -m standalone

如果您使用的是ubuntu系统,或者运行脚本报错提示[[符号找不到,可尝试如下运行:

bash startup.sh -m standalone

Windows
启动命令(standalone代表着单机模式运行,非集群模式):

cmd startup.cmd -m standalone

3、启动成功

# 查看启动日志
tail -f /nacos/logs/start.out

如果出现以下日志,即代表启动成功:

xinxizhongxin-lijin:logs lijin$ tail -f start.out
:   |   \ | :  ,--.--.     ,---.  /   /   | /  /    '   Pid: 12632
|   : '  '; | /       \   /     \.   ; ,. :|  :  /`./   Console: http://192.168.31.218:8848/nacos/index.html
'   ' ;.    ;.--.  .-. | /    / ''   | |: :|  :  ;_
|   | | \   | \__\/: . ..    ' / '   | .; : \  \    `.      https://nacos.io
'   : |  ; .' ," .--.; |'   ; :__|   :    |  `----.   \
|   | '`--'  /  /  ,.  |'   | '.'|\   \  /  /  /`--'  /
'   : |     ;  :   .'   \   :    : `----'  '--'.     /
;   |.'     |  ,     .-./\   \  /            `--'---'
'---'        `--`---'     `----'

2020-11-15 11:58:12,031 INFO Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@21129f1f' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-11-15 11:58:12,038 INFO Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-11-15 11:58:12,538 INFO Tomcat initialized with port(s): 8848 (http)

2020-11-15 11:58:12,993 INFO Root WebApplicationContext: initialization completed in 4018 ms

2020-11-15 11:58:17,224 INFO Initializing ExecutorService 'applicationTaskExecutor'

2020-11-15 11:58:17,399 INFO Adding welcome page: class path resource [static/index.html]

2020-11-15 11:58:18,045 INFO Creating filter chain: Ant [pattern='/**'], []

2020-11-15 11:58:18,099 INFO Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@160c3ec1, org.springframework.security.web.context.SecurityContextPersistenceFilter@3a7b503d, org.springframework.security.web.header.HeaderWriterFilter@3c8bdd5b, org.springframework.security.web.csrf.CsrfFilter@54e7391d, org.springframework.security.web.authentication.logout.LogoutFilter@475b7792, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@62c5bbdc, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@88d6f9b, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@182b435b, org.springframework.security.web.session.SessionManagementFilter@40e4ea87, org.springframework.security.web.access.ExceptionTranslationFilter@255990cc]

2020-11-15 11:58:18,248 INFO Initializing ExecutorService 'taskScheduler'

2020-11-15 11:58:18,278 INFO Exposing 2 endpoint(s) beneath base path '/actuator'

2020-11-15 11:58:18,428 INFO Tomcat started on port(s): 8848 (http) with context path '/nacos'

启动成功后,访问http://localhost:8848/nacos/
即可看到管理页面
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值