服务器的jdk通过yum 安装的,要用jps查询pid,提示找不到命令
yum install -y java-1.8.0-openjdk.x86_64
[dev@hgh-tob-hsbc-dev-003 ~]$ jps
-bash: jps: command not found
[dev@hgh-tob-hsbc-dev-003 ~]$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
[root@hgh-tob-hsbc-dev-003 java]# which java
/bin/java
[root@hgh-tob-hsbc-dev-003 java]# ls -lrt /bin/java
lrwxrwxrwx 1 root root 22 May 4 2023 /bin/java -> /etc/alternatives/java
[root@hgh-tob-hsbc-dev-003 java]# ls -lrt /etc/alternatives/java
lrwxrwxrwx 1 root root 73 May 4 2023 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64/jre/bin/java
yum install -y java-1.8.0-openjdk-devel.x86_64
[root@hgh-tob-hsbc-dev-003 bin]# jps
52391 Jps