#主機環境
#hostnamectl status
Static hostname: k8s-master
Icon name: computer-vm
Chassis: vm
Machine ID: 60943b8b8b72471c82b7e50337e0ab9e
Boot ID: d5e57a99d1f64214a53f7954567ebf00
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 4.4.220-1.el7.elrepo.x86_64
Architecture: x86-64
# 設置主機名
# hostnamectl set-hostname k8s-master
# hostnamectl status
# 設置時區
# timedatectl set-timezone Asia/Shanghai
# timedatectl set-local-rtc 0
# timedatectl set-ntp true
# 重啟時鍾依賴的服務
# systemctl restart rsyslog
# systemctl restart crond
# 界面配置
# nmtui
# nmcli connection show 顯示指定網口的信息
# nmcli connection show eno33554960
#顯示所有設配狀態
# nmcli device status#添加ipv4
# nmcli connection modify eth0 +ipv4.addresses 3.3.3.7/24 #添加DNS
# nmcli connection modify eth0 ipv4.dns 114.114.114.114 #添加一個網關(GATEWAY)
# nmcli connection modify eth0 ipv4.gateway 3.3.3.254 #一塊寫入:
# nmcli connection modify eth0 ipv4.dns 114.114.114.114 +ipv4.gateway 3.3.3.254