[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498864#comment-17498864
 ] 

Mate Szalay-Beko edited comment on ZOOKEEPER-4483 at 2/28/22, 11:54 AM:
------------------------------------------------------------------------

we already have some minimal documentation about the required packaged here, 
but I guess we could improve it: 
[https://github.com/apache/zookeeper/blob/master/README_packaging.md]

 

I use the following commands on my mac to make ad-hoc docker containers to 
build ZooKeeper on various linux versions. (not a comprehensive list/howto, 
just a copy-paste from my notes - but might be useful if someone wants to write 
some docs)

 

Ubuntu 16.4 xenial:
{noformat}
docker run --volume ~/git:/git -it --rm ubuntu:xenial /bin/bash
apt update && apt install -y software-properties-common ant maven wget 
default-jdk  autoconf libtool make libcppunit-dev g++ mc git python-setuptools 
openssl libssl-dev python2.7 python2.7-dev
{noformat}
 

on ubuntu 18.4:
{noformat}
docker run --volume ~/git:/git -it --rm ubuntu:18.04 /bin/bash

apt update && apt install -y libcppunit-dev maven default-jdk-headless autoconf 
libtool g++ make software-properties-common pkg-config wget git 
python-setuptools openssl libssl-dev ant python2.7 python2.7-dev

# for SASL in C client
apt install -y libsasl2-modules-gssapi-mit libsasl2-modules libsasl2-dev
{noformat}
 

centos7
{noformat}
docker run --volume ~/git:/git -it --rm  centos:7.5.1804 /bin/bash

# add these lines if needed... especially on non-docker environment
echo "LANG=en_US.utf-8" >> /etc/environment
echo "LC_ALL=en_US.utf-8" >> /etc/environment

yum -y install autoconf automake mc git maven java cppunit python-setuptools 
screen libtool python-devel cppunit-devel gcc-c++ telnet openssl openssl-devel 

# for SASL in C-client
yum -y install cyrus-sasl-md5 cyrus-sasl-gssapi cyrus-sasl-devel
{noformat}
 

for centos8
{noformat}
docker run --volume ~/git:/git -it --rm  centos:8.1.1911 /bin/bash

# add these lines if needed... especially on non-docker environment
echo "LANG=en_US.utf-8" >> /etc/environment
echo "LC_ALL=en_US.utf-8" >> /etc/environment

yum -y install autoconf automake git maven java libtool gcc-c++ make

# cppunit is moved to the PowerTools repo on centos 8, you need this if you 
execute the C client unit tests
dnf -y --enablerepo=PowerTools install cppunit-devel cppunit diffutils


# for SASL support in the C-client (optional)
yum -y install cyrus-sasl-md5 cyrus-sasl-gssapi cyrus-sasl-devel


# for SSL/TLS support in the C-client (optional)
yum -y install openssl openssl-devel


# for building also zkpython (optional)
yum -y install python2-setuptools python2-devel ant
alternatives --set python /usr/bin/python2
{noformat}


was (Author: symat):
we already have some minimal documentation about the required packaged here, 
but I guess we could improve it: 
[https://github.com/apache/zookeeper/blob/master/README_packaging.md]

 

I use the following commands on my mac to make ad-hoc docker images to build 
ZooKeeper on various linux versions. (not a comprehensive list/howto, just a 
copy-paste from my notes - but might be useful if someone wants to write some 
docs)

 

Ubuntu 16.4 xenial:
{noformat}
docker run --volume ~/git:/git -it --rm ubuntu:xenial /bin/bash
apt update && apt install -y software-properties-common ant maven wget 
default-jdk  autoconf libtool make libcppunit-dev g++ mc git python-setuptools 
openssl libssl-dev python2.7 python2.7-dev
{noformat}
 

on ubuntu 18.4:
{noformat}
docker run --volume ~/git:/git -it --rm ubuntu:18.04 /bin/bash

apt update && apt install -y libcppunit-dev maven default-jdk-headless autoconf 
libtool g++ make software-properties-common pkg-config wget git 
python-setuptools openssl libssl-dev ant python2.7 python2.7-dev

# for SASL
apt install -y libsasl2-modules-gssapi-mit libsasl2-modules libsasl2-dev
{noformat}
 

centos7
{noformat}
docker run --volume ~/git:/git -it --rm  centos:7.5.1804 /bin/bash

# add these lines if needed... especially on non-docker environment
echo "LANG=en_US.utf-8" >> /etc/environment
echo "LC_ALL=en_US.utf-8" >> /etc/environment

yum -y install autoconf automake mc git maven java cppunit python-setuptools 
screen libtool python-devel cppunit-devel gcc-c++ telnet openssl openssl-devel 

# for SASL
yum -y install cyrus-sasl-md5 cyrus-sasl-gssapi cyrus-sasl-devel
{noformat}
 

for centos8
{noformat}
docker run --volume ~/git:/git -it --rm  centos:8.1.1911 /bin/bash

# add these lines if needed... especially on non-docker environment
echo "LANG=en_US.utf-8" >> /etc/environment
echo "LC_ALL=en_US.utf-8" >> /etc/environment

yum -y install autoconf automake git maven java libtool gcc-c++ make

# cppunit is moved to the PowerTools repo on centos 8, you need this if you 
execute the C client unit tests
dnf -y --enablerepo=PowerTools install cppunit-devel cppunit diffutils


# for SASL support in the C-client (optional)
yum -y install cyrus-sasl-md5 cyrus-sasl-gssapi cyrus-sasl-devel


# for SSL/TLS support in the C-client (optional)
yum -y install openssl openssl-devel


# for building also zkpython (optional)
yum -y install python2-setuptools python2-devel ant
alternatives --set python /usr/bin/python2
{noformat}

> C Client: Document dependencies needed on Ubuntu
> ------------------------------------------------
>
>                 Key: ZOOKEEPER-4483
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4483
>             Project: ZooKeeper
>          Issue Type: Task
>          Components: c client
>            Reporter: Enrico Olivelli
>            Priority: Major
>
> Every time I try to build the C client on a fresh new Ubuntu machine I waste 
> lot of time in figuring out the list of dependencies.
>  
> This is the command that allows me to run correctly the C Client build and 
> tests:
> {code:java}
> sudo apt-get install libcppunit-dev libsasl2-dev automake autoconf 
> pkg-config{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to