如何将 zookeeper 从 3.4.8 升级到 3.4.13?
How to upgrade zookeeper from from 3.4.8 to 3.4.13?
我正在尝试将 zookeeper 从 3.4.8 升级到 3.4.13。
升级前/usr/lib/zookeeper
的内容
drwxr-xr-x 5 root root 4.0K Aug 23 08:39 .
drwxr-xr-x 77 root root 12K Aug 23 08:50 ..
drwxr-xr-x 2 root root 4.0K Aug 23 08:39 bin
lrwxrwxrwx 1 root root 19 May 24 11:25 conf -> /etc/zookeeper/conf
drwxr-xr-x 2 root root 4.0K Aug 23 08:39 lib
-rw-r--r-- 1 root root 12K May 24 11:25 LICENSE.txt
-rw-r--r-- 1 root root 170 May 24 11:25 NOTICE.txt
-rw-r--r-- 1 root root 1.3M Aug 23 08:39 zookeeper-3.4.8.jar
lrwxrwxrwx 1 root root 38 Aug 23 08:39 zookeeper.jar -> /usr/lib/zookeeper/zookeeper-3.4.8.jar
如 answer I have downloaded the zookeeper from this link 所述,将 zookeeper-3.4.13.jar
放在 /usr/lib/zookeeper
中,并指向符号 link,如下所示
lrwxrwxrwx 1 root root 39 Aug 30 03:19 zookeeper.jar -> /usr/lib/zookeeper/zookeeper-3.4.13.jar
但是在重启 zookeeper 后检查状态,它仍然指向 3.4.8
ubuntu@vrni-platform:/etc/zookeeper/conf$ telnet localhost 2181
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
status
Zookeeper version: 3.4.8--1, built on 02/06/2016 03:18 GMT
这似乎是因为从 /usr/lib/zookeeper/bin/zkEnv.sh
加载 jar 的方式
#release tarball format
for i in "$ZOOBINDIR"/../zookeeper-*.jar
do
CLASSPATH="$i:$CLASSPATH"
done
有人可以告诉我这个已知问题是 zkEnv.sh
吗?这是预期的吗?
zookeeper mailing list 中已经回答了这个问题。我们不应该在 CLASSPATH
.
中有多个 zookeeper-<version>.jar
我正在尝试将 zookeeper 从 3.4.8 升级到 3.4.13。
升级前/usr/lib/zookeeper
drwxr-xr-x 5 root root 4.0K Aug 23 08:39 .
drwxr-xr-x 77 root root 12K Aug 23 08:50 ..
drwxr-xr-x 2 root root 4.0K Aug 23 08:39 bin
lrwxrwxrwx 1 root root 19 May 24 11:25 conf -> /etc/zookeeper/conf
drwxr-xr-x 2 root root 4.0K Aug 23 08:39 lib
-rw-r--r-- 1 root root 12K May 24 11:25 LICENSE.txt
-rw-r--r-- 1 root root 170 May 24 11:25 NOTICE.txt
-rw-r--r-- 1 root root 1.3M Aug 23 08:39 zookeeper-3.4.8.jar
lrwxrwxrwx 1 root root 38 Aug 23 08:39 zookeeper.jar -> /usr/lib/zookeeper/zookeeper-3.4.8.jar
如 answer I have downloaded the zookeeper from this link 所述,将 zookeeper-3.4.13.jar
放在 /usr/lib/zookeeper
中,并指向符号 link,如下所示
lrwxrwxrwx 1 root root 39 Aug 30 03:19 zookeeper.jar -> /usr/lib/zookeeper/zookeeper-3.4.13.jar
但是在重启 zookeeper 后检查状态,它仍然指向 3.4.8
ubuntu@vrni-platform:/etc/zookeeper/conf$ telnet localhost 2181
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
status
Zookeeper version: 3.4.8--1, built on 02/06/2016 03:18 GMT
这似乎是因为从 /usr/lib/zookeeper/bin/zkEnv.sh
#release tarball format
for i in "$ZOOBINDIR"/../zookeeper-*.jar
do
CLASSPATH="$i:$CLASSPATH"
done
有人可以告诉我这个已知问题是 zkEnv.sh
吗?这是预期的吗?
zookeeper mailing list 中已经回答了这个问题。我们不应该在 CLASSPATH
.
zookeeper-<version>.jar