jenkins 安装jdk17
时间: 2023-09-13 17:07:16 浏览: 199
您好!要在Linux上安装Jenkins和JDK 17,您可以按照以下步骤进行操作:
1. 安装JDK 17:
- 在终端中运行以下命令以添加AdoptOpenJDK存储库:
```
sudo apt install apt-transport-https
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb focal main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
```
- 更新存储库并安装JDK 17:
```
sudo apt update
sudo apt install adoptopenjdk-17-hotspot
```
- 验证JDK安装是否成功:
```
java -version
```
- 您应该能够看到类似以下的输出,表示JDK 17已成功安装:
```
openjdk version "17" 2021-09-14
OpenJDK Runtime Environment AdoptOpenJDK-17.0.0+35 (build 17+35)
OpenJDK 64-Bit Server VM AdoptOpenJDK-17.0.0+35 (build 17+35, mixed mode, sharing)
```
2. 安装Jenkins:
- 在终端中运
阅读全文