当前位置:网站首页>Nacos源码安装
Nacos源码安装
2022-08-09 04:51:00 【wgslucky】
正常情况下,我们可以从nacos的官网跳转到github上下载,但是大多数的时候,国内的网络不能直接访问国外的github,需要翻墙才可以。但是码云(http://www.gitee.com)统一每天从github上面同步nacos的源码,所以我们可以在码云上面更新源码,使用nacos源码安装。
下载源码
在码云上nacos的地址:https://gitee.com/mirrors/Nacos?_from=gitee_search ,然后选择clone地址
git clone https://gitee.com/mirrors/Nacos.git
使用源码打包
mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U
打包成功之后,在distribution\target 目录可以找到安装包:
安装
将安装包nacos-server-2.1.0.tar.gz 上传到服务器(我用的是Linux服务器),然后解压
tar -xvf nacos-server-2.1.0.tar.gz
启动
这里只是为了方便开发,默认选择以单服启动而不是集群启动,集群启动另外再说
startup.sh -m standalone
其它详细的功能,可以参考官网:https://nacos.io/zh-cn/docs/quick-start.html
可能遇到的错误
[root@localhost bin]# ./startup.sh -m standalone
-bash: ./startup.sh: /bin/bash^M: 解释器错误: No such file or directory
这个是因为我是在windows上面打包的,所以生成的startup.sh文件格式是dos的,而linux或unix是不能运行dos格式的文件的,需要进行一下转换:
[root@localhost bin]# dos2unix startup.sh
dos2unix: 正在转换文件 startup.sh 为Unix格式...
这样再次运行就可以了: ./startup.sh -m standalone
边栏推荐
猜你喜欢
随机推荐
LeetCode-从链表中删去总和值为零的连续结点
2022-08-07 反思
ceph create pool, map, delete exercises
【HMS core】【Ads Kit】Huawei Advertising——Overseas applications are tested in China. Official advertisements cannot be displayed
安装pytorch和cuda
杰理之智能充电仓低电发码关机 触摸不开机【篇】
2022-08-08 mysql慢SQL-Q18-10GB数据量-mysql/innodb测试
"IP" command to configure network interface
在快手工作是一种什么体验
B. Arrays Sum
必须指定GDAL API版本。提供一个路径使用GDAL_CONFIG gdal-config环境
JS-DOM-全局、局部、隐式变量,数组()\函数、 prompt输入对话框、confirm(确定用户的决定-弹出对话框)
How to do the stability test, this article thoroughly explains it!
【Harmony OS】【ArkUI】ets开发 图形与动画绘制
[Developers must see] [push kit] Collection of typical problems of push service service 2
The influence law of genes for disease - read the paper
LeetCode - remove consecutive nodes with a sum of zero from a linked list
基于ABP和Magicodes实现Excel导出操作
供应商对接Chewy的EDI需求
关于sys.path.append(‘..‘)失效