站群服务器
美国香港多IP国外服务器测评及优惠码推荐

京东云Linux系统配置yum源和ntpd服务

京东云Linux系统配置yum源

1.京东云 Centos7系统:

执行vi /etc/yum.repos.d/CentOS-Base.repo

将原有内容替换为如下内容:

[base] name=CentOS-$releasever - Base - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-7

[updates] name=CentOS-$releasever - Updates - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-7

[extras] name=CentOS-$releasever - Extras - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-7

[centosplus] name=CentOS-$releasever - Plus - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-7

[contrib] name=CentOS-$releasever - Contrib - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-7

wq保存文件退出。

2.京东云Centos6系统:

执行vi /etc/yum.repos.d/CentOS-6.repo ,将原有内容替换为如下内容:

[base] name=CentOS-$releasever - Base - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-6

[updates] name=CentOS-$releasever - Updates - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-6

[extras] name=CentOS-$releasever - Extras - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-6

[centosplus] name=CentOS-$releasever - Plus - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-6

[contrib] name=CentOS-$releasever - Contrib - mirrors.jdcloudcs.com baseurl=http://mirrors.jdcloudcs.com/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.jdcloudcs.com/centos/RPM-GPG-KEY-CentOS-6

wq保存文件退出

3.京东云Ubantu系统:

执行vi /etc/apt/sources.list ,将原有内容替换为如下内容:

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial main restricted

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-updates main restricted

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial universe

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-updates universe

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial multiverse

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-updates multiverse

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-security main restricted

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-security universe

deb http://mirrors.jdcloudcs.com/ubuntu/ xenial-security multiverse

wq保存文件退出。

京东云Linux系统配置ntpd服务:

1.调整ntpd配置文件:

执行vi /etc/ntp.conf,将原有内容替换为如下内容:

driftfile /var/lib/ntp/drift

pidfile /var/run/ntpd.pid

logfile /var/log/ntp.log

Access Control Support

restrict default kod nomodify notrap nopeer noquery

restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1

local clock

server 127.127.1.0

fudge 127.127.1.0 stratum 10

jdcloud ntp server

server ntp.jdcloudcs.com iburst minpoll 4 maxpoll 10

fudge ntp.jdcloudcs.com stratum 2

wq保存文件退出。

2.启动ntpd服务:

执行services ntpd start(Centos6系统)

执行systemctl start ntpd(Centos7系统)

执行services ntpd start(Ubantu系统)

3.设置开机自启动服务:

执行chkconfig ntpd on(Centos6系统)

执行systemctl enable ntpd(Centos7系统)

执行chkconfig ntpd on(Ubantu系统,需要先apt-get install chkconfig进行安装)

赞(0) 打赏
未经允许不得转载:站群服务器 » 京东云Linux系统配置yum源和ntpd服务
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏