centos7 修改同步时间
同步时间
安装ntp软件
[root@node2 ~]# yum install ntp
将ntp设为开机启动
[root@node2 ~]# systemctl enable ntpd
修改启动参数,增加-g -x参数,允许ntp服务在系统时间误差较大时也能正常工作
[root@node2 ~]# vim /etc/sysconfig/ntpd # Command line options for ntpd
OPTIONS="-g -x"
~
启动ntp服务
[root@node2 ~]# service ntpd restart
将系统时区改为上海时间 (亦即CST时区)
[root@node2 ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
查看时间是否正确
[root@node2 ~]# date
可与国家时间授权中心时间校队
http://www.zou114.com/bjtime/
centos7 修改同步时间的更多相关文章
- linux CentOS7 修改系统时间
linux在安装的时候如果时区选择错误,可以在系统安装完成之后修改.系统时间运行着也会有偏差,需要对时间进行实时同步,方法如下: 打开terminal 首先转到root权限 :并输入密码 然后输入:t ...
- CentOS7 修改系统时间
yum -y install ntp [root@localhost kevin]# systemctl enable ntpdsystemctl start ntpdntpdate us.pool. ...
- Centos7 修改系统时间和硬件时间不一致的问题
查看系统时间 [root@localhost ~]# dateSat Feb 24 14:41:22 CST 2018 查看硬件时间 [root@localhost ~]# hwclock --sho ...
- Centos7 修改硬件时间和系统时间
查看系统时间 [root@localhost ~]# date Tue Jun 13 10:20:13 CST 2017 查看硬件时间 [root@localhost ~]# hwclock --sh ...
- (转)Centos7 修改硬件时间和系统时间
查看硬件时间 [root@localhost ~]# hwclock --show Tue 13 Jun 2017 02:11:12 AM CST -0.848845 seconds 1 2 可以看出 ...
- 吴裕雄--天生自然 Hadoop大数据分布式处理:centos7修改系统时间、时区
cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 修改完后需要重启.
- centos7修改系统时间、时区
直接用下面命令直接更换时区 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- centos7 自动同步时间
rm -rf /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime vim /etc/sysconfig/cloc ...
- Linux修改时区以及同步时间
Centos7为例:修改时区 timedatectl list-timezones |grep Shanghai #查找中国时区的完整名称 Asia/Shanghai timedatectl set- ...
随机推荐
- concurrent.futures- 启动并行任务
python因为其全局解释器锁GIL而无法通过线程实现真正的平行计算.这个论断我们不展开,但是有个概念我们要说明,IO密集型 vs. 计算密集型. IO密集型:读取文件,读取网络套接字频繁. 计算密集 ...
- 转载:2.2.5 在配置中使用变量《深入理解Nginx》(陶辉)
原文:https://book.2cto.com/201304/19630.html 有些模块允许在配置项中使用变量,如在日志记录部分,具体示例如下.log_format main '$remot ...
- Linux mount 修改文件系统的读写属性
有时候要在某个文件夹下添加和删除文件时,显示 "read only filesystem",说明该文件系统是只读的不能修改.使用 mount –o remount,rw / 命令可 ...
- hibernate 多对一(级联)操作
级联:当你存储一个表的内容想值得相关联的表也存储数据时,可以通过级联来实现(cascade)@Entity@Table(name="t_User")public class Use ...
- each()遍历
在<jQuery教程/理解选取更新范围>一节中,我们知道:当选择器返回了多个元素时,可以使用一个方法来更新所有的元素,不再需要使用循环. 然后有的时候需要遍历元素,怎么办? 使用each( ...
- HDU1730 Northcott Game 尼姆博弈
Northcott Game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) T ...
- js在字符串中提取数字
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 【C++ Primer 第10章】 10.4.2 插入迭代器
iostream迭代器 标准库为iostream定义了可用于这些IO类型对象的迭代器. istream_iterator读取输入流, ostream_iterator向一个输出流写数据. 1. i ...
- 详解kubeadm生成的证书(转)
https://docs.lvrui.io/2018/09/28/%E8%AF%A6%E8%A7%A3kubeadm%E7%94%9F%E6%88%90%E7%9A%84%E8%AF%81%E4%B9 ...
- CSS 3. 文本|字体|背景|定位
1.文本属性和字体属性 <!DOCTYPE html> <html lang="en"> <head> <meta charset=&qu ...