release是查看LSB标准的兼容性的Linux版本号,安装

2019-11-01 11:02 来源:未知

1.查看OS版本,如果系统不是CentOS或者不是6.9版本可以通过百度查找相应版本的安装方式

问题:通过lsb_release -a 是查看linux系统版本时报错,具体的解决办法如下:

 

#lsb_release -a 

[root@localhost ~]# lsb_release -a
-bash: lsb_release: command not found

[root@hadoop2 etc]# cat issue
CentOS release 6.8 (Final)
Kernel r on an m

//lsb_release是查看LSB标准的兼容性的Linux版本号,-a是列出所有的相关信息

解决方法:yum install redhat-lsb -y

[root@hadoop2 etc]# cat hosts.allow
#
# hosts.allow This file contains access rules which are used to
# allow or deny connections to network services that
# either use the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# See 'man 5 hosts_options' and 'man 5 hosts_access'
# for information on rule syntax.
# See 'man tcpd' for information on tcp_wrappers
#
[root@hadoop2 etc]# cat hosts.deny
#
# hosts.deny This file contains access rules which are used to
# deny connections to network services that either use
# the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# The rules in this file can also be set up in
# /etc/hosts.allow with a 'deny' option instead.
#
# See 'man 5 hosts_options' and 'man 5 hosts_access'
# for information on rule syntax.
# See 'man tcpd' for information on tcp_wrappers
#
[root@hadoop2 etc]# pwd
/etc
[root@hadoop2 etc]# uname -a
Linux hadoop2 2.6.32-642.6.2.el6.x86_64 #1 SMP Wed Oct 26 06:52:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@hadoop2 etc]# cat /proc/version
Linux version 2.6.32-642.6.2.el6.x86_64 (mockbuild@worker1.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Wed Oct 26 06:52:09 UTC 2016
[root@hadoop2 etc]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.8 (Final)
Release: 6.8
Codename: Final
[root@hadoop2 etc]# lsb_release
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[root@hadoop2 etc]#

//如果lsb_release指令显示不存在,那么可以通过安装lsb_release来执行该指令#yum -y redhat-lsb

安装完之后再查看版本信息:

 

//内核版本查看方式是在/proc/version/中查看:#cat /proc/version或者是#uname -a,界面显示是2.6.32-504.3.3.el6.x86_64的内核版本

[root@localhost upload]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.3 (Final)
Release: 6.3
永利平台娱乐,Codename: Final

//也可以通过/etc/issue文件查看:#cat /etc/issue,界面显示是CentOS release 6.9 (Final)  Kernel r on an m,也就是6.9版本的CentOS

//本指令#lsb_release -a显示的结果是:

 

LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.9 (Final)
Release: 6.9
Codename: Final

LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息。

 

2.查看该服务器是不是已经安装了Mysql

#whereis mysql        或            #find /* -name "mysql"              或者             #mysql       或者      #service mysqld status

TAG标签:
版权声明:本文由永利平台娱乐发布于IT交流,转载请注明出处:release是查看LSB标准的兼容性的Linux版本号,安装