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