Nacos installation

Now the market popular configuration has four kinds, Spring cloud config, Apollo, Nacos, Disconf.

Currently Disconf been a long time not updated, it does not compare, the other three are the most comprehensive of Apollo, the best performance QPS is Nacos, Spring cloud config due to the dependence github lead to QPS very low.

Nacos profile:

Nacos is Ali's open source product, for micro-services architecture service discovery, configuration management, service management integrated solutions. Official website address is: https: //nacos.io

Nacos provides the following features:

1. Service Discovery and Service Health Check:

     Nacos make the service easier to register and open DNS or HTTP interface found in other services, Nacos open provides real-time health checks to prevent unhealthy send a request to the host or service instance.

2. Dynamic Configuration Management:

    Dynamic configuration service allows centralized configuration and dynamic management of all services in all environments. Nacos eliminates the changes and then redeploy the application update when the configuration, which makes the configuration more efficient and flexible.

3. Dynamic DNS service:

   Nacos service discovery capability based on the DNS protocol is designed to support heterogeneous language service discovery, support will be registered on Nacos service endpoints exposed as a distinguished name, let party applications easy access and discovery.

4. Service and metadata management:

 Nacos gives you all the services and metadata perspective of micro-managing data center from a service platform, including a description of management services, lifecycle services rely on static analysis, state health services, traffic management services, routing and security policy .

 

Nacos installation:

1. Preparing the environment:

Nacos java environment-dependent operation requires 64-bit system, the JDK than 1.8, Maven 3.2.x above.

2. Download the source code or install the package:

Method one: download from Github. 

       git clone https://github.com/alibaba/nacos.git

    nacos cd /

    mvn -Prelease-nacos clean install -U

    ls -al distribution/target/

    cd distribution/target/nacos-sercer-$version/nacos/bin

Method 2: Download compiled archive mode. 

    Download: https: //github.com/alibaba/nacos/releases

    Download after decompression:

     unzip nacos-sercer-$version.zip 或者 tar -xvf nacos-server-$version.tar.gz

     cd nacos / bin

Nacos stand-alone mode is activated:

    Nacos default port is 8848, linux, Unix, Mac's startup mode:

      sh startup.sh -m standalone

    ubuntu system:

      bashstartup.sh -m standalone

      Windows Start:

      Double-click the bin directory startup.cmd

      After a successful start, can be accessed through a browser http: // ip: 8848 / nacos open console page

      The default account is nacos, password nacos

 

Nacos Testing after installation was successful:

      After starting nacos success, http api authentication service provided by nacos is normal.

      Recommended curl tool to test nacos the api, curl is a command-line tool used in the development, testing can be used as HTTP protocol.

      Download: https: //curl.haxx.se/windows/

      Once downloaded into the next bin directory, open cmd test

      1. Publish configuration:

      curl -X POST "http://$ip:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test&content=TestNacos" 

      2. Get Configuration:

      curl -X GET "http://$ip:8848/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test"

Guess you like

Origin www.cnblogs.com/lpk627/p/12514295.html