欢迎关注我的个人微信公众号,公众号中每天发布最新的技术博文
Nacas安装
可以通过下载源码进行编译和下载发行包两种方式来启动Nacos
源码
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
您可以从 最新稳定版本 下载 nacos-server-$version.zip
包。发行包
unzip nacos-server-$version.zip 或者 tar -xvf nacos-server-$version.tar.gz
cd nacos/bin
错误信息如何启动在这里就不做说明了,我们重点说一下通过源码安装时出现的一个编译错误
Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.0.0:single (make-assembly) on project nacos-distribution: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:3.0.0:single failed: group id ‘1326029969’ is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit -> [Help 1]
这个错误主要出现在编译distribution这个目录时出现的,执行命令是mvn -Prelease-nacos clean install -U
,这个错误导致nacos-server-1.2.0-SNAPSHOT生成失败
解决办法
在distribution目录下的pom.xml文件中找到id
为release-nacos
的profile
,在plugin标签的configuration内加上<tarLongFileMode>posix</tarLongFileMode>
即可解决