[nacos2.2.3 支持jdk17吗? - SegmentFault 思否](https://segmentfault.com/q/1010000044179850)
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0/bin$ java
找不到命令 “java”,但可以通过以下软件包安装它:
sudo apt install default-jre # version 2:1.17-74, or
sudo apt install openjdk-17-jre-headless # version 17.0.9~6ea-1
sudo apt install openjdk-11-jre-headless # version 11.0.20+8-1ubuntu1
sudo apt install openjdk-19-jre-headless # version 19.0.2+7-4
sudo apt install openjdk-20-jre-headless # version 20.0.2+9-1
sudo apt install openjdk-21-jre-headless # version 21+35-1
sudo apt install openjdk-22-jre-headless # version 22~16ea-1
sudo apt install openjdk-8-jre-headless # version 8u382-ga-1ubuntu1
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0/bin$ sudo apt install openjdk-22-jre-headless
[sudo] renguoqiang 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
将会同时安装下列软件:
ca-certificates-java java-common
建议安装:
default-jre fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei
下列【新】软件包将被安装:
ca-certificates-java java-common openjdk-22-jre-headless
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 166 个软件包未被升级。
需要下载 45.6 MB 的归档。
解压缩后会消耗 197 MB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 https://mirror.bjtu.edu.cn/ubuntu mantic/main amd64 ca-certificates-java all 20230710 [11.8 kB]
获取:2 https://mirror.bjtu.edu.cn/ubuntu mantic/main amd64 java-common all 0.74 [6,350 B]
获取:3 https://mirror.bjtu.edu.cn/ubuntu mantic/universe amd64 openjdk-22-jre-headless amd64 22~16ea-1 [45.6 MB]
已下载 45.6 MB,耗时 8分 53秒 (85.7 kB/s)
正在选中未选择的软件包 ca-certificates-java。
(正在读取数据库 ... 系统当前共安装有 200941 个文件和目录。)
准备解压 .../ca-certificates-java_20230710_all.deb ...
正在解压 ca-certificates-java (20230710) ...
正在选中未选择的软件包 java-common。
准备解压 .../java-common_0.74_all.deb ...
正在解压 java-common (0.74) ...
正在选中未选择的软件包 openjdk-22-jre-headless:amd64。
准备解压 .../openjdk-22-jre-headless_22~16ea-1_amd64.deb ...
正在解压 openjdk-22-jre-headless:amd64 (22~16ea-1) ...
正在设置 java-common (0.74) ...
正在设置 ca-certificates-java (20230710) ...
No JRE found. Skipping Java certificates setup.
正在设置 openjdk-22-jre-headless:amd64 (22~16ea-1) ...
update-alternatives: 使用 /usr/lib/jvm/java-22-openjdk-amd64/bin/java 来在自动模式中提供 /usr/bin/java (java)
update-alternatives: 使用 /usr/lib/jvm/java-22-openjdk-amd64/bin/jpackage 来在自动模式中提供 /usr/bin/jpackage (jpackage)
update-alternatives: 使用 /usr/lib/jvm/java-22-openjdk-amd64/bin/keytool 来在自动模式中提供 /usr/bin/keytool (keytool)
update-alternatives: 使用 /usr/lib/jvm/java-22-openjdk-amd64/bin/rmiregistry 来在自动模式中提供 /usr/bin/rmiregistry (rmiregistry)
update-alternatives: 使用 /usr/lib/jvm/java-22-openjdk-amd64/lib/jexec 来在自动模式中提供 /usr/bin/jexec (jexec)
正在处理用于 man-db (2.11.2-3) 的触发器 ...
正在处理用于 ca-certificates-java (20230710) 的触发器 ...
Adding debian:ACCVRAIZ1.pem
Adding debian:AC_RAIZ_FNMT-RCM.pem
Adding debian:AC_RAIZ_FNMT-RCM_SERVIDORES_SEGUROS.pem
Adding debian:Actalis_Authentication_Root_CA.pem
Adding debian:AffirmTrust_Commercial.pem
Adding debian:AffirmTrust_Networking.pem
Adding debian:AffirmTrust_Premium_ECC.pem
Adding debian:AffirmTrust_Premium.pem
Adding debian:Amazon_Root_CA_1.pem
Adding debian:Amazon_Root_CA_2.pem
Adding debian:Amazon_Root_CA_3.pem
Adding debian:Amazon_Root_CA_4.pem
Adding debian:ANF_Secure_Server_Root_CA.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068_2.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem
Adding debian:Baltimore_CyberTrust_Root.pem
Adding debian:Buypass_Class_2_Root_CA.pem
Adding debian:Buypass_Class_3_Root_CA.pem
Adding debian:CA_Disig_Root_R2.pem
Adding debian:Certainly_Root_E1.pem
Adding debian:Certainly_Root_R1.pem
Adding debian:Certigna.pem
Adding debian:Certigna_Root_CA.pem
Adding debian:certSIGN_Root_CA_G2.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:Certum_EC-384_CA.pem
Adding debian:Certum_Trusted_Network_CA_2.pem
Adding debian:Certum_Trusted_Network_CA.pem
Adding debian:Certum_Trusted_Root_CA.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:Comodo_AAA_Services_root.pem
Adding debian:COMODO_Certification_Authority.pem
Adding debian:COMODO_ECC_Certification_Authority.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:DigiCert_Assured_ID_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:DigiCert_Global_Root_CA.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem
Adding debian:DigiCert_TLS_ECC_P384_Root_G5.pem
Adding debian:DigiCert_TLS_RSA4096_Root_G5.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:D-TRUST_BR_Root_CA_1_2020.pem
Adding debian:D-TRUST_EV_Root_CA_1_2020.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem
Adding debian:emSign_ECC_Root_CA_-_C3.pem
Adding debian:emSign_ECC_Root_CA_-_G3.pem
Adding debian:emSign_Root_CA_-_C1.pem
Adding debian:emSign_Root_CA_-_G1.pem
Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:Entrust_Root_Certification_Authority_-_G4.pem
Adding debian:Entrust_Root_Certification_Authority.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:e-Szigno_Root_CA_2017.pem
Adding debian:E-Tugra_Certification_Authority.pem
Adding debian:E-Tugra_Global_Root_CA_ECC_v3.pem
Adding debian:E-Tugra_Global_Root_CA_RSA_v3.pem
Adding debian:GDCA_TrustAUTH_R5_ROOT.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:GlobalSign_Root_CA.pem
Adding debian:GlobalSign_Root_CA_-_R3.pem
Adding debian:GlobalSign_Root_CA_-_R6.pem
Adding debian:GlobalSign_Root_E46.pem
Adding debian:GlobalSign_Root_R46.pem
Adding debian:GLOBALTRUST_2020.pem
Adding debian:Go_Daddy_Class_2_CA.pem
Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem
Adding debian:GTS_Root_R1.pem
Adding debian:GTS_Root_R2.pem
Adding debian:GTS_Root_R3.pem
Adding debian:GTS_Root_R4.pem
Adding debian:HARICA_TLS_ECC_Root_CA_2021.pem
Adding debian:HARICA_TLS_RSA_Root_CA_2021.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem
Adding debian:HiPKI_Root_CA_-_G1.pem
Adding debian:Hongkong_Post_Root_CA_1.pem
Adding debian:Hongkong_Post_Root_CA_3.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:ISRG_Root_X1.pem
Adding debian:ISRG_Root_X2.pem
Adding debian:Izenpe.com.pem
Adding debian:Microsec_e-Szigno_Root_CA_2009.pem
Adding debian:Microsoft_ECC_Root_Certificate_Authority_2017.pem
Adding debian:Microsoft_RSA_Root_Certificate_Authority_2017.pem
Adding debian:NAVER_Global_Root_Certification_Authority.pem
Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:OISTE_WISeKey_Global_Root_GC_CA.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:QuoVadis_Root_CA_2.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:QuoVadis_Root_CA_3.pem
Adding debian:Secure_Global_CA.pem
Adding debian:SecureSign_RootCA11.pem
Adding debian:SecureTrust_CA.pem
Adding debian:Security_Communication_ECC_RootCA1.pem
Adding debian:Security_Communication_RootCA2.pem
Adding debian:Security_Communication_RootCA3.pem
Adding debian:Security_Communication_Root_CA.pem
Adding debian:SSL.com_EV_Root_Certification_Authority_ECC.pem
Adding debian:SSL.com_EV_Root_Certification_Authority_RSA_R2.pem
Adding debian:SSL.com_Root_Certification_Authority_ECC.pem
Adding debian:SSL.com_Root_Certification_Authority_RSA.pem
Adding debian:Starfield_Class_2_CA.pem
Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem
Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem
Adding debian:SwissSign_Gold_CA_-_G2.pem
Adding debian:SwissSign_Silver_CA_-_G2.pem
Adding debian:SZAFIR_ROOT_CA2.pem
Adding debian:Telia_Root_CA_v2.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:Trustwave_Global_Certification_Authority.pem
Adding debian:Trustwave_Global_ECC_P256_Certification_Authority.pem
Adding debian:Trustwave_Global_ECC_P384_Certification_Authority.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:T-TeleSec_GlobalRoot_Class_3.pem
Adding debian:TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem
Adding debian:TunTrust_Root_CA.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:TWCA_Root_Certification_Authority.pem
Adding debian:UCA_Extended_Validation_Root.pem
Adding debian:UCA_Global_G2_Root.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:vTrus_ECC_Root_CA.pem
Adding debian:vTrus_Root_CA.pem
Adding debian:XRamp_Global_CA_Root.pem
done.
Scanning processes...
Scanning processor microcode...
Scanning linux images...
Running kernel seems to be up-to-date.
The processor microcode seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0/bin$ java -version
openjdk version "22-ea" 2024-03-19
OpenJDK Runtime Environment (build 22-ea+16-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 22-ea+16-Ubuntu-1, mixed mode, sharing)
export JAVA_HOME=/usr/lib/jvm/java-22-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0$ ps -ef | grep java
renguoq+ 58310 1 11 12:38 pts/1 00:01:15 /usr/lib/jvm/java-22-openjdk-amd64/bin/java -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/renguoqiang/gitee_base/nacos-server-2.3.0/logs/java_heapdump.hprof -XX:-UseLargePages -Dnacos.member.list= -Xlog:gc*:file=/home/renguoqiang/gitee_base/nacos-server-2.3.0/logs/nacos_gc.log:time,tags:filecount=10,filesize=100m -Dloader.path=/home/renguoqiang/gitee_base/nacos-server-2.3.0/plugins,/home/renguoqiang/gitee_base/nacos-server-2.3.0/plugins/health,/home/renguoqiang/gitee_base/nacos-server-2.3.0/plugins/cmdb,/home/renguoqiang/gitee_base/nacos-server-2.3.0/plugins/selector -Dnacos.home=/home/renguoqiang/gitee_base/nacos-server-2.3.0 -jar /home/renguoqiang/gitee_base/nacos-server-2.3.0/target/nacos-server.jar --spring.config.additional-location=file:/home/renguoqiang/gitee_base/nacos-server-2.3.0/conf/ --logging.config=/home/renguoqiang/gitee_base/nacos-server-2.3.0/conf/nacos-logback.xml --server.max-http-header-size=524288 nacos.nacos
renguoq+ 62523 44873 0 12:48 pts/1 00:00:00 grep --color=auto java
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0$ which java
/usr/lib/jvm/java-22-openjdk-amd64/bin/java
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0$ whereis java
java: /usr/bin/java /usr/share/java /usr/lib/jvm/java-22-openjdk-amd64/bin/java /usr/share/man/man1/java.1.gz
renguoqiang@ubuntulenovo:~/gitee_base/nacos-server-2.3.0$ locate java
标签:Adding,java,22,openjdk,pem,Root,debian,CA From: https://www.cnblogs.com/rgqancy/p/17918701.html