Spring Cloud Alibaba study notes (2) - Nacos Configuration

1. What is Nacos

  Nacos official website of this issue are described in detail, it is popular:

  Nacos is a service discovery component, but also a configuration server, it solves two problems:

    1. A service how to find the service B

    2. micro-manage configuration services

2. build Nacos Server

2.1 Environment Preparation

  Nacos rely java runtime environment, build Nacos Server, you need to configure maven environment, build environment requirements are as follows:

    1,64 bit OS, support for Linux / Unix / Mac / Windows, recommended use Linux / Unix / Mac
    2,64 bit the JDK 1.8+
    3, Maven 3.2.x +

2.2 server acquisition

  Nacos provides two ways to obtain a server Nacos:

    1, download the source code compilation

    2, download the Release Package

2.2.1 compiler source code download

  In the address you need to install, do: git clone https://github.com/alibaba/nacos.git

  After the source code is downloaded to the local, enter the source directory: cd nacos

    

   Execute the command: mvn -Prelease-nacos clean install -U

    

  Start entering the command: cd distribution / target / nacos-server-1.1.3 / nacos / bin /

Download Release 2.2.2 package

  From this Web site to download nacos-server- $ version.zip package, uncompress command execution: the unzip-Server- nacos $ version.zip -xvf nacos-Server- or tar $ version.tar.gz
  enter command page: cd nacos / bin

2.3 Start the server

  Lunix system:

    Start command (standalone represents stand-alone mode, non-clustered mode):
      SH startup.sh -m Standalone


    If you are using ubuntu system, or running a script error prompt [[symbol not found, try to run as follows:
      bash startup.sh -m Standalone

 

  Windows System:

    Start command:
      cmd startup.cmd

    or double-click the file to run startup.cmd

  After a successful start

    

   Point your browser to: http: //127.0.0.1: 8848 / nacos, enter nacos visual control page, the default account password nacos.

    

   

  PS: For the Client version Nacos Nacos Server version of the corresponding question:

    Nacos Client application integration and thus Nacos Server communication, we use what Nacos Client version by looking at the spring-cloud-alibaba-dependencies file, download the same version of Nacos Server version.

    

 

    Nacos Client version I can see the current version of the Spring Cloud Alibaba used is 1.1.1, due nacos not provide nacos server1.1.1 version of the package, so I'll use nacos server1.1.3.

 

 

 

Guess you like

Origin www.cnblogs.com/fx-blog/p/11685062.html