查看服务器版本信息
1. cat /proc/version
[root@hm01 ~]# cat /proc/version
Linux version 3.10.0-327.el7.x86_64 ([email protected]) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
2. uname -a
[root@hm01 ~]# uname -a
Linux eis_db 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
3. lsb_release -a
[root@hm01 ~]# 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.2.1511 (Core)
Release: 7.2.1511
Codename: Core
···
修改服务器主机名称
第一步: 添加或修改HOSTNAME的值
[root@hm01 ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=DB01
第二步 添加IP与主机名的映射
[root@hm01 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 DB01
196.1.1.129 DB01
第三步: 修改/etc/hostname
[root@hm01 ~]# vim /etc/hostname
DB01
第四步: 重启服务
[root@hm01 ~]# hostname DB01
[root@hm01 ~]# reboot
标签:4.1,amd64,主机,修改,Linux,hm01,DB01,root
From: https://www.cnblogs.com/hm201402/p/17127868.html