Compile by docker (recommended)

Download the docker image

Pegasus encapsulates the building environment into a docker image, you can build directly based on this environment.

docker pull apachepegasus/build-env:centos7

To build based on a formally released stable version (e.g 2.1.0), you can pull as follow:

docker pull apachepegasus/build-env:2.1.0-centos7

Compilation

Please refer to Downloads to fetch the sources under a directory (/your/local/apache-pegasus-source). Then run the following command:

docker run -v /your/local/apache-pegasus-source:/root/pegasus \
           apachepegasus/build-env:2.1.0-centos7 \
           /bin/bash -c "./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:

docker run -v /your/local/apache-pegasus-source:/root/pegasus \
           apachepegasus/build-env:2.1.0-centos7 \
           /bin/bash -c "./run.sh pack_server"

Package client libraries for C/C++ development:

docker run -v /your/local/apache-pegasus-source:/root/pegasus \
           apachepegasus/build-env:2.1.0-centos7 \
           /bin/bash -c "./run.sh pack_client"

Package toolset which includes various tools (shell, bench):

docker run -v /your/local/apache-pegasus-source:/root/pegasus \
           apachepegasus/build-env:2.1.0-centos7 \
           /bin/bash -c "./run.sh pack_tools"

If this is your first time compiling Pegasus, it’s recommended to try 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.