Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to build the nacos registry of Spring CloudAlibaba

Shulou Source: shulou.com Published: 2022-06-02 04:23:40 10月04日 Update

This article shows you how to build Spring Cloud Alibaba's nacos registry, which is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

What is Nacos?

Nacos mainly plays two roles: one is the registry, the other is the configuration center. The following figure is the functional structure diagram of nacos

Operation environment

JDK 1.8 +

Maven 3.2.x +

download

You can get Nacos through both source code and distribution packages.

Download address of nacos distribution package select version to decompress

Unzip nacos-server-$version.zip or tar-xvf nacos-server-$version.tar.gz cd nacos/bin

Github download address

Git clone https://github.com/alibaba/nacos.git cd nacos/ mvn-Prelease-nacos clean install-U ls-al distribution/target/ change the $version to your actual path cd distribution/target/nacos-server-$version/nacos/bin

Start the service Linux/Unix/Mac

Start command (standalone stands for stand-alone mode, non-cluster mode):

Sh startup.sh-m standalone

If you are using a ubuntu system, or running the footer error prompt [[symbol not found, try running as follows: bash startup.sh-m standalone "

Windows

Start the command:

Cmd startup.cmd

Or double-click startup.cmd to run the file.

Run access

Entering IP:8848/nacos in the browser automatically jumps to the login login page. The service path of the nacos/nacos screenshot with the default password is the address of the blogger's own Aliyun. Due on November 19th, you can use it free of charge.

Shut down the server

Linux/Unix/Mac

Sh shutdown.sh

Windows

Cmd shutdown.cmd

Or double-click shutdown.cmd to run the file.

The above is the way provided by the official website documentation.

If you can use docker, here is how to deploy and publish docker

Download docker project git clone-- depth 1 https://github.com/nacos-group/nacos-docker.gitcd nacos-docker from Github

Standalone Derby

Docker-compose-f example/standalone-derby.yaml up

Standalone Mysql

Docker-compose-f example/standalone-mysql.yaml up

Cluster

Docker-compose-f example/cluster-hostname.yaml up

The startup effect of docker is the same. After startup, use the docker ps command to view

The above content is how to build the nacos registry of Spring Cloud Alibaba. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Operation mode command address service content skill file mode knowledge release concise concise up and down representative function function stand-alone can pass password Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Docker OPPO Reno Shulou Technology Xiaomi