从源码编译

Pegasus目前只支持Linux平台进行源码编译。编译过程中遇到问题,可以通过Github Issues向我们咨询。

环境要求

  • GCC 4.9.4+
  • CMake 3.11+

Ubuntu环境配置

你可以参考 pegasus-build-dev/ubuntu16.04 的Docker镜像安装全部依赖。

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;

pip3 install --no-cache-dir cmake

CentOS环境配置

你可以参考 pegasus-build-dev/centos7 的Docker镜像安装全部依赖。

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;

pip3 install --no-cache-dir cmake

源码编译

请先参考下载文档获取源码。

./run.sh build -c

编译后输出会放在当前目录的DSN_ROOT/文件夹下,里面包含bin、include、lib目录。

编译打包

打包server端程序包,用于服务部署:

./run.sh pack_server

打包client端库,用于C/C++端客户端开发:

./run.sh pack_client

打包tools工具集,里面包含了各种工具(shell、bench):

./run.sh pack_tools

编译成功后,推荐先体验onebox集群

Apache Incubator
Copyright © 2020 The Apache Software Foundation. Licensed under the Apache License, Version 2.0.

Apache Pegasus is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.