Preparatory environment ready
Nacos rely on Java environment to run. If you're building from the beginning of the code and run Nacos, also need to do this to configure Maven environment, make sure that is installed in the following version environment:
- 64 bit OS, support for Linux / Unix / Mac / Windows, recommended use Linux / Unix / Mac.
- 64 bit JDK 1.8+; & downloaded configuration.
- Maven 3.2.x +; & downloaded configuration.
1, an installation package, or download the source code
Download the source code from Github way
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
After downloading the archive compiled mode
You can choose from the latest stable version of the download nacos-server-$version.zip
package.
unzip nacos-server-$version.zip 或者 tar -xvf nacos-server-$version.tar.gz
cd nacos/bin
2, start the service
Linux/Unix/Mac
Start command (standalone represents stand-alone mode, non-clustered mode):
sh startup.sh -m standalone
Windows
Start command:
startup.cmd -m standalone
Startup.cmd run or double-click the file.
This good example by github download version 0.7 extract to the disc you are happy to open the unpacked directory, enter / bin
Startup.cmd can double-click or cmd to this path using the command [-m startup.cmd standalone] execute (command execution recommended in standalone mode, there is explained a subsequent article)
After displaying some output information in cmd window and run successfully
We open the browser to access: http://127.0.0.1:8848/nacos/ to enter the service management page Nacos, the default English, can be switched to Chinese
At this point of our Nacos Server running on build success it!
Nacos Server default port is 8848, we can also be modified: Open the extracted directory /conf/application.properties, we can then start to modify server.port Nacos Server:
# spring
server.contextPath=/nacos
server.servlet.contextPath=/nacos
server.port=8848