码迷,mamicode.com
首页 > 其他好文 > 详细

yum仓库客户端搭建和NTP时间同步客户端配置

时间:2019-04-04 14:19:36      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:通过   led   添加   yum源   enabled   rhel   list   无效   size   

一、yum仓库客户端搭建

yum源仓库搭建分为服务器端和客户端。

  服务端主要提供软件(rpm包)和yumlist。也就是提供yum源的位置。一般是通过http或者ftp提供位置。

  客户端的配置:yum配置文件位置:/etc/yum.repos.d/

1 [root@server0 yum.repos.d]# rm -f /etc/yum.repos.d/*
2 [root@server0 yum.repos.d]# vim repo_yck.repo
  [yck_repo]                                     # 仓库的名称
  name=repo for yck                              # 关于此仓库的描述信息。可自定义。
  baseurl=ftp://192.168.0.251/centos/repo/dvd/   # 指定yum源的位置
  enabled=1                                      # 表示此仓库启用
  gpgcheck=0                                     # 不进行Redhat的签证检验

 

 

二、NTP时间同步客户端配置

NTP时间同步的搭建也分为服务端和客户端。服务器端提供标准的时间,一般可以用公用的NTP服务器就可以了。

客户端的配置:

  

[root@server0 ~]# yum  -y  install  chrony          //安装软件包
[root@server0 ~]# vim  /etc/chrony.conf
#server 0.rhel.pool.ntp.org iburst                  //注释掉无效设置
#server 1.rhel.pool.ntp.org iburst
#server 2.rhel.pool.ntp.org iburst
#server 3.rhel.pool.ntp.org iburst
server classroom.example.com iburst                  //添加正确的服务器设置
.. ..
[root@server0 ~]# timedatectl  set-ntp  yes          //允许NTP同步
[root@server0 ~]# systemctl  restart  chronyd         //启动服务
[root@server0 ~]# systemctl  enable  chronyd         //设置开启启动

 

yum仓库客户端搭建和NTP时间同步客户端配置

标签:通过   led   添加   yum源   enabled   rhel   list   无效   size   

原文地址:https://www.cnblogs.com/mython/p/10654564.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!