https://mirrors.aliyun.com/centos/8.1.1911/isos/x86_64/CentOS-8.1.1911-x86_64-dvd1.iso
开机网络自动连接:
ONBOOT=yes静态ip:
#设置静态IP PREFIX=24 IPADDR=10.55.211.100 GATEWAY=10.55.211.2 NETMASK=255.0.0.01.查看目前默认的启动默认 命令行模式 :multi-user.target 图形界面模式:graphical.targe
systemctl get-default2.设置为图形界面模式
systemctl set-default graphical.target3.设置为命令行模式
systemctl set-default multi-user.target1.安装
yum -y install chrony2.配置
vim /etc/chrony.conf # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). server s1a.time.edu.cn iburst server ntp.aliyun.com iburst3.常用命令 (1)chronyc 用法
# 查看 ntp_servers chronyc sources -v # 查看 ntp_servers 状态 chronyc sourcestats -v # 查看 ntp_servers 是否在线 chronyc activity -v # 查看 ntp 详细信息 chronyc tracking -v(2)修改时区
# 查看日期时间、时区及 NTP 状态 timedatectl # 查看时区列表 timedatectl list-timezones timedatectl list-timezones | grep -E "Asia/S.*" # 修改时区 timedatectl set-timezone Asia/Shanghai # 修改日期时间(可以只修改其中一个) timedatectl set-time "2019-09-19 15:50:20" # 开启 NTP timedatectl set-ntp true/flase