zoukankan      html  css  js  c++  java
  • 查看CentOS/Linux的版本信息

    今天在安装MySql的时候,想选择linux的版本对应的MySql。

    1、查看内核版本和x86/x64版本

    方法一、cat /proc/version

    [root@sxl129 Desktop]# cat /proc/version
    Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013

    方法二、uname -a

    1 ktop]# uname -a
    2 Linux sxl129 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    这里显示linux的内核版本是Red Hat 4.4.7-4,64位,

    2、查看Linux内核版本

    上面显示的Red Hat 4.4.7-4是Ret Hat自己的版本号,因为它是来自于Red Hat Enterprise Linux依照开放源代码规定发布的源代码所编译而成而这还不是Linux的内核版本。

    我们可以使用lsb-reales -a命令来查看Linux的内核版本。

    (1)、使用lsb-reales -a命令,但是显示:bash: lsb_release: command not found。需要安装一下lsb。    

    1 [root@sxl129 Desktop]# lsb_release -a
    2 bash: lsb_release: command not found

    (2)、使用直接yum install -y lsb

    1 [root@sxl129 Desktop]# yum install -y lsb
    2 Loaded plugins: fastestmirror, refresh-packagekit, security
    3 Loading mirror speeds from cached hostfile
    4  * base: mirrors.cn99.com
    5  * extras: mirrors.163.com
    6  * updates: mirrors.163.com
    7 Setting up Install Process
    8 ....................................

    (3)、查看linux内核版本

    1 [root@sxl129 Desktop]# lsb_release -a
    2 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
    3 Distributor ID:    CentOS
    4 Description:    CentOS release 6.5 (Final)
    5 Release:    6.5
    6 Codename:    Final

    至此,我们知道在选用MySql版本的时候,应该选用6.5版本&64位。

     

    参考文档:

    http://blog.csdn.net/xiexievv/article/details/42238835

    http://www.linuxidc.com/Linux/2016-05/131749.htm

    http://blog.csdn.net/carolzhang8406/article/details/6080400

    http://www.linuxidc.com/Linux/2014-12/110748.htm

  • 相关阅读:
    http协议详谈
    配置nginx 反向代理
    利用background-positon,background-image ,实现背景渐变
    vue +webpack 打包配置优化
    记项目中易出现的bug点
    vue 中基于html5 drag drap的拖放
    vue 项目技巧
    完整项目搭建全过程(vue-cli+webpack)
    vue+ D3+drag
    项目总结(3.28)
  • 原文地址:https://www.cnblogs.com/gudi/p/7965396.html
Copyright © 2011-2022 走看看