Skip to content

安装说明

John Jiang edited this page Jun 28, 2023 · 9 revisions

安装腾讯Kona

通过文件安装

Releases中下载腾讯Kona的二进制文件,例如:TencentKona-8.0.0-232.x86_64.tar.gz

cd <Install_Path>
tar -xvf TencentKona-8.0.0-232.x86_64.tar.gz
export JAVA_HOME=<Install_Path>/TencentKona-8.0.0-232
export PATH=${JAVA_HOME}/bin:$PATH
export CLASSPATH=.:${JAVA_HOME}/lib

通过SDKMAN安装

SDKMAN已经支持了腾讯Kona,请先查看版本,

$ sdk list java | grep kona
Tencent       |     | 17.0.7       | kona    |            | 17.0.7-kona
              |     | 11.0.19      | kona    |            | 11.0.19-kona
              |     | 8.0.372      | kona    |            | 8.0.372-kona

然后再使用如下命令进行安装,

$ sdk install java 8.0.372-kona

验证腾讯Kona版本

java -version 输出应如下:

bash#> java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (Tencent Kona 8.0.0) (build 1.8.0_232-18)
OpenJDK 64-Bit Server VM (Tencent Kona 8.0.0) (build 25.232-b18, mixed mode, sharing)

使用Docker镜像

1. 拉取docker镜像

基于alpine的镜像,支持Linux X86-64/Aarch64

~# docker pull konajdk/konajdk:8-alpine

2. 查看本地image镜像,获取IMAGE ID

~# docker images

输出如下

REPOSITORY                                               TAG                      IMAGE ID            CREATED             SIZE
konajdk/konajdk                                          8-alpine                 c288ef940f28        12 days ago         314MB

3. 验证Java版本

~# docker run -it [IMAGE ID] java -version

输出如下(应包含"Tencent Kona"字样)

openjdk version "1.8.0_345"
OpenJDK Runtime Environment (Tencent Kona 8.0.11) (build 1.8.0_345-b2)
OpenJDK 64-Bit Server VM (Tencent Kona 8.0.11) (build 25.345-b2, mixed mode, sharing)