C/C++教程

Nacos部署

本文主要是介绍Nacos部署,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

一、单机部署

1.1、环境依赖

  • 64 bit OS,支持 Linux/Unix/Mac/Windows,推荐选用 Linux/Unix/Mac
  • 64 bit JDK 1.8+;
  • Maven 3.2.x+;

1.2、下载

# 版本自己挑: https://github.com/alibaba/nacos/releases
[root@nacos ~]# wget https://github.com/alibaba/nacos/releases/download/2.0.0-bugfix/nacos-server-2.0.0.tar.gz

1.3、部署

[root@nacos ~]# tar -xvf nacos-server-2.0.0.tar.gz -C /app/

1.4、单机启动

[root@nacos ~]# cd /app/nacos/bin/
[root@nacos bin]# sh startup.sh -m standalone

1.5、验证

[root@nacos ~]# tail -f /app/nacos/logs/start.out
2021-08-17 09:16:27,881 INFO Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@ef1695a, org.springframework.security.web.context.SecurityContextPersistenceFilter@b835727, org.springframework.security.web.header.HeaderWriterFilter@10cd6753, org.springframework.security.web.csrf.CsrfFilter@168cd36b, org.springframework.security.web.authentication.logout.LogoutFilter@319c3a25, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2c8662ac, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@77eb5790, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@58860997, org.springframework.security.web.session.SessionManagementFilter@47af099e, org.springframework.security.web.access.ExceptionTranslationFilter@3901f6af]

2021-08-17 09:16:28,210 INFO Initializing ExecutorService 'taskScheduler'

2021-08-17 09:16:28,267 INFO Exposing 16 endpoint(s) beneath base path '/actuator'

2021-08-17 09:16:28,560 INFO Tomcat started on port(s): 8848 (http) with context path '/nacos'

# 端口校验
[root@nacos conf]# ss -ntl  | grep 8848
LISTEN     0      100         :::8848                    :::* 

1.6、页面访问

http://192.168.1.55:8848/nacos/

默认账号密码:nacos/nacos

1.7、关闭

[root@nacos bin]# sh shutdown.sh
The nacosServer(20159) is running...
Send shutdown request to nacosServer(20159) OK

二、集群部署

https://nacos.io/zh-cn/docs/cluster-mode-quick-start.html

这篇关于Nacos部署的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!