1、搭建时间服务器,客户端可在每天早晨的9:00整从ntp服务器更新自己的时间。

2、搭建邮件服务器,使用[email protected][email protected]用户发一封邮件,内容为biechile。

一、时间服务器

1.安装chrony包

[[email protected] ~]# yum install -y chrony

2.编辑配置文件

允许客户机访问本台服务器
[[email protected] ~]# vim /etc/chrony.conf
搭建时间服务器和邮件服务器(未完)

3.重启chronyd服务

[[email protected] ~]# systemctl restart chronyd
查看一下时间
搭建时间服务器和邮件服务器(未完)

4.在客户端安装chronyd包

我客户端用到的是7的镜像
[[email protected] ~]# yum install -y chrony
搭建时间服务器和邮件服务器(未完)

5.在客户端安装配置文件

[[email protected] ~]# vi /etc/chrony.conf
搭建时间服务器和邮件服务器(未完)
重启服务
[[email protected] ~]# systemctl restart chronyd

6.查看时间 ,修改时间,从服务端 同步时间

服务器
[[email protected] ~]# date
2020年 10月 29日 星期四 22:28:42 CST
客户端
[[email protected] ~]# date
Thu Oct 22 01:14:25 EDT 2020

重启服务
[[email protected] ~]# systemctl restart chronyd
查看时间
[[email protected] ~]# date
2020年 10月 29日 星期四 22:30:16 CST

7.服务端写计划任务

搭建时间服务器和邮件服务器(未完)
设置开机自启动
[[email protected] ~]# systemctl enable chronyd

二、邮件服务器

1.安装postfix包

记得关闭防火墙
[[email protected] ~]# yum install -y postfix
搭建时间服务器和邮件服务器(未完)
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0

2.编辑主配置文件

[[email protected] ~]# vim /etc/postfix/main.cf
搭建时间服务器和邮件服务器(未完)
搭建时间服务器和邮件服务器(未完)
搭建时间服务器和邮件服务器(未完)
搭建时间服务器和邮件服务器(未完)
搭建时间服务器和邮件服务器(未完)
搭建时间服务器和邮件服务器(未完)

3.重启服务

[[email protected] ~]# systemctl restart postfix

相关文章:

  • 2021-11-19
  • 2021-04-20
  • 2021-09-05
  • 2021-10-25
  • 2021-09-26
  • 2021-12-06
  • 2021-10-02
  • 2021-07-11
猜你喜欢
  • 2021-12-06
  • 2022-02-13
  • 2021-12-06
  • 2022-12-23
  • 2021-12-03
  • 2021-12-13
相关资源
相似解决方案