Nacos installation tutorial (the most detailed nanny-level tutorial in history)

Author: Junior Dog
Column: SpringCloud
insert image description here

foreword

   The full name of Nacos is Dynamic Naming and Configuration Service. Na is naming/nameServer, which is the registration center, co is configuration, which is the registration center, and service means that the registration/configuration center is service-centric.

  Nacos is dedicated to helping you discover, configure and manage microservices. Nacos provides a set of easy-to-use feature sets to help you quickly realize dynamic service discovery, service configuration, service metadata, and traffic management.

  This article will introduce the installation and use of Nacos in detail.

Official website: https://nacos.io/zh-cn/

insert image description here


1. Download the installation package

On the GitHub page of Nacos, there is a download link to download the compiled Nacos server or source code:

GitHub homepage: https://github.com/alibaba/nacos

Release download page of GitHub: https://github.com/alibaba/nacos/releases

As shown in the picture:
insert image description here

2. Unzip

Unzip this package to any non-Chinese directory, as shown in the figure:
insert image description here
directory description:

  • bin: startup script
  • conf: configuration file

3. Port configuration

The default port of Nacos is 8848. If other processes on your computer occupy port 8848, please try to close the process first.

If you cannot close the process occupying port 8848, you can also enter the conf directory of nacos and modify the port in the configuration file:
insert image description here

Modify the content to other ports:

insert image description here

4. Start

The startup is very simple, enter the bin directory, the structure is as follows:
insert image description here
Then cmd enters the directory and executes the command:

startup.cmd -m standalone

The effect after execution is as follows:

insert image description here

5. Access

Enter the address in the browser: http://127.0.0.1:8848/nacos to access.

as the picture shows:

insert image description here
The default account and password are nacos, enter the account and password to log in to the page.

as the picture shows:

insert image description here

6. Nacos dependency

Parent project:

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-alibaba-dependencies</artifactId>
    <version>2.2.5.RELEASE</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

client:

<!-- nacos客户端依赖包 -->
<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>

7. Overview

  • Nacos /nɑ:kəʊs/ is the acronym for Dynamic Naming and Configuration Service, a dynamic service discovery, configuration management and service management platform that is easier to build cloud-native applications.

  • Nacos is dedicated to helping you discover, configure and manage microservices. Nacos provides a set of easy-to-use feature sets to help you quickly realize dynamic service discovery, service configuration, service metadata, and traffic management.

  • Nacos helps you build, deliver and manage microservice platforms more agilely and easily. Nacos is a service infrastructure for building a "service"-centric modern application architecture (such as microservice paradigm, cloud native paradigm).

  • Nacos provides real-time health checks on services, preventing requests from being sent to unhealthy hosts or service instances. Nacos supports transport layer (PING or TCP) and application layer (such as HTTP, MySQL, user-defined) health checks. For the health check of services in complex cloud environments and network topology environments (such as VPC, edge network, etc.), Nacos provides two health check modes: agent reporting mode and server active detection. Nacos also provides a unified health check dashboard to help you manage service availability and traffic based on health status.

8. Ecology

  Use Nacos to simplify service discovery, configuration management, service governance and management solutions, making it easier to discover, manage, share and combine microservices.

insert image description here

Summarize

  The above are all the steps to install Nacos under Windows, for reference only, if you have any questions, please leave a message for Q&A. This is all about the Nacos installation tutorial. If you have any ideas, please tell me in the comment area to discuss together!

Guess you like

Origin blog.csdn.net/qq_53463544/article/details/126522836