【01】微服务系列之 Nacos 安装部署

微服务系列之 Nacos 安装部署

前言

Nacos 版本:2.3.2

JDK 版本:jdk1.8.0_131

Linux 操作系统版本:Red Hat Enterprise Linux Server 7.5 (Maipo)

部署

下载

Nacos 资源从官网 https://nacos.io/docs/

或者直接访问下载地址

解压文件

将资源下载到服务的 /soft 文件夹中,然后进行解压到 /u01/app/ 文件夹中。

shell 复制代码
# 创建文件夹
mkdir /soft
mkdir -p /u01/app

# 将文件上传到 /soft 文件夹中

# 将压缩包解压至 /u01/app 文件夹中 
unzip /soft/nacos-server-2.3.2.zip -d /u01/app/
 
  • 参考日志
shell 复制代码
[root@wgqdevun01 soft]# unzip /soft/nacos-server-2.3.2.zip -d /u01/app/
Archive:  /soft/nacos-server-2.3.2.zip
   creating: /u01/app/nacos/
   creating: /u01/app/nacos/target/
   creating: /u01/app/nacos/conf/
   creating: /u01/app/nacos/bin/
  inflating: /u01/app/nacos/LICENSE  
  inflating: /u01/app/nacos/bin/startup.sh  
  inflating: /u01/app/nacos/NOTICE   
  inflating: /u01/app/nacos/conf/application.properties  
  inflating: /u01/app/nacos/target/nacos-server.jar  
  inflating: /u01/app/nacos/conf/announcement_zh-CN.conf  
  inflating: /u01/app/nacos/bin/shutdown.cmd  
  inflating: /u01/app/nacos/conf/1.4.0-ipv6_support-update.sql  
  inflating: /u01/app/nacos/bin/shutdown.sh  
  inflating: /u01/app/nacos/conf/derby-schema.sql  
  inflating: /u01/app/nacos/bin/startup.cmd  
  inflating: /u01/app/nacos/conf/application.properties.example  
  inflating: /u01/app/nacos/conf/nacos-logback.xml  
  inflating: /u01/app/nacos/conf/mysql-schema.sql  
  inflating: /u01/app/nacos/conf/console-guide.conf  
  inflating: /u01/app/nacos/conf/cluster.conf.example  
  inflating: /u01/app/nacos/conf/announcement_en-US.conf  
[root@wgqdevun01 soft]# 

启动 nacos

shell 复制代码
# 进入到解压后的目录中,执行启动命令.
cd /u01/app/nacos/bin
nohup sh startup.sh -m standalone & 
  • 参考日志:
shell 复制代码
[root@wgqdevun01 bin]# pwd
/u01/app/nacos/bin
[root@wgqdevun01 bin]# 
[root@wgqdevun01 bin]# nohup sh startup.sh -m standalone & 
[1] 11038
[root@wgqdevun01 bin]# nohup: ignoring input and appending output to 'nohup.out'

[1]+  Done                    nohup sh startup.sh -m standalone
[root@wgqdevun01 bin]# 

验证

  • 检查进程&默认端口(8848)是否存在
shell 复制代码
ps -ef | grep nacos
netstat -lnptu | grep -i 8848

参考日志:

shell 复制代码
[root@wgqdevun01 bin]# ps -ef | grep nacos
root      11058      1 10 04:55 pts/0    00:00:20 /usr/jdk1.8.0_131/bin/java -Djava.ext.dirs=/usr/jdk1.8.0_131/jre/lib/ext:/usr/jdk1.8.0_131/lib/ext -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -Xloggc:/u01/app/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/u01/app/nacos/plugins,/u01/app/nacos/plugins/health,/u01/app/nacos/plugins/cmdb,/u01/app/nacos/plugins/selector -Dnacos.home=/u01/app/nacos -jar /u01/app/nacos/target/nacos-server.jar --spring.config.additional-location=file:/u01/app/nacos/conf/ --logging.config=/u01/app/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288 nacos.nacos
root      11451   3565  0 04:58 pts/0    00:00:00 grep --color=auto nacos
[root@wgqdevun01 bin]# 
[root@wgqdevun01 bin]# 
[root@wgqdevun01 bin]# netstat -lnptu | grep -i 8848
tcp6       0      0 :::8848                 :::*                    LISTEN      11058/java          
[root@wgqdevun01 bin]# 

若有转载,请标明出处:https://blog.csdn.net/CharlesYuangc/article/details/157516746

相关推荐
万点科技码农4 小时前
MCP+A2A协议与AI原生架构:软件定制开发新标准下的西安服务商实力解析
架构·ai-native
dogstarhuang6 小时前
从 0 到 1 搭建可收费的 API 开放平台(实战)
java·架构·api
GIoT80106 小时前
自动化请求的智能重试策略:指数退避 + 熔断 + IP 轮换
架构
阿里云云原生6 小时前
阿里云 AgentTeams 7月第二周产品动态
云原生
葬送的代码人生6 小时前
从 Vue 到 React:Tailwind CSS 布局 + BFF 代理实战
前端·react.js·架构
VortMall6 小时前
『平台去经营化』平台治理能力全新重构|VortMall微服务商城系统v1.3.10
java·大数据·微服务·商城系统·开源商城·vortmall·去经营化
Wang's Blog7 小时前
Go-Zero项目开发9: 微服务治理之服务注册中心
微服务·golang
hunterandroid7 小时前
[鸿蒙从零到一] ArkUI 组件化实战:构建可复用、可组合的自定义组件
前端·华为·架构
CodexDave10 小时前
数据库连接池耗尽:排查顺序与三层兜底
服务器·前端·数据库·git·云原生·容器·kubernetes
luyingying10 小时前
我的AI NPC差点失声:多平台容错路由的完整踩坑记录
架构