惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Vulnerabilities – Threatpost
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
MyScale Blog
MyScale Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Cloudflare Blog
美团技术团队
Recorded Future
Recorded Future
T
Tailwind CSS Blog
Latest news
Latest news
Security Archives - TechRepublic
Security Archives - TechRepublic
Security Latest
Security Latest
Know Your Adversary
Know Your Adversary
Cloudbric
Cloudbric
Schneier on Security
Schneier on Security
I
Intezer
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
云风的 BLOG
云风的 BLOG
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Attack and Defense Labs
Attack and Defense Labs
人人都是产品经理
人人都是产品经理
L
LangChain Blog
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
博客园 - 叶小钗
L
Lohrmann on Cybersecurity
S
SegmentFault 最新的问题
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
SecWiki News
SecWiki News
V2EX - 技术
V2EX - 技术
IT之家
IT之家
Cyberwarzone
Cyberwarzone
F
Full Disclosure
Spread Privacy
Spread Privacy
阮一峰的网络日志
阮一峰的网络日志

博客园 - 人生为卒

HBuilderX使用Android Studio 离线打包 CAD缺失字体如何处理 Excel 快速拖动公式的方法 微信小程序隐私审核 微信小程序创建流程 mysql 查询数据库的所有表格字段 CAD二次开发入门:WPF类库 Excel 根据单元格值设置行颜色 cmd安装Windows服务 log4.config MySq 表内存占用情况 C# 检测并重启windows服务,IIS应用池 redis 服务安装 Windows系统下本地MQTT服务器搭建,及开机自启 Navicat设置备份文件存储路径 Windows自动录屏功能 spring中常用注解 解决不能访问GitHub的问题 Java 打包到部署子工程出错 Java-Maven基础
Windows系统 nacos 部署
人生为卒 · 2023-11-18 · via 博客园 - 人生为卒

转载:https://www.cnblogs.com/simon-xie/p/15730368.html   Windows系统 

Nacos安装及部署

一、下载地址

https://github.com/alibaba/nacos

二、新建数据库

新建一个实例名为nacos的数据库,并执行nacos/conf下的nacos-mysql.sql文件创建表

三、修改配置

打开conf下的application.properties文件,

修改ip和port:

nacos.inetutils.ip-address=192.168.1.199
server.port=8848
#*************** Spring Boot Related Configurations ***************#
### Default web context path:
server.servlet.contextPath=/nacos
### Include message field
server.error.include-message=ALWAYS
### Default web server port:
server.port=8848 

#*************** Network Related Configurations ***************#
### If prefer hostname over ip for Nacos server addresses in cluster.conf:
# nacos.inetutils.prefer-hostname-over-ip=false

### Specify local server's IP:
nacos.inetutils.ip-address=192.168.1.199

修改数据库连接

 db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
 db.user.0=root
 db.password.0=root

四、单机模式

1、直接修改配置文件

打开bin/startup.cmd 文件,将MODE从cluster改为 standalone,如下:

 2、执行startup.cmd时追加standalone参数: ./startup.sh -m standalone &

五、将Nacos加入windows服务

1、从https://github.com/winsw/winsw/releases下载 WINSW.NET4.exe 和 sample-minimal.xml

2、把WINSW.NET4.exe 和 sample-minimal.xml的名字修改为相同的名字并放到nacos的bin目录下,如nacosService.exe和nacosService.xml

3、配置修改名称后的sample-minimal.xml

复制代码

1 <service>
2   <id>nacos-id-000001</id>
3   <name>Nacos</name>
4   <description>Nacos2</description>
5   <executable>%BASE%\startup.cmd</executable>
6   <arguments>-m standalone</arguments>
7   <logpath>%BASE%\serviceLogs</logpath>
8 </service>

复制代码

4、bin目录下:安装和卸载服务

 .\nacosService.exe install    生成windows服务
 nacosService.exe uninstall    卸载windows服务

六、访问Nacos

访问http://localhost:8848/nacos/index.html,用户名和口令均为nacos

要修改nacos默认的登陆密码,可以进入mysql数据库,打开users表进行新用户的添加,密码采用的是BCrypt加密,把加密后的密码存到数据库中即可。

Bcrypt密码在线生成计算器 http://www.ab126.com/goju/10822.html

添加后要重启Nacos服务