当前位置:网站首页>Nacos安装指南
Nacos安装指南
2022-06-26 23:09:00 【fate _zore】
Nacos安装指南
1.Windows安装
开发阶段采用单机安装即可。
1.1.下载安装包
在Nacos的GitHub页面,提供有下载链接,可以下载编译好的Nacos服务端或者源代码:
GitHub主页:https://github.com/alibaba/nacos
GitHub的Release下载页:https://github.com/alibaba/nacos/releases
如图:

1.2.解压
将这个包解压到任意非中文目录下,如图:

目录说明:
- bin:启动脚本
- conf:配置文件
1.3.端口配置
Nacos的默认端口是8848,如果你电脑上的其它进程占用了8848端口,请先尝试关闭该进程。
如果无法关闭占用8848端口的进程,也可以进入nacos的conf目录,修改配置文件中的端口:

修改其中的内容:

1.4.启动
启动非常简单,进入bin目录,结构如下:

然后执行命令即可:
windows命令:
startup.cmd -m standalone
执行后的效果如图:

1.5.访问
在浏览器输入地址:http://127.0.0.1:8848/nacos即可:

默认的账号和密码都是nacos,进入后:

2.Linux安装
Linux或者Mac安装方式与Windows类似。
2.1.安装JDK
Nacos依赖于JDK运行,索引Linux上也需要安装JDK才行。
上传jdk安装包:

上传到某个目录,例如:/usr/local/
然后解压缩:
tar -xvf jdk-8u144-linux-x64.tar.gz
然后重命名为java
配置环境变量:
export JAVA_HOME=/usr/local/java
export PATH=$PATH:$JAVA_HOME/bin
设置环境变量:
source /etc/profile
2.2.上传安装包
如图:

上传到Linux服务器的某个目录,例如/usr/local/src目录下:

2.3.解压
命令解压缩安装包:
tar -xvf nacos-server-1.4.1.tar.gz
然后删除安装包:
rm -rf nacos-server-1.4.1.tar.gz
目录中最终样式:

目录内部:

2.4.端口配置
与windows中类似
2.5.启动
在nacos/bin目录中,输入命令启动Nacos:
sh startup.sh -m standalone
3.Nacos的依赖
父工程:
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>2.2.5.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
客户端:
<!-- nacos客户端依赖包 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
边栏推荐
- Operator介绍
- Unity3D插件 AnyPortrait 2D骨骼動畫制作
- [710. random numbers in the blacklist]
- DAST 黑盒漏洞扫描器 第五篇:漏洞扫描引擎与服务能力
- 分享三種在Excel錶格中自動求和的方法
- Typera set title auto numbering
- 您的连接不是私密连接
- 一篇文章带你学会容器逃逸
- Would you like to buy stocks? Where do you open an account in a securities company? The Commission is lower and safer
- What are the preferential activities for stock account opening? Is it safe to open a mobile account?
猜你喜欢

Restfultoolkitx of idea utility plug-in -- restful interface debugging

go中的微服务和容器编排

數據清洗工具flashtext,效率直接提昇了幾十倍數

Openpyxl module

DAST 黑盒漏洞扫描器 第五篇:漏洞扫描引擎与服务能力

300 questions lesson 3 vector group

让敏捷回归本源——读《敏捷整洁之道》有感

邮箱附件钓鱼常用技法

Unityeditor Editor Extension - table function

Unity: the referenced script (unknown) on this behavior is missing“
随机推荐
Learun low code OA system construction platform
typora设置标题自动编号
WordPress collection plug-ins are recommended to be free collection plug-ins
UnityEditor编辑器扩展-表格功能
【混合编程jni 】第六篇之native 中字符串和数组的操作
Raspberry pie preliminary use
How to write test cases and a brief introduction to go unit test tool testify
The processing of private chat function in go language
开放世界机甲游戏-Phantom Galaxies
低佣金免费开户渠道安全吗?
Unity3D插件 AnyPortrait 2D骨骼動畫制作
PHP代码审计系列(一) 基础:方法、思路、流程
L'outil de nettoyage des données flashtext améliore directement l'efficacité de plusieurs dizaines de fois
VB. Net class library to obtain the color under the mouse in the screen (Advanced - 3)
Unity布料系統_Cloth組件(包含動態調用相關)
Weaving dream collection plug-ins are recommended to be free collection plug-ins
VB. Net class library (advanced version - 1)
主从复制系统设计
客户端实现client.go客户端类型定义连接
Crawler and Middleware of go language