添加环境变量
export PATH="/usr/bin/docker-compose:$PATH" (似乎只能放在/usr/bin/目录下)
export PATH="/etc/init.d/systemctl:$PATH"
修改系统时间 查看系统时间
#----------时区------------#
timedatectl #查看时区
timedatectl set-timezone Asia/shanghai #修改时区
#-----系统时间、硬件时间-----#
date #查看系统时间
hwclock -r #查看硬件时间
hwclock --set --date "2022-01-01 10:00:00" #修改硬件时间
#------时间同步服务器-------#
rpm -qa ntpdate #查看有没有安装ntpdate #yum insatll -y ntpdate #安装ntpdate
ntpdate ntp.aliyun.com #设置阿里云时间服务器
hwclock --hctosys #同步时间到系统
hwclock --systohc #同步时间去硬件
yum insatll -y ntpdate #安装ntpdate
ntpdate ntp.aliyun.com
hwclock --hctosys #同步时间到系统
hwclock --systohc #同步时间去硬件
rpm -qa ntpdate #查看有没有安装ntpdate