ITPub博客

首页 > Linux操作系统 > Linux操作系统 > linux cook

linux cook

原创 Linux操作系统 作者:hgs19921112 时间:2020-09-15 17:09:40 0 删除 编辑
1. linux手动清理患处
   1) sync
   
   2) echo 1 > /proc/sys/vm/drop_caches
2. 修改hostname
   hostnamectl set-hostname hostnmae
3.时钟同步
  1)         ntp时钟同步,必须设置
需要配置一个主节点作为Server端,然后其他节点作为Client端向其同步时间
a)   
Server端,vim /etc/ntp.conf,以10.10.12.0网段为例,
 添加:
       restrict 10.10.12.0 mask 255.255.255.0 nomodify notrap
       server 10.10.12.14 prefer
       server 127.127.1.0
       fudge 127.127.1.0 stratum 10
 执行:service ntpd start 启动ntpd服务
 b)  
 Client端,vim /etc/ntp.conf,以10.10.12.14作为Server端,
       添加 :
           restrict 10.10.12.0 mask 255.255.255.0 nomodify notrap
           server 10.10.12.14
           fudge 10.10.12.14 stratum 10
 c) 在所有Client端向Server端同步时间# 
 ntpdate 10.10.12.14
 注意:执行ntpdate命令时,Client的ntpd服务需要暂时停止,命令结束后再启动ntpd。
 d) 所有节点设置ntpd服务启动
   chkconfig ntpd on
   service ntpd start 
 e)将时间写入硬件时钟
    hwclock -w
   参考:https://blog.csdn.net/willinge/article/details/79928726


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31506529/viewspace-2721087/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2017-11-22

  • 博文量
    106
  • 访问量
    186397