主从参数: 修改date:ntpdate asia.pool.ntp.org 主从配置通讯端口: db2h_erpinst1 70000/tcp 主库配置: db2 update db cfg for erpdb using hadr_local_host PrimaryNode-1 #本地服务器主 ...
分类:
数据库 时间:
2020-04-22 19:37:17
阅读次数:
252
#!/bin/bash #设置时区并同步时间 ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime if ! crontab -l |grep ntpdate &>/dev/null ; then (echo "* 1 * * * ntpdat ...
分类:
系统相关 时间:
2020-04-22 16:28:30
阅读次数:
70
关闭防火墙和selinux:systemctl stop firewalld.servicesetenforce 0永久关闭防火墙和selinux:systemctl disable firewalld.servicesed -i ‘/^SELINUX/s#enforcing#disabled#g’ ...
分类:
数据库 时间:
2020-04-19 13:02:14
阅读次数:
70
我使用了4台虚拟机centos7来搭建环境, 2个主结点(一般是一个,但为了体验zookeeper,万一其中一个master挂掉呢,另外一个会自动启动接管), 2个从结点 注意:下面的配置主要以主节点为例进行说明 第一步:同步四台机器的时钟 sudo yum install ntpdate,确保已安 ...
分类:
系统相关 时间:
2020-03-31 22:59:21
阅读次数:
97
设置系统主机名以及Host文件的相互解析 hostnamectl set-hostname k8s-master01 cat >> /etc/hosts <<EOF 192.168.17.101 k8s-master01 192.168.17.102 k8s-node01 192.168.17.10 ...
分类:
Web程序 时间:
2020-03-25 21:12:23
阅读次数:
142
第一种方法(服务器可以连内网): [root@localhost ~]# yum install -y ntp //安装时间同步程序 [root@localhost ~]# service ntpd start [root@localhost ~]# ntpdate -u cn.pool.ntp.o ...
分类:
系统相关 时间:
2020-03-17 14:09:26
阅读次数:
292
时区设置 先使用如下命令查看自己系统设置的时区 date -R 如果输出的不是+8000,那么需要调整时区: dpkg-reconfigure tzdata 选择asia,中国的城市即可。 调整时间 apt-get install ntpdate ntpdate ntp.sjtu.edu.cn 然后 ...
分类:
Web程序 时间:
2020-03-12 00:03:15
阅读次数:
87
一、前期说明 场景:服务器可以正常访问互联网的情况下 方法:通过shell+crond来让其实现每隔5分钟更新一次系统时间 二、shell脚本 脚本名称:update_os_time.sh 存放位置: /server/scripts/ 注意事项:请检查是否存在ntpdate命令,若没有,则用yum ...
分类:
其他好文 时间:
2020-02-18 09:51:36
阅读次数:
143
# 系统安装 最小化安装 英文 时区:上海 shanghai 内核崩溃日志不使用 安装常用软件 yum -y install vim bind-utils gcc gcc-c++ unzip net-tools bash-completion lrzsz curl telnet ntpdate # ...
分类:
系统相关 时间:
2020-02-16 12:46:32
阅读次数:
121