使用nacos原始碼部署nacos服務

不忘初心2021發表於2024-06-12

往往有的時候,我們需要對nacos做定製化的服務,這個時候就要使用到原始碼了,

提前需要準備的環境 jdk 1.8, maven 3.9.2

安裝jdk 1.8

sudo yum install java-1.8.0-openjdk-devel

安裝maven

wget http://277s40j742.zicp.vip:2024/upload/2024/06/pbkgnsfqi4iblrnsbit80882n4.gz

tar -zxvf pbkgnsfqi4iblrnsbit80882n4.gz

mv apache-maven-3.9.4 maven

cd maven/conf
vim settings.xml
vim /etc/profile

  

JAVA_HOME=/root/jdk1.8.0_371/bin
MAVEN_HOME=/root/maven/bin
PATH=$PATH:$JAVA_HOME:$MAVEN_HOME
export PATH

  

重新整理配置
source /etc/profile

  

nacos原始碼下載

wget http://277s40j742.zicp.vip:2024/upload/2024/06/u157r2vt42grep29bg38720jm7.zip

  

6  2024-06-11 23:37:38 unzip u157r2vt42grep29bg38720jm7.zip
   47  2024-06-11 23:37:45 cd nacos/bin
   48  2024-06-11 23:37:47 ls
   49  2024-06-11 23:38:03 mv nacos-2.3.2 nacos
   50  2024-06-11 23:38:07 ls
   51  2024-06-11 23:38:09 cd nacos
   52  2024-06-11 23:38:10 ls
   53  2024-06-11 23:38:12 cd bin
   54  2024-06-11 23:38:15 ls
   55  2024-06-11 23:38:21 pwd
   56  2024-06-11 23:38:58 mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U
   57  2024-06-11 23:50:12 ls -al distribution/target/

  

cd /root/nacos/distribution/target/nacos-server-2.3.2/nacos/bin

  單機啟動

sh startup.sh -m standalone

  

相關文章