需要设置JAVA_HOME,想着echo $JAVA_HOME就可以了,然:
dog@dog:/usr/local/kafka/bin$ echo $JAVA_HOME
给的是/usr/bin/java
这么设置是不行滴,继续。。。
dog@dog:/usr/local/kafka/bin$ ls -lrt /usr/bin/java
lrwxrwxrwx 1 root tomcat 22 12月 29 2020 /usr/bin/java -> /etc/alternatives/java
dog@dog:/usr/local/kafka/bin$ ls -lrt /etc/alternatives/java
lrwxrwxrwx 1 root root 43 1月 6 21:52 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java
到此,方可??
Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64”