一、oracle服务器版本号
1 select* from v$version;
2 select * from product_component_version;
二、mysql服务器版本号
数据库中查询
1 select version();
2 服务器端查询
mysql --version
三、linux操作系统版本号
1、查看当前操作系统内核信息
uname -a
$ uname -a
Linux vm-web 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
2、查看当前操作系统版本信息
cat /proc/version
$ cat /proc/version
Linux version 3.10.0-693.21.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Wed Mar 7 19:03:37 UTC 2018
3、查看当前操作系统发行版信息
cat /etc/issue 或 cat /etc/redhat-release
$ cat /etc/issue
\S
Kernel \r on an \m
$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
4、查看cpu相关信息,包括型号、主频、内核信息等
cat /proc/cpuinfo
$ cat /proc/cpuinfo
5、列出所有版本信息
lsb_release -a
$ lsb_release -a
-bash: lsb_release: command not found
出现command not found说明没安装lsb_realease,可以执行命令yum install -y redhat-lsb安装lsb_realease,安装完成后,版本信息如下:
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core