【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

相关推荐
Dr.kangder1 小时前
嵌入式处理器架构解析(十)——DSP+FPGA
fpga开发·架构·嵌入式
ltl7 小时前
高可用设计模式:冗余、故障转移与仲裁
架构
Dawson Zhu9 小时前
基于Palantir Foundry构建半导体制造AI友好型数据中台:从良率分析场景谈起
人工智能·语言模型·架构·制造·agi
2401_8432537014 小时前
Agent消息降级矩阵:当告警卡片遇到纯文本SMS渠道
架构
奈斯先生Vector15 小时前
AI 辅助线上排障工作台:从故障证据、Codex 协作到可回放修复
人工智能·架构·开源·aigc·midjourney
代码方舟15 小时前
零信任架构实战:基于天远柠檬查出险-登记证API构建自动化车辆履约评估网关
人工智能·python·架构·自动化
程序员讲BPM工作流15 小时前
基于Petri网建模原理:原生自研信创BPM流程引擎工作流模式架构解析
架构
明源云15 小时前
租赁管理系统软件推荐:如何选到真正好用的不动产租赁管理软件
大数据·人工智能·架构
云川之下16 小时前
【k8s】NAD(NetworkAttachmentDefinition)与SR‑IOV‑Operator 关系
云原生·容器·kubernetes
头茬韭菜16 小时前
第 2 篇:「Fluss 架构深入」—— CoordinatorServer、TabletServer 与存储引擎
架构·fluss