The article directories
-
- preface
- plan
-
- 1. Select the corresponding source code to download
-
- 1.1 Click 1, 2 and 3 in sequence to select our latest stable version 1.4.0
- 1.2 Click to download ZIP or Clone
- 2. Local compilation
-
- 2.1 Preparing the environment
- 2.2 Decompression and Compilation
- 3. Enable the authentication
-
- 3.1 unzip
- 3.2 Starting the Server
- 3.3 Log in to the NacOS service console for verification
preface
Nacos GitHub address: Portal, due to various known reasons (force majeure), download speed is too slow in the country, record and share the solution.
Overall idea: the use of Gitee on the mirror portal download source code for compilation
Here is a zip package I compiled for you to download
Follow my official account [Interviewer of Java Factory], reply:nacosYou can download
plan
1. Select the corresponding source code to download
The current stable version is 1.4.0, and the nacOS address on Gitee is as follows:
1.1 Click 1, 2 and 3 in sequence to select our latest stable version 1.4.0
1.2 Click to download ZIP or Clone
Note: Select the version you want, as shown in figure 1.4.0
2. Local compilation
2.1 Preparing the environment
If the JDK or Maven environment is available, skip this step
Nacos relies on the Java environment to run. If you build and run Nacos from code and need to configure the Maven environment for this, make sure you install it in one of the following versions:
- The 64-bit OS supports Linux, Unix, Mac, and Windows. Linux, Unix, and Mac are recommended.
- 64-bit JDK 1.8+; Download & Configure.
- Maven 3.2 x +; Download & Configure.
2.2 Decompression and Compilation
- 1. Decompress the downloaded package as shown in the following figure:
- 2. To enter
Nacos
Folder to compile
The command is as follows:
mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U
Copy the code
- 3. The compilation result is as follows
The compilation process is very slow, please wait patiently, the end of the article will also give you a compiled direct download, hand party necessary
Here you can see that it has compiled successfully and that the location of the package has been printed.
3. Enable the authentication
3.1 unzip
Copy the above nacos-server.zip to the server for validation.
unzip nacos-server-$versionZip or tar -xvf nacos-server-$version.tar.gz
cd nacos/bin
Copy the code
3.2 Starting the Server
- Linux/Unix/Mac startup command (standalone stands for standalone mode, not cluster mode):
sh startup.sh -m standalone
Copy the code
If you are using Ubuntu, or if you run the script, an error message [[symbol cannot be found, try the following:
bash startup.sh -m standalone
Copy the code
- Windows startup command (standalone stands for standalone mode, not cluster mode):
cmd startup.cmd -m standalone
Copy the code
3.3 Log in to the NacOS service console for verification
Type in your browser:http://ip:8848/nacos
The default username and password are:nacos/nacos
Reference:
Contents of this series
- An overview of the Spring Cloud microservices series of articles, which will be updated in real time