19
19
if [ " $# " -ne 1 ]; then
20
20
echo " Usage: $0 zookeeper-<version-number>"
21
21
echo " Example:"
22
- echo " $ $0 zookeeper-3.4.14 "
22
+ echo " $ $0 zookeeper-3.5.8 "
23
23
exit 1
24
24
fi
25
25
26
26
ZK_DIST=$1
27
27
28
- curl -O " https://archive.apache.org/dist/zookeeper/$ZK_DIST /$ZK_DIST .tar.gz"
29
- tar -xzf ./$ZK_DIST .tar.gz -C /opt
30
- rm ./$ZK_DIST .tar.gz
28
+ curl -O " https://archive.apache.org/dist/zookeeper/$ZK_DIST /apache-$ZK_DIST -bin.tar.gz"
29
+ tar -xzf ./apache-$ZK_DIST -bin.tar.gz -C /opt
30
+ rm ./apache-$ZK_DIST -bin.tar.gz
31
+
32
+ mv /opt/apache-$ZK_DIST -bin /opt/zookeeper
33
+ rm -rf \
34
+ /opt/zookeeper/README.txt \
35
+ /opt/zookeeper/NOTICE.txt \
36
+ /opt/zookeeper/README_packaging.txt \
37
+ /opt/zookeeper/docs \
31
38
32
- mv /opt/$ZK_DIST /opt/zookeeper
33
- rm -rf /opt/zookeeper/CHANGES.txt \
34
- /opt/zookeeper/README.txt \
35
- /opt/zookeeper/NOTICE.txt \
36
- /opt/zookeeper/CHANGES.txt \
37
- /opt/zookeeper/README_packaging.txt \
38
- /opt/zookeeper/build.xml \
39
- /opt/zookeeper/config \
40
- /opt/zookeeper/contrib \
41
- /opt/zookeeper/dist-maven \
42
- /opt/zookeeper/docs \
43
- /opt/zookeeper/ivy.xml \
44
- /opt/zookeeper/ivysettings.xml \
45
- /opt/zookeeper/recipes \
46
- /opt/zookeeper/src \
47
- /opt/zookeeper/$ZK_DIST .jar.asc \
48
- /opt/zookeeper/$ZK_DIST .jar.md5 \
49
- /opt/zookeeper/$ZK_DIST .jar.sha1
50
39
51
40
# copy zk scripts
52
41
mkdir -p /opt/zookeeper/scripts
@@ -55,6 +44,6 @@ chmod +x /opt/heron-docker/scripts/generate-zookeeper-config.sh
55
44
cp /opt/heron-docker/scripts/zookeeper-ruok.sh /opt/zookeeper/scripts/
56
45
chmod +x /opt/heron-docker/scripts/zookeeper-ruok.sh
57
46
cp /opt/heron-docker/scripts/start-zookeeper.sh /opt/zookeeper/scripts/
58
- chmod +x /opt/heron-docker/scripts/
47
+ chmod +x /opt/heron-docker/scripts/start-zookeeper.sh
59
48
cp /opt/heron-docker/scripts/wait-for-zookeeper.sh /opt/zookeeper/scripts/
60
49
chmod +x /opt/heron-docker/scripts/wait-for-zookeeper.sh
0 commit comments