You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by la...@apache.org on 2022/10/08 08:18:30 UTC

[incubator-pegasus-website] branch master updated: update build instruction for 2.4.0 (#17)

This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus-website.git


The following commit(s) were added to refs/heads/master by this push:
     new c270a1f  update build instruction for 2.4.0 (#17)
c270a1f is described below

commit c270a1fd903b51dab94a5d178fe5b4e2de8252b6
Author: Yingchun Lai <la...@apache.org>
AuthorDate: Sat Oct 8 16:18:26 2022 +0800

    update build instruction for 2.4.0 (#17)
---
 .gitignore                                     |   4 +-
 _config.yml                                    |   8 +-
 _docs/en/{build => 2.4.0}/compile-by-docker.md |  26 +++--
 _docs/en/2.4.0/compile-from-source.md          | 130 ++++++++++++++++++++++++
 _docs/en/build/compile-by-docker.md            |  24 +++--
 _docs/en/build/compile-from-source.md          | 119 +++++++++++++---------
 _docs/en/downloads.md                          |  10 +-
 _docs/zh/{build => 2.4.0}/compile-by-docker.md |  26 ++---
 _docs/zh/2.4.0/compile-from-source.md          | 131 +++++++++++++++++++++++++
 _docs/zh/build/compile-by-docker.md            |  24 ++---
 _docs/zh/build/compile-from-source.md          | 119 +++++++++++++---------
 _docs/zh/downloads.md                          |  30 +++---
 _includes/language-switch.html                 |   8 +-
 _includes/version-select.html                  |   5 +-
 _sass/_main.scss                               |   2 +-
 assets/css/_main.scss                          |   0
 16 files changed, 484 insertions(+), 182 deletions(-)

diff --git a/.gitignore b/.gitignore
index 10667f0..f2566c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,6 @@
 .sass-cache
 _site
 Gemfile.lock
-.jekyll-cache
\ No newline at end of file
+.jekyll-cache
+.DS_Store
+.idea/
diff --git a/_config.yml b/_config.yml
index b794ba5..5787d45 100755
--- a/_config.yml
+++ b/_config.yml
@@ -73,7 +73,7 @@ algolia:
 # multi-languages support
 languages: ["zh", "en"]
 # All sites missing their languages' counterparts will fallback to your `default_lang`.
-default_lang: "zh"
+default_lang: "en"
 exclude_from_localizations: ["js", "images", "css"]
 parallel_localization: true
 lang_from_path: true
@@ -84,8 +84,12 @@ sass:
   sourcemap: never
   style: compressed
 
-latest_pegasus_version: 2.1.0
+latest_pegasus_version: master
 pegasus_versions:
+- master
+- 2.4.0
+- 2.3.0
+- 2.2.0
 - 2.1.0
 - 2.0.0
 - 1.12.3
diff --git a/_docs/en/build/compile-by-docker.md b/_docs/en/2.4.0/compile-by-docker.md
similarity index 56%
copy from _docs/en/build/compile-by-docker.md
copy to _docs/en/2.4.0/compile-by-docker.md
index 5f81f83..e266086 100755
--- a/_docs/en/build/compile-by-docker.md
+++ b/_docs/en/2.4.0/compile-by-docker.md
@@ -1,19 +1,17 @@
 ---
-permalink: docs/build/compile-by-docker/
+permalink: 2.4.0/docs/build/compile-by-docker/
+redirect_from:
+  - 2.4.0/docs/build/compile-from-source/
+version: 2.4.0
 ---
 
 ## Download the docker image
 
-Pegasus encapsulates the building environment into a [docker image](https://hub.docker.com/r/apachepegasus/build-env), you can build directly based on this environment.
+Pegasus encapsulates the building environments into [docker images](https://hub.docker.com/r/apache/pegasus/tags?page=1&name=env), you can build directly based on these environments.
 
+For example, you can use the image based on `Ubuntu 20.04`:
 ```sh
-docker pull apachepegasus/build-env:centos7
-```
-
-To build based on a formally released stable version (e.g {{ site.latest_pegasus_version }}), you can pull as follow:
-
-```sh
-docker pull apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7
+docker pull apache/pegasus:build-env-ubuntu2004
 ```
 
 ## Compilation
@@ -22,8 +20,8 @@ Please refer to [Downloads](/docs/downloads) to fetch the sources under a direct
 
 ```sh
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
-           /bin/bash -c "./run.sh build -c"
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh build -c --clear_thirdparty -j $(nproc)"
 ```
 
 The output of compilation will be placed under `DSN_ROOT` of the source directory. It includes `bin`, `include` and `lib`.
@@ -34,7 +32,7 @@ Package server binaries for deployment:
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_server"
 ```
 
@@ -42,7 +40,7 @@ Package client libraries for C/C++ development:
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_client"
 ```
 
@@ -50,7 +48,7 @@ Package toolset which includes various tools (shell, bench):
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_tools"
 ```
 
diff --git a/_docs/en/2.4.0/compile-from-source.md b/_docs/en/2.4.0/compile-from-source.md
new file mode 100755
index 0000000..c7eab8b
--- /dev/null
+++ b/_docs/en/2.4.0/compile-from-source.md
@@ -0,0 +1,130 @@
+---
+permalink: 2.4.0/docs/build/compile-from-source/
+redirect_from:
+  - 2.4.0/docs/build/compile-from-source/
+version: 2.4.0
+---
+
+Since 2.4.0, Pegasus supports to build both on Linux and macOS. Please don't hesitate to contact us via [Github Issues]({{ site.pegasus_github_url }}/issues) when you encountered any problem.
+
+## Requirements
+
+- GCC 5+
+- CMake 3.11+
+
+## Ubuntu environment
+
+You can refer to the docker image [pegasus-build-dev/ubuntu20.04](https://github.com/apache/incubator-pegasus/blob/v2.4/docker/pegasus-build-env/ubuntu2004/Dockerfile) to install all dependencies.
+
+```bash
+apt-get update -y; \
+apt-get install -y --no-install-recommends \
+                       build-essential \
+                       software-properties-common \
+                       clang-10 \
+                       openjdk-8-jdk \
+                       python3-pip \
+                       libaio-dev \
+                       libsnappy-dev \
+                       libbz2-dev \
+                       libzstd-dev \
+                       liblz4-dev \
+                       zlib1g \
+                       zlib1g.dev \
+                       patch \
+                       netcat \
+                       wget \
+                       ccache \
+                       git \
+                       curl \
+                       zip \
+                       unzip \
+                       gdb \
+                       vim \
+                       automake \
+                       libtool \
+                       libssl-dev \
+                       bison \
+                       maven \
+                       flex;
+
+pip3 install --no-cache-dir cmake
+```
+
+## CentOS environment
+
+You can refer to the docker image [pegasus-build-dev/centos7](https://github.com/apache/incubator-pegasus/blob/v2.4/docker/pegasus-build-env/centos7/Dockerfile) to install all dependencies.
+
+```bash
+yum -y install centos-release-scl \
+                   scl-utils \
+                   epel-release; \
+                   yum -y install devtoolset-7-gcc \
+                   devtoolset-7-gcc-c++ \
+                   java-1.8.0-openjdk-devel.x86_64 \
+                   python3 \
+                   automake \
+                   autoconf \
+                   make \
+                   libtool \
+                   git \
+                   file \
+                   wget \
+                   ccache \
+                   nmap-ncat \
+                   zip \
+                   gdb \
+                   vim \
+                   unzip \
+                   which \
+                   openssl-devel \
+                   libaio-devel \
+                   snappy-devel \
+                   bzip2-devel \
+                   zlib \
+                   zlib-devel \
+                   libzstd-devel \
+                   lz4-devel \
+                   bison \
+                   flex \
+                   patch;
+
+pip3 install --no-cache-dir cmake
+```
+
+## Compilation
+
+Firstly, make sure:
+- `maven` has been installed correctly and added to `PATH`
+- `devtoolset-7` has been added to `PATH`
+- `JAVA_HOME` has been set correctly
+
+Please refer to [Downloads](/docs/downloads) to fetch the sources。
+
+```bash
+./run.sh build -c
+```
+
+The output of compilation will be placed under `DSN_ROOT` of the source directory. It includes `bin`, `include` and `lib`.
+
+## Packaging
+
+Package server binaries for deployment:
+
+```bash
+./run.sh pack_server
+```
+
+Package client libraries for C/C++ development:
+
+```bash
+./run.sh pack_client
+```
+
+Package toolset which includes various tools (shell, bench):
+
+```bash
+./run.sh pack_tools
+```
+
+If this is your first time compiling Pegasus, it's recommended to try [onebox](/overview/onebox).
diff --git a/_docs/en/build/compile-by-docker.md b/_docs/en/build/compile-by-docker.md
index 5f81f83..7ed5c0f 100755
--- a/_docs/en/build/compile-by-docker.md
+++ b/_docs/en/build/compile-by-docker.md
@@ -1,19 +1,17 @@
 ---
 permalink: docs/build/compile-by-docker/
+redirect_from:
+  - master/docs/build/compile-from-source/
+version: master
 ---
 
 ## Download the docker image
 
-Pegasus encapsulates the building environment into a [docker image](https://hub.docker.com/r/apachepegasus/build-env), you can build directly based on this environment.
+Pegasus encapsulates the building environments into [docker images](https://hub.docker.com/r/apache/pegasus/tags?page=1&name=env), you can build directly based on these environments.
 
+For example, you can use the image based on `Ubuntu 20.04`:
 ```sh
-docker pull apachepegasus/build-env:centos7
-```
-
-To build based on a formally released stable version (e.g {{ site.latest_pegasus_version }}), you can pull as follow:
-
-```sh
-docker pull apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7
+docker pull apache/pegasus:build-env-ubuntu2004
 ```
 
 ## Compilation
@@ -22,8 +20,8 @@ Please refer to [Downloads](/docs/downloads) to fetch the sources under a direct
 
 ```sh
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
-           /bin/bash -c "./run.sh build -c"
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh build -c --clear_thirdparty -j $(nproc)"
 ```
 
 The output of compilation will be placed under `DSN_ROOT` of the source directory. It includes `bin`, `include` and `lib`.
@@ -34,7 +32,7 @@ Package server binaries for deployment:
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_server"
 ```
 
@@ -42,7 +40,7 @@ Package client libraries for C/C++ development:
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_client"
 ```
 
@@ -50,7 +48,7 @@ Package toolset which includes various tools (shell, bench):
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_tools"
 ```
 
diff --git a/_docs/en/build/compile-from-source.md b/_docs/en/build/compile-from-source.md
index 5dc5415..f67affc 100755
--- a/_docs/en/build/compile-from-source.md
+++ b/_docs/en/build/compile-from-source.md
@@ -1,11 +1,11 @@
 ---
 permalink: docs/build/compile-from-source/
 redirect_from:
-  - 2.1.0/docs/build/compile-from-source/
-version: 2.1.0
+  - master/docs/build/compile-from-source/
+version: master
 ---
 
-Pegasus supports Linux only. Please don't hesitate to contact us via [Github Issues]({{ site.pegasus_github_url }}/issues) when you encountered any problem.
+Since 2.4.0, Pegasus supports to build both on Linux and macOS. Please don't hesitate to contact us via [Github Issues]({{ site.pegasus_github_url }}/issues) when you encountered any problem.
 
 ## Requirements
 
@@ -14,70 +14,91 @@ Pegasus supports Linux only. Please don't hesitate to contact us via [Github Iss
 
 ## Ubuntu environment
 
-You can refer to the docker image [pegasus-build-dev/ubuntu16.04](https://github.com/pegasus-kv/pegasus-docker/blob/2.1.0/pegasus-build-env/ubuntu16.04/Dockerfile) to install all dependencies.
+You can refer to the docker image [pegasus-build-dev/ubuntu20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2004/Dockerfile) to install all dependencies.
 
 ```bash
 apt-get update -y; \
-apt-get -y install build-essential \
-                   python3-pip \
-                   libaio-dev \
-                   libsnappy-dev \
-                   libbz2-dev \
-                   libzstd-dev \
-                   liblz4-dev \
-                   zlib1g \
-                   zlib1g.dev \
-                   patch \
-                   git \
-                   curl \
-                   zip \
-                   automake \
-                   libtool \
-                   libssl-dev \
-                   bison \
-                   flex;
+apt-get install -y --no-install-recommends \
+                       build-essential \
+                       software-properties-common \
+                       clang-10 \
+                       openjdk-8-jdk \
+                       python3-pip \
+                       libaio-dev \
+                       libsnappy-dev \
+                       libbz2-dev \
+                       libzstd-dev \
+                       liblz4-dev \
+                       zlib1g \
+                       zlib1g.dev \
+                       patch \
+                       netcat \
+                       wget \
+                       ccache \
+                       git \
+                       curl \
+                       zip \
+                       unzip \
+                       gdb \
+                       vim \
+                       automake \
+                       libtool \
+                       libssl-dev \
+                       bison \
+                       maven \
+                       flex;
 
 pip3 install --no-cache-dir cmake
 ```
 
 ## CentOS environment
 
-You can refer to the docker image [pegasus-build-dev/centos7](https://github.com/pegasus-kv/pegasus-docker/blob/2.1.0/pegasus-build-env/centos7/Dockerfile) to install all dependencies.
+You can refer to the docker image [pegasus-build-dev/centos7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) to install all dependencies.
 
 ```bash
 yum -y install centos-release-scl \
-               scl-utils \
-               epel-release;
-
-yum -y install devtoolset-7-gcc \
-               devtoolset-7-gcc-c++ \
-               python3 \
-               automake \
-               autoconf \
-               make \
-               libtool \
-               git \
-               file \
-               wget \
-               unzip \
-               which \
-               openssl-devel \
-               libaio-devel \
-               snappy-devel \
-               bzip2-devel \
-               zlib \
-               zlib-devel \
-               libzstd-devel \
-               lz4-devel \
-               bison \
-               flex \
-               patch;
+                   scl-utils \
+                   epel-release; \
+                   yum -y install devtoolset-7-gcc \
+                   devtoolset-7-gcc-c++ \
+                   java-1.8.0-openjdk-devel.x86_64 \
+                   python3 \
+                   automake \
+                   autoconf \
+                   make \
+                   libtool \
+                   git \
+                   file \
+                   wget \
+                   ccache \
+                   nmap-ncat \
+                   zip \
+                   gdb \
+                   vim \
+                   unzip \
+                   which \
+                   openssl-devel \
+                   libaio-devel \
+                   snappy-devel \
+                   bzip2-devel \
+                   zlib \
+                   zlib-devel \
+                   libzstd-devel \
+                   lz4-devel \
+                   bison \
+                   flex \
+                   patch;
 
 pip3 install --no-cache-dir cmake
 ```
 
 ## Compilation
 
+Firstly, make sure:
+- `maven` has been installed correctly and added to `PATH`
+- `devtoolset-7` has been added to `PATH`
+- `JAVA_HOME` has been set correctly
+
 Please refer to [Downloads](/docs/downloads) to fetch the sources。
 
 ```bash
diff --git a/_docs/en/downloads.md b/_docs/en/downloads.md
index 786f0b3..5622b63 100644
--- a/_docs/en/downloads.md
+++ b/_docs/en/downloads.md
@@ -24,9 +24,9 @@ We recommend downloading the signed source release that follows [ASF Release Pol
 [2.3.0-sha]: https://downloads.apache.org/incubator/pegasus/2.3.0/apache-pegasus-2.3.0-incubating-src.zip.sha512
 [2.3.0-rn]: https://cwiki.apache.org/confluence/display/PEGASUS/Apache+Pegasus+2.3.0+Release+Notes
 
-Name | Package | Signature | Checksum | Release Notes |
----|---|---|---|---|
-Apache Pegasus 2.1.0 | [Source][2.1.0-src] | [asc][2.1.0-asc] | [sha512][2.1.0-sha] | [2020-11-30][2.1.0-rn]
-Apache Pegasus 2.2.0 | [Source][2.2.0-src] | [asc][2.2.0-asc] | [sha512][2.2.0-sha] | [2021-06-27][2.2.0-rn]
-Apache Pegasus 2.3.0 | [Source][2.3.0-src] | [asc][2.3.0-asc] | [sha512][2.3.0-sha] | [2021-11-26][2.3.0-rn]
+| Name                 | Package             | Signature        | Checksum            | Release Notes          |
+|----------------------|---------------------|------------------|---------------------|------------------------|
+| Apache Pegasus 2.1.0 | [Source][2.1.0-src] | [asc][2.1.0-asc] | [sha512][2.1.0-sha] | [2020-11-30][2.1.0-rn] |
+| Apache Pegasus 2.2.0 | [Source][2.2.0-src] | [asc][2.2.0-asc] | [sha512][2.2.0-sha] | [2021-06-27][2.2.0-rn] |
+| Apache Pegasus 2.3.0 | [Source][2.3.0-src] | [asc][2.3.0-asc] | [sha512][2.3.0-sha] | [2021-11-26][2.3.0-rn] |
 
diff --git a/_docs/zh/build/compile-by-docker.md b/_docs/zh/2.4.0/compile-by-docker.md
similarity index 59%
copy from _docs/zh/build/compile-by-docker.md
copy to _docs/zh/2.4.0/compile-by-docker.md
index 7077b0f..d8e18ea 100755
--- a/_docs/zh/build/compile-by-docker.md
+++ b/_docs/zh/2.4.0/compile-by-docker.md
@@ -1,19 +1,19 @@
 ---
-permalink: docs/build/compile-by-docker/
+permalink: 2.4.0/docs/build/compile-by-docker/
+redirect_from:
+  - 2.4.0/docs/build/compile-by-docker/
+  - docs/installation
+version: 2.4.0
 ---
 
 ## 下载Docker镜像
 
-Pegasus将编译环境封装至[Docker镜像](https://hub.docker.com/r/apachepegasus/build-env)中,你可以直接基于此环境编译代码。
+Pegasus将编译环境封装至[Docker镜像](https://hub.docker.com/r/apache/pegasus/tags?page=1&name=env)中,这里包含有多个Linux发行版,你可以直接基于这些环境编译代码。
 
-```sh
-docker pull apachepegasus/build-env:centos7
-```
-
-如果希望基于正式发布的稳定版本(如 {{ site.latest_pegasus_version }})进行编译,你可以下载:
+比如,你可以使用基于`Ubuntu 20.04`的镜像:
 
 ```sh
-docker pull apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7
+docker pull apache/pegasus:build-env-ubuntu2004
 ```
 
 ## 编译
@@ -22,8 +22,8 @@ docker pull apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7
 
 ```sh
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
-           /bin/bash -c "./run.sh build -c"
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh build -c --clear_thirdparty -j $(nproc)"
 ```
 
 编译的结果会被放在项目根目录的`DSN_ROOT/`文件夹下,其中包含bin、include、lib目录。
@@ -34,7 +34,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_server"
 ```
 
@@ -42,7 +42,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_client"
 ```
 
@@ -50,7 +50,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_tools"
 ```
 
diff --git a/_docs/zh/2.4.0/compile-from-source.md b/_docs/zh/2.4.0/compile-from-source.md
new file mode 100755
index 0000000..8e45618
--- /dev/null
+++ b/_docs/zh/2.4.0/compile-from-source.md
@@ -0,0 +1,131 @@
+---
+permalink: 2.4.0/docs/build/compile-from-source/
+redirect_from:
+  - 2.4.0/docs/build/compile-from-source/
+  - docs/installation
+version: 2.4.0
+---
+
+从2.4.0开始,Pegasus目前支持Linux和macOS平台进行源码编译。编译过程中遇到问题,可以通过[Github Issues]({{ site.pegasus_github_url }}/issues)向我们咨询。
+
+## 环境要求
+
+- GCC 5+
+- CMake 3.11+
+
+## Ubuntu环境配置
+
+你可以参考 [pegasus-build-dev/ubuntu20.04](https://github.com/apache/incubator-pegasus/blob/v2.4/docker/pegasus-build-env/ubuntu2004/Dockerfile) 的Docker镜像安装全部依赖。
+
+```bash
+apt-get update -y; \
+apt-get install -y --no-install-recommends \
+                       build-essential \
+                       software-properties-common \
+                       clang-10 \
+                       openjdk-8-jdk \
+                       python3-pip \
+                       libaio-dev \
+                       libsnappy-dev \
+                       libbz2-dev \
+                       libzstd-dev \
+                       liblz4-dev \
+                       zlib1g \
+                       zlib1g.dev \
+                       patch \
+                       netcat \
+                       wget \
+                       ccache \
+                       git \
+                       curl \
+                       zip \
+                       unzip \
+                       gdb \
+                       vim \
+                       automake \
+                       libtool \
+                       libssl-dev \
+                       bison \
+                       maven \
+                       flex;
+
+pip3 install --no-cache-dir cmake
+```
+
+## CentOS环境配置
+
+你可以参考 [pegasus-build-dev/centos7](https://github.com/apache/incubator-pegasus/blob/v2.4/docker/pegasus-build-env/centos7/Dockerfile) 的Docker镜像安装全部依赖。
+
+```bash
+yum -y install centos-release-scl \
+                   scl-utils \
+                   epel-release; \
+                   yum -y install devtoolset-7-gcc \
+                   devtoolset-7-gcc-c++ \
+                   java-1.8.0-openjdk-devel.x86_64 \
+                   python3 \
+                   automake \
+                   autoconf \
+                   make \
+                   libtool \
+                   git \
+                   file \
+                   wget \
+                   ccache \
+                   nmap-ncat \
+                   zip \
+                   gdb \
+                   vim \
+                   unzip \
+                   which \
+                   openssl-devel \
+                   libaio-devel \
+                   snappy-devel \
+                   bzip2-devel \
+                   zlib \
+                   zlib-devel \
+                   libzstd-devel \
+                   lz4-devel \
+                   bison \
+                   flex \
+                   patch;
+
+pip3 install --no-cache-dir cmake
+```
+
+## 源码编译
+
+在此之前,请确保:
+- `maven`已被正确安装且已添加到`PATH`
+- `devtoolset-7`已被添加到`PATH`
+- `JAVA_HOME`已被正确设置
+
+请先参考[下载文档](/docs/downloads)获取源码。
+
+```bash
+./run.sh build -c
+```
+
+编译后输出会放在当前目录的`DSN_ROOT/`文件夹下,里面包含bin、include、lib目录。
+
+## 编译打包
+
+打包server端程序包,用于服务部署:
+
+```bash
+./run.sh pack_server
+```
+
+打包client端库,用于C/C++端客户端开发:
+
+```bash
+./run.sh pack_client
+```
+
+打包tools工具集,里面包含了各种工具(shell、bench):
+
+```bash
+./run.sh pack_tools
+```
+
+编译成功后,推荐先[体验onebox集群](/overview/onebox)。
diff --git a/_docs/zh/build/compile-by-docker.md b/_docs/zh/build/compile-by-docker.md
index 7077b0f..40e102f 100755
--- a/_docs/zh/build/compile-by-docker.md
+++ b/_docs/zh/build/compile-by-docker.md
@@ -1,19 +1,19 @@
 ---
 permalink: docs/build/compile-by-docker/
+redirect_from:
+  - master/docs/build/compile-by-docker/
+  - docs/installation
+version: master
 ---
 
 ## 下载Docker镜像
 
-Pegasus将编译环境封装至[Docker镜像](https://hub.docker.com/r/apachepegasus/build-env)中,你可以直接基于此环境编译代码。
+Pegasus将编译环境封装至[Docker镜像](https://hub.docker.com/r/apache/pegasus/tags?page=1&name=env)中,这里包含有多个Linux发行版,你可以直接基于这些环境编译代码。
 
-```sh
-docker pull apachepegasus/build-env:centos7
-```
-
-如果希望基于正式发布的稳定版本(如 {{ site.latest_pegasus_version }})进行编译,你可以下载:
+比如,你可以使用基于`Ubuntu 20.04`的镜像:
 
 ```sh
-docker pull apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7
+docker pull apache/pegasus:build-env-ubuntu2004
 ```
 
 ## 编译
@@ -22,8 +22,8 @@ docker pull apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7
 
 ```sh
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
-           /bin/bash -c "./run.sh build -c"
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh build -c --clear_thirdparty -j $(nproc)"
 ```
 
 编译的结果会被放在项目根目录的`DSN_ROOT/`文件夹下,其中包含bin、include、lib目录。
@@ -34,7 +34,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_server"
 ```
 
@@ -42,7 +42,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_client"
 ```
 
@@ -50,7 +50,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \
 
 ```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
-           apachepegasus/build-env:{{ site.latest_pegasus_version }}-centos7 \
+           apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "./run.sh pack_tools"
 ```
 
diff --git a/_docs/zh/build/compile-from-source.md b/_docs/zh/build/compile-from-source.md
index 1bec63b..8f483b4 100755
--- a/_docs/zh/build/compile-from-source.md
+++ b/_docs/zh/build/compile-from-source.md
@@ -1,12 +1,12 @@
 ---
 permalink: docs/build/compile-from-source/
 redirect_from:
-  - 2.1.0/docs/build/compile-from-source/
+  - master/docs/build/compile-from-source/
   - docs/installation
-version: 2.1.0
+version: master
 ---
 
-Pegasus目前只支持Linux平台进行源码编译。编译过程中遇到问题,可以通过[Github Issues]({{ site.pegasus_github_url }}/issues)向我们咨询。
+从2.4.0开始,Pegasus目前支持Linux和macOS平台进行源码编译。编译过程中遇到问题,可以通过[Github Issues]({{ site.pegasus_github_url }}/issues)向我们咨询。
 
 ## 环境要求
 
@@ -15,70 +15,91 @@ Pegasus目前只支持Linux平台进行源码编译。编译过程中遇到问
 
 ## Ubuntu环境配置
 
-你可以参考 [pegasus-build-dev/ubuntu16.04](https://github.com/pegasus-kv/pegasus-docker/blob/2.1.0/pegasus-build-env/ubuntu16.04/Dockerfile) 的Docker镜像安装全部依赖。
+你可以参考 [pegasus-build-dev/ubuntu20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2004/Dockerfile) 的Docker镜像安装全部依赖。
 
 ```bash
 apt-get update -y; \
-apt-get -y install build-essential \
-                   python3-pip \
-                   libaio-dev \
-                   libsnappy-dev \
-                   libbz2-dev \
-                   libzstd-dev \
-                   liblz4-dev \
-                   zlib1g \
-                   zlib1g.dev \
-                   patch \
-                   git \
-                   curl \
-                   zip \
-                   automake \
-                   libtool \
-                   libssl-dev \
-                   bison \
-                   flex;
+apt-get install -y --no-install-recommends \
+                       build-essential \
+                       software-properties-common \
+                       clang-10 \
+                       openjdk-8-jdk \
+                       python3-pip \
+                       libaio-dev \
+                       libsnappy-dev \
+                       libbz2-dev \
+                       libzstd-dev \
+                       liblz4-dev \
+                       zlib1g \
+                       zlib1g.dev \
+                       patch \
+                       netcat \
+                       wget \
+                       ccache \
+                       git \
+                       curl \
+                       zip \
+                       unzip \
+                       gdb \
+                       vim \
+                       automake \
+                       libtool \
+                       libssl-dev \
+                       bison \
+                       maven \
+                       flex;
 
 pip3 install --no-cache-dir cmake
 ```
 
 ## CentOS环境配置
 
-你可以参考 [pegasus-build-dev/centos7](https://github.com/pegasus-kv/pegasus-docker/blob/2.1.0/pegasus-build-env/centos7/Dockerfile) 的Docker镜像安装全部依赖。
+你可以参考 [pegasus-build-dev/centos7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) 的Docker镜像安装全部依赖。
 
 ```bash
 yum -y install centos-release-scl \
-               scl-utils \
-               epel-release;
-
-yum -y install devtoolset-7-gcc \
-               devtoolset-7-gcc-c++ \
-               python3 \
-               automake \
-               autoconf \
-               make \
-               libtool \
-               git \
-               file \
-               wget \
-               unzip \
-               which \
-               openssl-devel \
-               libaio-devel \
-               snappy-devel \
-               bzip2-devel \
-               zlib \
-               zlib-devel \
-               libzstd-devel \
-               lz4-devel \
-               bison \
-               flex \
-               patch;
+                   scl-utils \
+                   epel-release; \
+                   yum -y install devtoolset-7-gcc \
+                   devtoolset-7-gcc-c++ \
+                   java-1.8.0-openjdk-devel.x86_64 \
+                   python3 \
+                   automake \
+                   autoconf \
+                   make \
+                   libtool \
+                   git \
+                   file \
+                   wget \
+                   ccache \
+                   nmap-ncat \
+                   zip \
+                   gdb \
+                   vim \
+                   unzip \
+                   which \
+                   openssl-devel \
+                   libaio-devel \
+                   snappy-devel \
+                   bzip2-devel \
+                   zlib \
+                   zlib-devel \
+                   libzstd-devel \
+                   lz4-devel \
+                   bison \
+                   flex \
+                   patch;
 
 pip3 install --no-cache-dir cmake
 ```
 
 ## 源码编译
 
+在此之前,请确保:
+- `maven`已被正确安装且已添加到`PATH`
+- `devtoolset-7`已被添加到`PATH`
+- `JAVA_HOME`已被正确设置
+
 请先参考[下载文档](/docs/downloads)获取源码。
 
 ```bash
diff --git a/_docs/zh/downloads.md b/_docs/zh/downloads.md
index 2511544..e99612c 100644
--- a/_docs/zh/downloads.md
+++ b/_docs/zh/downloads.md
@@ -24,11 +24,11 @@ permalink: docs/downloads/
 [2.3.0-sha]: https://downloads.apache.org/incubator/pegasus/2.3.0/apache-pegasus-2.3.0-incubating-src.zip.sha512
 [2.3.0-rn]: https://cwiki.apache.org/confluence/display/PEGASUS/Apache+Pegasus+2.3.0+Release+Notes
 
-Name | Package | Signature | Checksum | Release Notes |
----|---|---|---|---|
-Apache Pegasus 2.1.0 | [Source][2.1.0-src] | [asc][2.1.0-asc] | [sha512][2.1.0-sha] | [2020-11-30][2.1.0-rn]
-Apache Pegasus 2.2.0 | [Source][2.2.0-src] | [asc][2.2.0-asc] | [sha512][2.2.0-sha] | [2021-06-27][2.2.0-rn]
-Apache Pegasus 2.3.0 | [Source][2.3.0-src] | [asc][2.3.0-asc] | [sha512][2.3.0-sha] | [2021-11-26][2.3.0-rn]
+| Name                 | Package             | Signature        | Checksum            | Release Notes          |
+|----------------------|---------------------|------------------|---------------------|------------------------|
+| Apache Pegasus 2.1.0 | [Source][2.1.0-src] | [asc][2.1.0-asc] | [sha512][2.1.0-sha] | [2020-11-30][2.1.0-rn] |
+| Apache Pegasus 2.2.0 | [Source][2.2.0-src] | [asc][2.2.0-asc] | [sha512][2.2.0-sha] | [2021-06-27][2.2.0-rn] |
+| Apache Pegasus 2.3.0 | [Source][2.3.0-src] | [asc][2.3.0-asc] | [sha512][2.3.0-sha] | [2021-11-26][2.3.0-rn] |
 
 在 2.1.0 版本以前,Pegasus 并未遵循 ASF 发版流程,这里我们仍然提供老版本下载渠道,方便升级:
 
@@ -47,17 +47,17 @@ Apache Pegasus 2.3.0 | [Source][2.3.0-src] | [asc][2.3.0-asc] | [sha512][2.3.0-s
 [1.9.0-src]: https://github.com/apache/incubator-pegasus/releases/download/v1.9.0/apache-pegasus-1.9.0-incubating-src.zip
 [1.9.0-rn]: https://github.com/apache/incubator-pegasus/releases/tag/v1.9.0
 
-Name | Package | Release Notes
----|---|---
-Apache Pegasus 2.0.0 | [Source][2.0.0-src] | [2020-6-11][2.0.0-rn]
-Apache Pegasus 1.12.3 | [Source][1.12.3-src] | [2020-4-23][1.12.3-rn]
-Apache Pegasus 1.12.0 | [Source][1.12.0-src] | [2019-11-19][1.12.0-rn]
-Apache Pegasus 1.11.6 | [Source][1.11.6-src] | [2019-8-23][1.11.6-rn]
-Apache Pegasus 1.11.3 | [Source][1.11.3-src] | [2019-2-27][1.11.3-rn]
-Apache Pegasus 1.10.0 | [Source][1.10.0-src] | [2018-6-19][1.10.0-rn]
-Apache Pegasus 1.9.0 | [Source][1.9.0-src] | [2018-6-20][1.9.0-rn]
+| Name                  | Package              | Release Notes           |
+|-----------------------|----------------------|-------------------------|
+| Apache Pegasus 2.0.0  | [Source][2.0.0-src]  | [2020-6-11][2.0.0-rn]   |
+| Apache Pegasus 1.12.3 | [Source][1.12.3-src] | [2020-4-23][1.12.3-rn]  |
+| Apache Pegasus 1.12.0 | [Source][1.12.0-src] | [2019-11-19][1.12.0-rn] |
+| Apache Pegasus 1.11.6 | [Source][1.11.6-src] | [2019-8-23][1.11.6-rn]  |
+| Apache Pegasus 1.11.3 | [Source][1.11.3-src] | [2019-2-27][1.11.3-rn]  |
+| Apache Pegasus 1.10.0 | [Source][1.10.0-src] | [2018-6-19][1.10.0-rn]  |
+| Apache Pegasus 1.9.0  | [Source][1.9.0-src]  | [2018-6-20][1.9.0-rn]   |
 
-上述各版本均可找到对应编译环境的镜像:<https://hub.docker.com/r/apachepegasus/build-env/tags>,请参考 [{{site.data.translate['title_compile-by-docker'}}](/docs/build/compile-by-docker/) 完成编译。
+上述各版本均可找到对应编译环境的镜像:<https://hub.docker.com/r/apachepegasus/build-env/tags>,请参考 [{{site.data.translate['title_compile-by-docker']}}](/docs/build/compile-by-docker/) 完成编译。
 
 ```
 docker pull apachepegasus/build-env:{VERSION}-{OS}
diff --git a/_includes/language-switch.html b/_includes/language-switch.html
index cf3718e..3a081eb 100644
--- a/_includes/language-switch.html
+++ b/_includes/language-switch.html
@@ -6,10 +6,10 @@
 
 <!--A simple language switch button that only supports zh and en.-->
 <!--IF its language is zh, then switches to en.-->
-{% if site.active_lang == "zh" %}
-<a class="button {{ lang_switch_button }}" href="{{ page.url | prepend: '/en' }}"><strong>En</strong></a>
-{% elsif site.active_lang == "en" %}
+{% if site.active_lang == "en" %}
+<a class="button {{ lang_switch_button }}" href="{{ page.url | prepend: '/zh' }}"><strong>中</strong></a>
+{% elsif site.active_lang == "zh" %}
 <!--If you don't want a url to be relativized, you can add a space explicitly into the href to 
     prevents a url from being relativized by polyglot.-->
-<a class="button {{ lang_switch_button }}" href=" {{ page.url }}"><strong>中</strong></a>
+<a class="button {{ lang_switch_button }}" href=" {{ page.url }}"><strong>En</strong></a>
 {% endif %}
\ No newline at end of file
diff --git a/_includes/version-select.html b/_includes/version-select.html
index 0d60ea7..9c4e615 100644
--- a/_includes/version-select.html
+++ b/_includes/version-select.html
@@ -12,7 +12,7 @@
         <div class="dropdown-content">
             {% for ver in site.pegasus_versions %}
 
-            <!--URL of our latest verion always starts without version prefixed.-->
+            <!--URL of our latest version always starts without version prefixed.-->
             {% assign version_prefix = '/' | append: page.version %}
             {% assign no_version_link = page.permalink | remove_first: version_prefix %}
             {% if ver == site.latest_pegasus_version %}
@@ -23,9 +23,6 @@
 
             <a href="{{ version_url }}" class="dropdown-item {% if ver == page.version %}is-active{% endif %}">
                 {{ ver }}
-                {% if ver == site.latest_pegasus_version %}
-                <b> (latest)</b>
-                {% endif %}
             </a>
             {% endfor %}
         </div>
diff --git a/_sass/_main.scss b/_sass/_main.scss
index 73e3fff..8c28c8c 100644
--- a/_sass/_main.scss
+++ b/_sass/_main.scss
@@ -17,4 +17,4 @@ $input-placeholder-color: hsl(0, 0%, 50%);
 @import "../node_modules/bulma/bulma.sass";
 @import "../node_modules/bulma-dashboard/src/bulma-dashboard.sass";
 @import "layout";
-@import "syntax"
\ No newline at end of file
+@import "syntax";
\ No newline at end of file
diff --git a/assets/css/_main.scss b/assets/css/_main.scss
new file mode 100644
index 0000000..e69de29


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org