From 97e1ee286d704c145aa8326e3c14a6ef07730730 Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Thu, 23 Nov 2023 12:13:01 +0800 Subject: [PATCH 1/2] Update compile intruction --- _docs/en/build/compile-by-docker.md | 2 +- _docs/en/build/compile-from-source.md | 99 +++------------------------ _docs/zh/build/compile-by-docker.md | 2 +- _docs/zh/build/compile-from-source.md | 98 +++----------------------- 4 files changed, 24 insertions(+), 177 deletions(-) diff --git a/_docs/en/build/compile-by-docker.md b/_docs/en/build/compile-by-docker.md index 7ed5c0f9..a694b0de 100755 --- a/_docs/en/build/compile-by-docker.md +++ b/_docs/en/build/compile-by-docker.md @@ -24,7 +24,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \ /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`. +The output of compilation will be placed under `build/latest/output/` of the source directory. It includes `bin`, `include` and `lib`. ## Packaging diff --git a/_docs/en/build/compile-from-source.md b/_docs/en/build/compile-from-source.md index f67affc3..e4711347 100755 --- a/_docs/en/build/compile-from-source.md +++ b/_docs/en/build/compile-from-source.md @@ -9,107 +9,30 @@ Since 2.4.0, Pegasus supports to build both on Linux and macOS. Please don't hes ## Requirements -- GCC 5+ -- CMake 3.11+ +- GCC 5.4.0+ +- CMake 3.11.0+ -## Ubuntu environment +## Linux environment -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 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/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++ \ - 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 -``` +You can refer to the docker images to install dependencies and set environment variables. For example: +- [CentOS 7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) +- [Ubuntu 18.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) +- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) +- [Ubuntu 22.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2204/Dockerfile) ## 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 +./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`. +The output of compilation will be placed under `build/latest/output/` of the source directory. It includes `bin`, `include` and `lib`. ## Packaging -Package server binaries for deployment: +Package server binaries for development: ```bash ./run.sh pack_server diff --git a/_docs/zh/build/compile-by-docker.md b/_docs/zh/build/compile-by-docker.md index 40e102f3..6a438213 100755 --- a/_docs/zh/build/compile-by-docker.md +++ b/_docs/zh/build/compile-by-docker.md @@ -26,7 +26,7 @@ docker run -v /your/local/apache-pegasus-source:/root/pegasus \ /bin/bash -c "cd /root/pegasus; ./run.sh build -c --clear_thirdparty -j $(nproc)" ``` -编译的结果会被放在项目根目录的`DSN_ROOT/`文件夹下,其中包含bin、include、lib目录。 +编译的结果会被放在项目根目录的`build/latest/output/`文件夹下,其中包含`bin`、`include`以及`lib`目录。 ## 编译打包 diff --git a/_docs/zh/build/compile-from-source.md b/_docs/zh/build/compile-from-source.md index 8f483b43..c92f81c6 100755 --- a/_docs/zh/build/compile-from-source.md +++ b/_docs/zh/build/compile-from-source.md @@ -6,107 +6,31 @@ redirect_from: version: master --- -从2.4.0开始,Pegasus目前支持Linux和macOS平台进行源码编译。编译过程中遇到问题,可以通过[Github Issues]({{ site.pegasus_github_url }}/issues)向我们咨询。 +从2.4.0开始,Pegasus支持Linux和macOS平台进行源码编译。编译过程中遇到问题,可以通过[Github Issues]({{ site.pegasus_github_url }}/issues)向我们咨询。 ## 环境要求 -- GCC 5+ -- CMake 3.11+ +- GCC 5.4.0+ +- CMake 3.11.0+ -## Ubuntu环境配置 +## Linux环境配置 -你可以参考 [pegasus-build-dev/ubuntu20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2004/Dockerfile) 的Docker镜像安装全部依赖。 +你可以参考的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/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++ \ - 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 -``` +- [CentOS 7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) +- [Ubuntu 18.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) +- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) +- [Ubuntu 22.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2204/Dockerfile) ## 源码编译 -在此之前,请确保: -- `maven`已被正确安装且已添加到`PATH` -- `devtoolset-7`已被添加到`PATH` -- `JAVA_HOME`已被正确设置 - 请先参考[下载文档](/docs/downloads)获取源码。 ```bash -./run.sh build -c +./run.sh build -c --clear_thirdparty -j $(nproc) ``` -编译后输出会放在当前目录的`DSN_ROOT/`文件夹下,里面包含bin、include、lib目录。 +编译后输出会放在当前目录的`build/latest/output/`目录下,里面包含`bin`、`include`以及`lib`目录。 ## 编译打包 From e2cb7be5ac10589317937455edfef565db23a55a Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Thu, 23 Nov 2023 12:16:39 +0800 Subject: [PATCH 2/2] fix link --- _docs/en/build/compile-from-source.md | 2 +- _docs/zh/build/compile-from-source.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_docs/en/build/compile-from-source.md b/_docs/en/build/compile-from-source.md index e4711347..afeff673 100755 --- a/_docs/en/build/compile-from-source.md +++ b/_docs/en/build/compile-from-source.md @@ -17,7 +17,7 @@ Since 2.4.0, Pegasus supports to build both on Linux and macOS. Please don't hes You can refer to the docker images to install dependencies and set environment variables. For example: - [CentOS 7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) - [Ubuntu 18.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) -- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) +- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2004/Dockerfile) - [Ubuntu 22.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2204/Dockerfile) ## Compilation diff --git a/_docs/zh/build/compile-from-source.md b/_docs/zh/build/compile-from-source.md index c92f81c6..2302673f 100755 --- a/_docs/zh/build/compile-from-source.md +++ b/_docs/zh/build/compile-from-source.md @@ -19,7 +19,7 @@ version: master - [CentOS 7](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/centos7/Dockerfile) - [Ubuntu 18.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) -- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu1804/Dockerfile) +- [Ubuntu 20.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2004/Dockerfile) - [Ubuntu 22.04](https://github.com/apache/incubator-pegasus/blob/master/docker/pegasus-build-env/ubuntu2204/Dockerfile) ## 源码编译