1、下载安装
git clone https://gitee.com/mirrors/Nacos.git cd nacos/ # 如果本地没有mvn命令, 或者是编译过程中报错,缺少jdk, 需要全局配置mvn命令, vim ~/.bash_profile # 添加以下命令 export PATH="/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin:$PATH" export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home export PATH=$JAVA_HOME/bin:$PATH:. export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:. # 配置生效 source ~/.bash_profile mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U cd distribution/target/nacos-server-$version/nacos/bin
2、启动
非集群启动 sh startup.sh -m standalone
3、验证
nacos is starting with standalone nacos is starting,you can check the /Users/yaowei/Desktop/work/nacos/distribution/logs/start.out
4、访问
http://127.0.0.1:8848/nacos
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/281614.html