mirror of
https://github.com/labring/sealos.git
synced 2026-08-30 17:58:09 +08:00
(cherry picked from commit 1a0028df18)
Signed-off-by: cuisongliu <cuisongliu@qq.com>
# Conflicts:
# docs/4.0/docs/lifecycle-management/quick-start/installation.md
Co-authored-by: Jiahui <4543bxy@gmail.com>
This commit is contained in:
@@ -7,11 +7,26 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
# 安装sealos
|
||||
|
||||
你可以通过运行命令来获取版本列表:
|
||||
|
||||
```shell
|
||||
curl --silent "https://api.github.com/repos/labring/sealos/releases" | jq -r '.[].tag_name'
|
||||
```
|
||||
|
||||
> 注意:在选择版本时,建议使用稳定版本例如`v4.3.0`。像`v4.3.0-rc1`、`v4.3.0-alpha1`这样的版本是预发布版,请谨慎使用。
|
||||
|
||||
设置`VERSION`环境变量为latest版本号,或者将`VERSION`替换为您要安装的Sealos版本:
|
||||
|
||||
```shell
|
||||
VERSION=`curl -s https://api.github.com/repos/labring/sealos/releases/latest | grep -oE '"tag_name": "[^"]+"' | head -n1 | cut -d'"' -f4`
|
||||
```
|
||||
|
||||
## 二进制自动下载
|
||||
|
||||
```bash
|
||||
$ curl -sfL https://raw.githubusercontent.com/labring/sealos/v4.2.0/scripts/install.sh \
|
||||
| sh -s v4.2.0 labring/sealos
|
||||
curl -sfL https://raw.githubusercontent.com/labring/sealos/${VERSION}/scripts/install.sh |
|
||||
sh - ${VERSION} labring/sealos
|
||||
|
||||
```
|
||||
|
||||
## 二进制手动下载
|
||||
@@ -20,16 +35,16 @@ $ curl -sfL https://raw.githubusercontent.com/labring/sealos/v4.2.0/scripts/ins
|
||||
<TabItem value="amd64" label="amd64" default>
|
||||
|
||||
```bash
|
||||
$ wget https://github.com/labring/sealos/releases/download/v4.2.0/sealos_4.2.0_linux_amd64.tar.gz \
|
||||
&& tar zxvf sealos_4.2.0_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
$ wget https://github.com/labring/sealos/releases/download/${VERSION}/sealos_${VERSION#v}_linux_amd64.tar.gz \
|
||||
&& tar zxvf sealos_${VERSION#v}_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="arm64" label="arm64">
|
||||
|
||||
```bash
|
||||
$ wget https://github.com/labring/sealos/releases/download/v4.2.0/sealos_4.2.0_linux_arm64.tar.gz \
|
||||
&& tar zxvf sealos_4.2.0_linux_arm64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
$ wget https://github.com/labring/sealos/releases/download/${VERSION}/sealos_${VERSION#v}_linux_arm64.tar.gz \
|
||||
&& tar zxvf sealos_${VERSION#v}_linux_arm64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -63,8 +78,8 @@ sudo yum install sealos
|
||||
|
||||
### 前置依赖
|
||||
1. `linux`
|
||||
2. `git`
|
||||
3. `golang` 1.20+
|
||||
2. `git`
|
||||
3. `golang` 1.20+
|
||||
4. `libgpgme-dev libbtrfs-dev libdevmapper-dev`
|
||||
|
||||
如果在 `arm64` 环境下需要添加 `:arm64` 后缀。
|
||||
|
||||
@@ -7,11 +7,26 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
# 安装sealos
|
||||
|
||||
你可以通过运行命令来获取版本列表:
|
||||
|
||||
```shell
|
||||
curl --silent "https://api.github.com/repos/labring/sealos/releases" | jq -r '.[].tag_name'
|
||||
```
|
||||
|
||||
> 注意:在选择版本时,建议使用稳定版本例如`v4.3.0`。像`v4.3.0-rc1`、`v4.3.0-alpha1`这样的版本是预发布版,请谨慎使用。
|
||||
|
||||
设置`VERSION`环境变量为latest版本号,或者将`VERSION`替换为您要安装的Sealos版本:
|
||||
|
||||
```shell
|
||||
VERSION=`curl -s https://api.github.com/repos/labring/sealos/releases/latest | grep -oE '"tag_name": "[^"]+"' | head -n1 | cut -d'"' -f4`
|
||||
```
|
||||
|
||||
## 二进制自动下载
|
||||
|
||||
```bash
|
||||
$ curl -sfL https://raw.githubusercontent.com/labring/sealos/v4.2.0/scripts/install.sh \
|
||||
| sh -s v4.2.0 labring/sealos
|
||||
curl -sfL https://raw.githubusercontent.com/labring/sealos/${VERSION}/scripts/install.sh |
|
||||
sh - ${VERSION} labring/sealos
|
||||
|
||||
```
|
||||
|
||||
## 二进制手动下载
|
||||
@@ -20,16 +35,16 @@ $ curl -sfL https://raw.githubusercontent.com/labring/sealos/v4.2.0/scripts/ins
|
||||
<TabItem value="amd64" label="amd64" default>
|
||||
|
||||
```bash
|
||||
$ wget https://github.com/labring/sealos/releases/download/v4.2.0/sealos_4.2.0_linux_amd64.tar.gz \
|
||||
&& tar zxvf sealos_4.2.0_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
$ wget https://github.com/labring/sealos/releases/download/${VERSION}/sealos_${VERSION#v}_linux_amd64.tar.gz \
|
||||
&& tar zxvf sealos_${VERSION#v}_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="arm64" label="arm64">
|
||||
|
||||
```bash
|
||||
$ wget https://github.com/labring/sealos/releases/download/v4.2.0/sealos_4.2.0_linux_arm64.tar.gz \
|
||||
&& tar zxvf sealos_4.2.0_linux_arm64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
$ wget https://github.com/labring/sealos/releases/download/${VERSION}/sealos_${VERSION#v}_linux_arm64.tar.gz \
|
||||
&& tar zxvf sealos_${VERSION#v}_linux_arm64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
@@ -100,6 +100,10 @@ verify_downloader() {
|
||||
|
||||
get_release_version() {
|
||||
VERSION=$1
|
||||
# If the incoming version number is latest, get the latest version number from github
|
||||
if [ "$VERSION" = "latest" ]; then
|
||||
VERSION=$(curl -s https://api.github.com/repos/${OWN_REPO}/releases/latest | grep tag_name | cut -d '"' -f 4)
|
||||
fi
|
||||
info "Using ${VERSION} as release"
|
||||
OWN_REPO=$2
|
||||
if [ -z "$OWN_REPO" ]; then
|
||||
|
||||
Reference in New Issue
Block a user