-
Notifications
You must be signed in to change notification settings - Fork 201
Convenience Binaries
This page describes how to build RPM and DEB convenience binaries for:
- Apache Cloudberry (Main Repository)
- cloudberry-backup
- cloudberry-pxf
The overall workflow follows two major steps:
- Build installation artifacts
- Package them into RPM or DEB
For a faster and reproducible build environment (supported from Cloudberry 2.1+), please refer to: https://cloudberry.apache.org/docs/deployment/build-based-on-docker.
Before packaging, you must build Cloudberry from source.
You may either:
- Build manually from source, or
- Use the official Docker-based build script (recommended for 2.1+)
The build output should produce a complete installation directory, typically:
/usr/local/cloudberry-db-<version>/
sudo dnf install rpm-build
mkdir -p ~/rpmbuild/SPECS
cp ~/cloudberry/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec \
~/rpmbuild/SPECS/
Copy the LICENSE file into the installation directory:
sudo cp /path/to/cloudberry/LICENSE \
/usr/local/cloudberry-db-2.1.0/
cd devops/build/packaging/rpm
./build-rpm.sh -v <version> -r <release>
Example:
./build-rpm.sh -v 2.1.0 -r 1
Output Location:
ls ~/rpmbuild/RPMS/aarch64/apache-cloudberry-db-incubating-2.1.0-1.el9.aarch64.rpm
sudo apt install dpkg-dev
cd ~/cloudberry
mkdir -p debian
cp -r devops/build/packaging/deb/ubuntu22.04/* ./debian/
./devops/build/packaging/deb/build-deb.sh -v 2.1.0
The resulting .deb package will be generated in the parent directory of the cloudberry source directory (i.e., one level above the current cloudberry directory where the build command is executed), not inside the cloudberry directory itself.
# For RPM
sudo dnf install -y apache-cloudberry-db-incubating-2.1.0-1.el9.aarch64.rpm
# For DEB
sudo apt update
sudo apt --fix-broken install -y ./apache-cloudberry-db-incubating-2.1.0-1-ubuntu22.04-adm64.deb
After installation:
- A gpadmin user should be configured
- Default installation path:
/usr/local/cloudberry-db
Switch to gpadmin:
su - gpadmin
source /usr/local/cloudberry-db/cloudberry-env.sh
Create a clean demo directory:
mkdir -p ~/cloudberry-demo
cd ~/cloudberry-demo
Initialize demo cluster:
gpdemo
source ./gpdemo-env.sh
Verify connection:
psql postgres