给了Linux的测试环境,目前需要install JDK, Tomcat,此处记录下小白的操作过程。
1. 查询Linux发行版本,包括内核信息
(1) Linux查询内核信息
$ uname -a
Linux ECA-LPH000007 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/version
Linux version 3.10.0-514.6.1.el7.x86_64 ([email protected]centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Jan 18 13:06:36 UTC 2017
大概猜出发行版CentOS 7, 64位
(2) Linux查询发行版
$ lsb_release -a
-bash: lsb_release: command not found
命令不支持
$ cat /etc/issue
\S
Kernel \r on an \m
没有具体版本信息
$ ls -l /etc | grep release$ cat /etc/centos-release
-rw-r--r--. 1 root root 38 Dec 9 2015 centos-release
-rw-r--r--. 1 root root 51 Dec 9 2015 centos-release-upstream
-rw-r--r--. 1 root root 393 Dec 9 2015 os-release
lrwxrwxrwx. 1 root root 14 Mar 17 2017 redhat-release -> centos-release
lrwxrwxrwx. 1 root root 14 Mar 17 2017 system-release -> centos-release
-rw-r--r--. 1 root root 23 Dec 9 2015 system-release-cpe
CentOS Linux release 7.2.1511 (Core)
确认CentOS 7, 64位发行版。
2. 是否安装JDK
$ java -version
-bash: java: command not found
$ which java
/usr/bin/which: no java in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/xxx/.local/bin:/home/xxx/bin)
确认无JDK配置
原文地址:https://www.cnblogs.com/hello-yz/p/10348302.html