Skip to content

Commit 08294ce

Browse files
symatMate Szalay-Beko
authored andcommitted
ZOOKEEPER-2122: update readme + use FQDN in SSL certs during testing
1 parent 17e504a commit 08294ce

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

README_packaging.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,23 @@ http://bigtop.apache.org/
88

99
## Requirements
1010

11-
- ant (recommended version 1.9.4 or later for concurrent JUnit test execution) or maven to build the java code
12-
- gcc, cppunit and python-setuptools are required to build C and python bindings.
11+
- you need maven to build the java code
12+
- gcc, cppunit, openssl and python-setuptools are required to build C and python bindings. (only needed when using `-Pfull-build`)
1313

1414
On RHEL machine:
1515

1616
```
1717
yum install cppunit
1818
yum install python-setuptools
19+
yum install openssl openssl-devel
1920
```
2021

2122
On Ubuntu:
2223

2324
```
2425
apt-get install cppunit
2526
apt-get install python-setuptools
27+
apt-get install openssl libssl-dev
2628
```
2729

2830

zookeeper-client/zookeeper-client-c/ssl/gencerts.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
# relative to the canonical path of this script.
2626
#
2727

28+
# use local fully qualified domain name in the certificates, or fall back
29+
# to zookeeper.apache.org if no domain name is set or the `hostname` command fails
30+
FQDN=`hostname -f`
31+
FQDN=${FQDN:-"zookeeper.apache.org"}
32+
2833
# Generate the root key
2934
openssl genrsa -out rootkey.pem 2048
3035

@@ -42,8 +47,8 @@ C = US
4247
ST = California
4348
L = San Francisco
4449
O = ZooKeeper
45-
emailAddress = dev@zookeeper.apache.org
46-
CN = zookeeper.apache.org
50+
emailAddress = dev@$FQDN
51+
CN = $FQDN
4752
EOF
4853
)
4954

@@ -64,8 +69,8 @@ C = US
6469
ST = California
6570
L = San Francisco
6671
O = ZooKeeper
67-
emailAddress = dev@zookeeper.apache.org
68-
CN = zookeeper.apache.org
72+
emailAddress = dev@$FQDN
73+
CN = $FQDN
6974
EOF
7075
)
7176
openssl x509 -req -in client.csr -CA root.crt -CAkey rootkey.pem -CAcreateserial -days 3650 -out client.crt
@@ -95,8 +100,8 @@ C = US
95100
ST = California
96101
L = San Francisco
97102
O = ZooKeeper
98-
emailAddress = dev@zookeeper.apache.org
99-
CN = zookeeper.apache.org
103+
emailAddress = dev@$FQDN
104+
CN = $FQDN
100105
EOF
101106
)
102107
openssl x509 -req -in server.csr -CA root.crt -CAkey rootkey.pem -CAcreateserial -days 3650 -out server.crt

0 commit comments

Comments
 (0)