一、chrony
时间同步服务器,与老版本的ntp不能共存,只能使用其中的一种。
配置如下:
# systemctl mask ntpd
# yum install chrony
# systemctl start chronyd
# systemctl enable chronyd
# vi /etc/chrony.conf
server 192.168.5.1 iburst
# chronyc sources -v
210 Number of sources = 1 .-- Source mode '^' = server, '=' = peer, '#' = local clock. / .- Source state '*' = current synced, '+' = combined , '-' = not combined, | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable. || .- xxxx [ yyyy ] +/- zzzz || / xxxx = adjusted offset, || Log2(Polling interval) -. | yyyy = measured offset, || \ | zzzz = estimated error. || | | MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* 192.168.5.1 8 6 377 3 +10us[ +29us] +/- 104us
常用命令:
# rpm -qc chrony 检查chrony服务配置文件所在
# timedatectl status 查看日期时间及NTP状态
# timedatectl set-time 2015-09-22 设置日期
# timedatectl set-time 11:50:00 设置时间
二、firewall
# systemctl mask iptables
# systemctl mask ip6tables
# systemctl mask ebptables
# systemctl start firewalld
# systemctl status firewalld
# firewall-cmd --list-all 列出防火墙的配置
# firewall-cmd --add-service=ftp --permanent 添加ftp服务